Orbit-Simulator icon indicating copy to clipboard operation
Orbit-Simulator copied to clipboard

I have a doubt

Open xandymelo opened this issue 5 years ago • 1 comments

Hi, i am trying to study your code, why the variable MASS_AREA_RATIO is necessary ? and in the class Planet, the function create, why this:

if self.radius <= 200:

     self.radius += 0.35 `

thank you for your help (sorry for bad english, i speak portuguese)

xandymelo avatar Jul 26 '20 04:07 xandymelo

The mass area ratio is a variable that I use to multiply by the area of the planets to get their mass. This way, the mass is consistent with the size of the planets. The create function is the function that gets called on while the mouse is getting held down. Those lines will add to the planets size only if the planets radius is still under 200. It is essentially just used to put a maximum size on the planets. If you need a further explanation or if you have any more questions, feel free to let me know!

000Nobody avatar Jul 26 '20 11:07 000Nobody