Java Program in JAVA which simulates the solar system

Click For Summary
To simulate the solar system in Java using Beeman's algorithm, it's essential to understand how to decompose vectors into their x and y components. Vectors can be represented in rectangular or polar form. If the vectors are in rectangular form, the x and y components are directly available. For vectors in polar form, which consist of a magnitude and an angle, trigonometric functions can be used to calculate the x and y components. This foundational knowledge is crucial for implementing the simulation accurately.
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:
Technology 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.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
6
Views
2K