All Questions
Tagged with physics coordinate-system
6
questions
1
vote
1
answer
316
views
Vector addition and Pythagorean Theorem code
I would like to share my code that is meant to help me add 2 vectors together. It is very simple and I would like to kindly ask you whether you could review my code. Also, I decided to keep separate ...
6
votes
3
answers
248
views
Calculate next position and velocity after "bounce"
Intro and code
I have the following function that calculates an object's "next" position and velocity (in 1 dimension) given a boundary [0, max].
...
5
votes
1
answer
78
views
Gravity problem solver in Factor
After answering a question about Factor, I decided that it looked interesting. To get the hang of the syntax and such, I decided to write some basic physics code to "solve" the three-body problem. ...
10
votes
1
answer
539
views
Simulating a polygon
This code simulates a polygon (say a triangle) with a person at each vertex, every person is looking at the next adjacent vertex/person. They all start moving towards each other with a constant ...
9
votes
1
answer
4k
views
Particle class for physics simulation
This is a very lengthy class called Particle, it relies on two other headers, one of them is a simple struct which contains an x and y (...
17
votes
6
answers
6k
views
Vector (physics) implementation
I recently started learning Java, and I decided to implement a basic vector system for another particle system I was building.
...