Devlog 6
Today, I got a lot of work done around the physics simulations; in fact, I managed to finish the Spring Simulation, the Planet Orbits Simulation, the Gravity Simulation and started working on the Refraction Simulation. This means that only 2 (or 2 and a half) physics simulation are left (for reference, a little bit of the Refraction Simulation as well as the Fluid and Temperature Simulation).
The simulations made today being a little bit more complex than the previous ones, albeit very fun to make, I will summarize everything to make it as simple as possible. Enough talking, here is the list:
- created the .py files for the Spring Simulation, Planet Orbits, Gravity Simulation as well as the Refraction Simulation
- added the values of the physical properties extracted from the launcher (still didn’t implement the interface between the launcher and the simulations, that will come later)
- calculated the physical formulae needed to make every simulation possible (for the Spring Simulation: calculated the “spring” force using Hooke’s Law and another variables such as the stiffness and damping coefficient of the spring and this time, I used the Pygame.Vector2 which made everything more simple; for the Planet Orbits: the solution to the N-body problem to be able to simulate more than 2 planets interacting upon each other by using a function to integrate the result values numerically with Euler’s Method; for the Gravity Simulation: the simple f = mg formula as well as the drag force formula taking a lot of variables into account such as the air density, surface area of the simulated object, its mass and the drag coefficient but also the restitution coefficient to make the object bounce when it collides with the ground; for the Refraction Simulation: still haven’t implemented the Snell-Descartes Law needed to calculate the angle of the refracted light ray)
- modified some values in the Projectile Simulation (physical properties)
For those that might be asking: I did not use OOP for the planet creation function in the Planet Orbits simulation because I didn’t want to use it for this project.
I hope to finish the physics simulations tomorrow and start working on the chemistry ones.
As always, thanks for supporting my project; it really means a lot.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.