3D solar system with OpenGL and C#
2016-08-23
0 0 0
4.0
Other
Earn points
Translation maninwest@Codeforge Author: Vasily Tserekh@CodeProject This is a & nbsp; 3D solar system, using OpenGL and C #. I try to make it simple. It contains planets, moons, the sun, the moon and other stars. I use the Tao namespace, which is an interoperation between OpenGL DLL and. Net framework. I also used shadowengine - a small graphics framework I developed myself. With it, I can save the code work of loading graphics and initializing graphics context. Solar system 3D programmers in the eyes of 3D programmers need to transform the universe, orbit, stars and other entities in the programming environment. The universe is a black background and you can use opengl functions; Gl.glClearColor (0, 0, 0, 1);//red green blue alpha 。 As for stars, you can use dots instead. You can use OpenGL to process primitives for drawing points. You can also use random functions to generate a large number of points, just make sure they are not in the solar system. Planets are shaded spheres. They have their own orbits and axes of rotation. You have to use & nbsp; variables to track and update as they change over time. If you don't want to use 3D Max to make a sphere, you can use & nbsp; OpenGL conic. Satellites, like planets, just go around the planets instead of the sun. Using the code included in the project for shadowengine and TAO.OpenGL Project classes are: Camara.cs Typical FPS camera. The mouse is centered in the middle of the screen. When the user moves the mouse, the & nbsp; delta X and delta y from the start point are calculated. These delta X and delta y are converted into angles, and when you move the camera forward / backward, the camera moves in the direction of the angle.
c#
opengl
太阳系
Related Source Codes
No. 186: DX0110- Source code for community propert
0
0
no vote
No. 219: DX0149- Source code for community propert
0
0
no vote
Verification code identification
0
0
no vote
CSV data analysis tool
0
0
no vote
Source code of hospital medical record information
0
0
no vote
No comment