There was an idea to write a simple program for displaying the interaction of three "points" on the screen (Visualization of the imitation of the gravitational interaction of three bodies) with the line drawn behind the dots.

There are many versions and opinions which is better and more convenient. But I am interested in the functionality associated with the very primitive actions that I described above.

Closed due to the fact that it is necessary to reformulate the question so that the participants can give an objectively correct answer to the participants Yuriy SPb , Kromster , fori1ton , enzo , tutankhamun 8 Jul '16 at 21:02 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • My personal opinion is not to use Java for GUI in general) But if I needed Java, I would choose between Swing and JavaFX - Russtam
  • Thanks for the advice @Russtam, I have already started to learn JavaFX because of its similarity with the familiar Android. There was a thought to try Unity + C #, I suspect that it will be even easier there) - abbath0767

1 answer 1

well, it's easy! For all gravity and physics there we use jBox2d . For GUI we use JavaFX . And here is an excellent example for this combination.

Well, a little bit about 3D in JavaFX .

  • Yes, an interesting example, apparently jBox2d will do. True, I can't find human documentation - abbath0767
  • Try this site jbox2d.org , quite a lot of information on jBox2d. Wiki and examples. - DimXenon
  • In fact, the easiest way to master jBox2D is to take one example and just consider it in more detail. In short: there is a visual and "physical" component of the application. The visual component is associated with the physical. The physical forces, the sizes of objects and their form are prescribed, the boundaries of the "world" are defined, where these forces and objects will act. And then the process of the “life” of the described “world” starts and forces begin to influence objects, moving them. - DimXenon