mercredi 20 septembre 2023

Getting a random position fixed distance from a point

I am trying to develop a solar system simulation.

To initialise the display, I need the planets to be randomly placed in their orbitals (fixed orbital radius) from the Sun. How do I get the random position?

I am using pygame for the display.

I tried some code from ChatGPT, but it didn't seem to work correctly and I couldn't understand it at all.




Aucun commentaire:

Enregistrer un commentaire