I recently watched this video and got interested in replicating what is shown. The main problem I am facing is deciding on how to start. I have a few ideas but I am not sure if they are correct or even remotely correct. The comment by the person who posted the video indicates the use of Calculus, which I have not taken yet (mind you, I am only in high school). Furthermore, the user has given the code in python but I am not efficient in python to understand it deeply.
Here is my idea:
- Build a class that represents one “person”
- Class will contain a method that “sprays” “particles” to indicate its position
- A check method that looks around for other persons and adjusts it position
- The main class that will setup the initial positions of the persons
and start the program
As you can see the plan is not very detailed but will this idea work? And if not, what are routes that I can take to do this?
Thanks!
Start with your primary environment – graphics. There are subtle wrappers around OpenGL like
LWJGLand also full-blown game engines likejMonkeyEngine. If you follow their tutorials it will become quite clear how to map your domain to objects and render them based on the simulation.As for the simulation idea, that’s why I love OOP – you think in terms of human behavior and map that directly into objects and their behavior (methods). So your idea should definitely work. Sorry for such a general answer, but it’s equal response to a general question.