very important equation desentralazing

Started by
16 comments, last by alh420 12 years, 1 month ago
I was creating a directx program where I crate 3d objects with their own gravity, every time i clicked, 1 tetrahedron was created in the space, and as i continued clicking and moving myself in space i putted a different tetrahedron in the space were they started moving because of the others tetrahedrons gravity. I finished it, it worked but i was unsatisfied.My equation that handles the gravity, more exactly the acceleration of every tetrahedron depended on the position of the tetrahedron and the position of the other ones that existed, this is correct but the problem with my program was that the acceleration was calculated every different frame that was displayed, every frame the tetrahedron moved depending on its acceleration, the acceleration depended on the positions, so again the next frame the tetrahedron will have another position so i calculated the acceleration again depending on its new position.
Then i said, "you can predict how exactly the future will be, you just need to know and relate many f*king things but you can do it"....
"i don't have to calculate the acceleration every frame, that's stupid, the road that every tetrahedron will have across the time just depends on the initial position and velocity when they were created", so i started the process to get the equation of how the acceleration changes through time depending only on its first position and velocities:

http://imageshack.us...captureelx.png/

And there I am, I don't know how to take "a1" to one side alone.
Advertisement
You are trying to reinvent the wheel. Learn about numerical integration methods. There is a whole field of applied math devoted to this problem.
can you help me solving it? i want to solve it fast!
Do you just want to solve for a1 in the last equation? If you multiply both sides of the equation by the denominator of the right-hand side and you expand, you'll get a polynomial of degree 3 in a1. That can be solved analytically or numerically.

But I am not convinced what you are doing is going to be as fantastic as you think. You will do yourself a favor if you first study a few of the integration methods available (Euler, implicit Euler, verlet, Runge-Kutta...) and learn what their strengths and weaknesses are. Then if you want to explore your own methods, go for it.

You can start here: http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations
"But I am not convinced what you are doing is going to be as fantastic as you think" it isn't fantastic for me as you think i think, but as you think why isn't it?
I mean with that new equation i can precalculate collisions and it will be less time spend in calculating collisions collisions, more time spend in having more action, and if i know when something will collide then i wouldn't have that thing were if an object moves at insane speeds it wouldn't collide were it has to.
So now with the control of the fourth dimensions you can get to do very interesting things that are secret for now MUAHAHAHOHOHOHO!!
In some ways i can get to a fifth dimension, can get to a fifth dimension!! and do things with it.
I dont really get what you want... Acceleration is supposed to be constant, while velocity and position are not constant (on is linear, the otherwant non-linear). So you only need to put a constant acceleration. Thus, a(t)= C, where C is any number you feel like putting in. The velocity will be v(t) = C*t, where t is the number of frames since the first frame. The position will be x(t) = (C*t^2)/2
Oh come on niofire, aceleration isn't constant, come on at least take a look at the image Ieft there with the link before commenting. I am still waiting for an Alvaro's answer.
I am still trying to get "a1" alone that polynomial is f*ing big.
Can someone help me with that polynomial?
If you wanna get an idea of what i wanna do see this video
Your equation is wrong. When a tetrahedron moves, it modifies its gravity field, which causes all other tetrahedrons to react differently, and thus move in another way. Then those tetrahedrons, by moving, cause the original tetrahedron to move as well. The relations between the tetrahedrons at any given time are nonlinear (they are also chaotic and exhibit feedback) and cannot be solved analytically.

You can certainly plot the trajectories of a group of tetrahedrons for any duration but you will need to do it numerically, and any change in any tetrahedron's position (or adding/removing one), no matter how small, will result in a different trajectory after a given time (because the equations are chaotic). So if you're looking at interactivity there is no difference between precalculating and stepping through each frame.

Unless I misunderstood your problem.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

wait the equation as you can see for now just involves 2 tetrahedrons, no more. For 2 tetrahedrons the equation is correct. Can you help me solving it?

This topic is closed to new replies.

Advertisement