|
Show off your work
|
|
| Salvo | Date: Saturday, 31.08.2013, 14:36 | Message # 331 |
 Star Engineer
Group: Local Moderators
Italy
Messages: 1400
Status: Offline
| I'm working on a 3d gravity simulator with Unity, actually it can simulate gravity but not centrifugal/centripetal force, tomorrow i will work on it
The universe is not required to be in perfect harmony with human ambition.
CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs
(still don't know why everyone is doing this...)
|
| |
| |
| werdnaforever | Date: Sunday, 01.09.2013, 00:16 | Message # 332 |
 World Builder
Group: Users
Pirate
Messages: 897
Status: Offline
| Quote (Salvo) gravity simulator
Oh. I get it!
|
| |
| |
| Salvo | Date: Sunday, 01.09.2013, 10:41 | Message # 333 |
 Star Engineer
Group: Local Moderators
Italy
Messages: 1400
Status: Offline
| Quote (werdnaforever) Oh. I get it!
I don't
The universe is not required to be in perfect harmony with human ambition.
CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs
(still don't know why everyone is doing this...)
|
| |
| |
| Watsisname | Date: Sunday, 01.09.2013, 11:41 | Message # 334 |
 Galaxy Architect
Group: Global Moderators
United States
Messages: 2613
Status: Offline
| Quote (Salvo) actually it can simulate gravity but not centrifugal/centripetal force
Gravity is the only force you need to simulate. The other two forces are just other ways of looking at the same thing.
|
| |
| |
| Salvo | Date: Sunday, 01.09.2013, 13:48 | Message # 335 |
 Star Engineer
Group: Local Moderators
Italy
Messages: 1400
Status: Offline
| Quote (Watsisname) Gravity is the only force you need to simulate. The other two forces are just other ways of looking at the same thing.
I was going to post the question "is it needed", because now i tried to implement the formula but it makes the simulation very strange...
Anyway, it seems that binary systems always collide after a while, and that none of them is "stable"
The universe is not required to be in perfect harmony with human ambition.
CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs
(still don't know why everyone is doing this...)
Edited by Salvo - Sunday, 01.09.2013, 14:02 |
| |
| |
| Watsisname | Date: Sunday, 01.09.2013, 22:01 | Message # 336 |
 Galaxy Architect
Group: Global Moderators
United States
Messages: 2613
Status: Offline
| Heh, yep, you can't get stable orbits if you have both gravity and some additional inward or outward force.
To make sense of it, consider that all gravitating particles in the universe obey a single gravitational force law. That is, each mass feels an attractive force to each other mass, with the strength of the force given by
The centripetal force is just another definition of the force acting upon an object which is undergoing circular motion. You can find that the magnitude of the centripetal force is v2/r, but that doesn't tell you what the force actually is. You have to realize that in this case, it is being supplied by the gravitational force -- they are the exact same thing! So if the universal law of gravity is simulated in your program, then the centripetal force is already implied anytime you've got objects moving tangentially to one another. You don't have to include it again, or it will break physics, as you can see with your results there.
Another fun way to break physics is to change the inverse square law. E.g. make the gravitational force scale as r-1, r-3, or r-1.99 instead of r-2. You'll find orbits are extremely unstable even for very tiny changes in the exponent.
|
| |
| |
| Salvo | Date: Monday, 02.09.2013, 00:38 | Message # 337 |
 Star Engineer
Group: Local Moderators
Italy
Messages: 1400
Status: Offline
| Quote (Watsisname) You don't have to include it again, or it will break physics, as you can see with your results there. biggrin
You know what, I don't actually included anything, in the video I used just gravitational force, that's the problem
The universe is not required to be in perfect harmony with human ambition.
CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs
(still don't know why everyone is doing this...)
|
| |
| |
| werdnaforever | Date: Monday, 02.09.2013, 00:43 | Message # 338 |
 World Builder
Group: Users
Pirate
Messages: 897
Status: Offline
| Now make a simulator for a universe without gravity, matter, or radiation. It would look like this:
|
| |
| |
| HarbingerDawn | Date: Monday, 02.09.2013, 01:01 | Message # 339 |
 Cosmic Curator
Group: Administrators
United States
Messages: 8717
Status: Offline
| Quote (werdnaforever) It would look like this: I seriously doubt it would produce a blue line on the left edge
All forum users, please read this! My SE mods and addons Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
|
| |
| |
| Watsisname | Date: Monday, 02.09.2013, 01:57 | Message # 340 |
 Galaxy Architect
Group: Global Moderators
United States
Messages: 2613
Status: Offline
| Quote (Salvo) You know what, I don't actually included anything, in the video I used just gravitational force, that's the problem
wat
In that case something must be going wrong with the way the positions are calculated at each time step. The time step itself is clearly not the issue because the trajectories appear smooth, but obviously two co-orbiting particles should not spiral in over time. (The other objects you introduced in the video don't matter, right? This behavior occurs even if you have only two objects?) Also, are there ever cases where a binary spirals outward over time?
Something you could try to test is if the simulation is conserving momentum. Set up two objects with antiparallel velocity vectors, and balance the momenta. I.e. have m1v1 = -m2v2. Depending on the ratio of masses and velocities, they should either collide before the first pass, or fly off toward infinity, or follow a static binary orbit.
If momentum is indeed being conserved, then the center of the pair (or the body left over after they collide) should never drift relative to the camera.
|
| |
| |
| werdnaforever | Date: Monday, 02.09.2013, 03:33 | Message # 341 |
 World Builder
Group: Users
Pirate
Messages: 897
Status: Offline
| Quote (HarbingerDawn) I seriously doubt it would produce a blue line on the left edge All universes have a blue line. Our real one does. Salvo's does. Mine does. Even SpaceEngine does- we just haven't found it yet. It is always there, no matter what. There are an infinite number of universes and the blue line exists in all of them. It is truly infinite; it is like a god.
|
| |
| |
| SHW | Date: Monday, 02.09.2013, 08:53 | Message # 342 |
 Astronaut
Group: SE team
Pirate
Messages: 76
Status: Offline
| Quote (Salvo) Anyway, it seems that binary systems always collide after a while, and that none of them is "stable" Are you using standard Unity physics, or completely your own calculations? Because in Unity there are some damping coefficients, that reduce speed over time.
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it.
|
| |
| |
| Salvo | Date: Monday, 02.09.2013, 14:51 | Message # 343 |
 Star Engineer
Group: Local Moderators
Italy
Messages: 1400
Status: Offline
| Quote (Watsisname) Something you could try to test is if the simulation is conserving momentum. Set up two objects with antiparallel velocity vectors, and balance the momenta. I.e. have m1v1 = -m2v2. Depending on the ratio of masses and velocities, they should either collide before the first pass, or fly off toward infinity, or follow a static binary orbit.
I'm going to try it
Quote (werdnaforever) *pearl of wisdom*
Harb, you didn't knew about this?
Quote (SHW) Are you using standard Unity physics, or completely your own calculations?
Just my own calculations
The universe is not required to be in perfect harmony with human ambition.
CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs
(still don't know why everyone is doing this...)
|
| |
| |
| Watsisname | Date: Monday, 02.09.2013, 19:24 | Message # 344 |
 Galaxy Architect
Group: Global Moderators
United States
Messages: 2613
Status: Offline
| Quote (werdnaforever) All universes have a blue line.
*Watsisname bows before the Blue Linear Ultra-intelligent Entity*
|
| |
| |
| midtskogen | Date: Monday, 02.09.2013, 20:11 | Message # 345 |
 Star Engineer
Group: Users
Norway
Messages: 1674
Status: Offline
| Some more timelapses from my archive. Similar to those posted previously, but hopefully not reposted.
2011-12-23:
2012-08-01:
2011-04-21:
NIL DIFFICILE VOLENTI
|
| |
| |