VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



clsPlanet: Class to Draw a Solar System (updated)

by Roger Gilchrist (50 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

A single class capable of drawing the solar system from Sun to Pluto (including 500 asteroids and 9 moons). You can easily add more or design your own solar system. At present the orbits are circular and the comments a bit thin on ground but should be enough to get you going. Thanks for inspiration, assistance and support to Peter Wilson whose upload 'A Simple Solar System Simulator, v1.0'
https://www.vbcoders.com/vb/scripts/ShowCode.asp?txtCodeId=47973&lngWId=1
inspired
this.
-------------NOTE---------------------------------
If it runs too slowly reduce the number of asteroids at Private Const AsteroidNumber As Long = 500 . I have run it with up to 5000 but the graphic is not that much different and very slow.
---------UPDATED-------------------------------------------Thanks to Peter Wilson who imporved his zooming code and kindly sent it to me. Have added a new solar equator view, labels for planets and moons, improved collection based functionality, Asteroids do not display orbits (un-comment piece of code if you like that). All orbits are now ellipical and Pluto has its eccentric orbit (not accurate will get almanac from library to fix that). Planets have extra properties (oblate= Flat).
------------
CODERS this class automatically produces the labels it needs to operate without a seed control. Cute Trick extended on article in Computer Shopper Jun 2003.

Rate clsPlanet: Class to Draw a Solar System (updated)

Download clsPlanet: Class to Draw a Solar System (updated)

Download clsPlanet: Class to Draw a Solar System (updated) (9 KB)

clsPlanet: Class to Draw a Solar System (updated) Comments

No comments have been posted about clsPlanet: Class to Draw a Solar System (updated). Why not be the first to post a comment about clsPlanet: Class to Draw a Solar System (updated).

Post your comment

Subject:
Message:
0/1000 characters