You are browsing as a guest. Sign up (or log in) to start making projects!

2D physics simulator

  • 5 Devlogs
  • 11 Total hours

Using python, numpy, pygame and some physics equation I simulated a spring attached to a mass suspended under gravity, which oscillates with real simulated physics and damping happens over time just like in real life. I created this project to make my understanding better about how spring and gravity works and how to simulate things using programming since I’m a visual learner this project has helped me grow a lot.

Ship #2 Pending review

I realized it was too difficult to figure how to download my project and test for reviewers so I just published a Executable file of my project and they can access it from my release page in github

  • 1 devlog
  • 2h
Try project → See source code →
Open comments for this post

1h 30m 30s logged

I realized it was too difficult to figure how to download my project and test for reviewers so I just published a Executable file of my project and they can access it from my release page in github and download the latest version of my project and while I was doing that I watched a tut on how to make your README presentable since presentation also matters.

0
0
8
Ship #1 Pending review

I simulated a spring attached to mass suspended freely under gravity, all by just using python, every visual representation in my project is made by using pygame and physics is calculated using numpy and math libraries. Making the spring was one of the hardest part as it required a lot of calculation and good understanding of trigonometry after struggling with it I finally created so that the spring stretches and compress just like real spring. For this project I had to learn 2 new library numpy and pygame.

  • 4 devlogs
  • 10h
Try project → See source code →
Open comments for this post

53m 39s logged

added minimum length constraint so that when the spring goes so near the pivot point it launches itself back in opposite direction so it behaves just like a real spring. fixed bug related to angular velocity not decreasing when moment of inertia increases when energy is constant but removed advanced physics that I couldn’t compute so I’m back to simple mass and spring simulation and updated README.

0
0
40
Open comments for this post

2h 3m 17s logged

It’s been 6 hrs since I been trying to add parts in my code that simulate physics, I had to learn new things like parallel axis theorem, derive equations that calculates moment of inertia, center of mass, pivot point etc etc while making sure they work together and a lot of trigonometry and math tho only 2h is counted ig 4hrs was spent on deriving equations, struggling with math and watching tutorials.

0
0
31
Open comments for this post

1h 16m 43s logged

I’m trying to recreate a 2D physics simulator I saw on Instagram consisting of spring, solid hallow semi circle that rocks and rolls and a sphere inside the hollow semi-circle attached to mass with gravity. Today, I couldn’t get done much since I didn’t have enough knowledge so I had to learn many new things like weighted average, moment of inertia and finally derived equation for COM (Center of mass) of the hollow solid semi-circle after watching some physics video in YouTube.

0
0
13
Open comments for this post

5h 43m 27s logged

look I made a tiny physics simulator of spring-mass system under the influence of gravity. I took me 5hrs as I was learning python as well, while struggling with logic. All the graphics here is created using code using libraries like pygame and numpy and to create that spring coil I have to use cosine and sine function which was hard to visualize in 2D as school only taught us to click it in calculator. That really fried my brain.

0
0
40

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…