Program in JAVA which simulates the solar system

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
srose
Messages
4
Reaction score
0
Hi
I need to write a program in JAVA which simulates the solar system. I'll be using the Beeman's algorithm seen here: http://en.wikipedia.org/wiki/Beeman%27s_algorithm"

My question is that if I have the vectors for : velocity, acceleration and position how do I decompose them into there x and y components? I have forgotten a lot about the basics of vectors.

Please help
thanks
 
Last edited by a moderator:
Physics news on Phys.org


srose:
Vectors are expressed in rectangular form or polar form for the 2-D variety. Which do you have? In the rectangular form, the x and y components are given. In polar form, where a magnitude and an angle are given, simple trigonometry produces the x an y components.