•      Sign In
• Create Account

## very important equation desentralazing

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

17 replies to this topic

### #1lomateron  Members

491
Like
0Likes
Like

Posted 26 March 2012 - 06:31 AM

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.

### #2Álvaro  Members

20255
Like
1Likes
Like

Posted 26 March 2012 - 07:04 AM

You are trying to reinvent the wheel. Learn about numerical integration methods. There is a whole field of applied math devoted to this problem.

### #3lomateron  Members

491
Like
0Likes
Like

Posted 26 March 2012 - 07:26 AM

can you help me solving it? i want to solve it fast!

### #4Álvaro  Members

20255
Like
0Likes
Like

Posted 26 March 2012 - 07:59 AM

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

### #5lomateron  Members

491
Like
0Likes
Like

Posted 26 March 2012 - 08:39 AM

"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.

### #6niofire  Members

100
Like
0Likes
Like

Posted 26 March 2012 - 12:39 PM

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

### #7lomateron  Members

491
Like
0Likes
Like

Posted 26 March 2012 - 08:22 PM

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.

### #8lomateron  Members

491
Like
0Likes
Like

Posted 26 March 2012 - 09:09 PM

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

### #9Bacterius  Members

13100
Like
0Likes
Like

Posted 26 March 2012 - 11:27 PM

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.”

### #10lomateron  Members

491
Like
0Likes
Like

Posted 27 March 2012 - 12:06 AM

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?

### #11Olof Hedman  Members

5701
Like
0Likes
Like

Posted 27 March 2012 - 12:55 AM

Alvaro already told you how: "

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."

This equation will only work for two bodies and will not be possible to expand to more, so pretty boring.

People have been working on these problems for hundreds of years, you should listen more carefully on the previous posters. Numerical is the way to go here.

### #12lomateron  Members

491
Like
0Likes
Like

Posted 27 March 2012 - 01:18 AM

I have already made the equation for 3 bodies, wait a moment and i will post it, its much more complex, and i get to point were i have a much bigger polynomial to solve, and as i get to 4 I can generalize it now and get an equation that will be for whatever number of bodies. Why do you want to stop me? its Exxxperrience for me. Yes i read the post from Alvaro but i cant solve the polynomial, can you solve it for me?

I have a minor mistake in the first equation were i said a1=-a2, it should be a1=-(a2*m2)/m1, I am working with tetrahedrons of same mass so there is no problem there.

### #13lomateron  Members

491
Like
0Likes
Like

Posted 27 March 2012 - 02:44 AM

here it is, the equation for whatever number of objects:

http://imageshack.us.../685/sdfjm.png/

i cant do it...can some math expert help me with it. How can I get out of that? there must be someway already invented to solve that cycle of an equation inside the other inside the equation inside the other inside the equation inside the other......infinite.

### #14Bacterius  Members

13100
Like
0Likes
Like

Posted 27 March 2012 - 04:31 AM

here it is, the equation for whatever number of objects:

http://imageshack.us.../685/sdfjm.png/

i cant do it...can some math expert help me with it. How can I get out of that? there must be someway already invented to solve that cycle of an equation inside the other inside the equation inside the other inside the equation inside the other......infinite.

You don't understand. What you are trying to solve analytically has no analytical solution. I already explained why in my previous post, I will repeat it here - these equations are nonlinear, with feedback (as you noticed with the equation-inside-an-equation pattern). Those types of equations cannot be solved by ordinary algebra. You need numerical methods to work with those.

... unless of course you found an earth-shattering method for doing what everyone has failed to do for many years...

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

### #15lomateron  Members

491
Like
0Likes
Like

Posted 27 March 2012 - 04:44 AM

But are you sure, I don't believe that, i have already seen similar math problems before,but those are just some weak memories of mine, so the only thing i can tell is that it can be solved,I just need a real math expert to see my equation, i am pretty sure it can be solved. I want Alvaro, the man looks like an expert, Alvaro! plz come here an tell me the truth...

### #16Álvaro  Members

20255
Like
2Likes
Like

Posted 27 March 2012 - 04:50 AM

But are you sure, I don't believe that, i have already seen similar problems before,but those are just some weak memories of mine, so the only thing i can tell is that it can be solved,I just need a real math expert to see my equation, i am pretty sure it can be solved. I want Alvaro, the man looks like an expert, Alvaro! come here an tell me...

Here: http://en.wikipedia..../N-body_problem

Now educate yourself and stop wasting everybody's time.

### #17lomateron  Members

491
Like
-7Likes
Like

Posted 27 March 2012 - 01:15 PM

Its common that the feeling of annoyance can be awaken when someone else has discovered a problem and makes himself loud and noticed by others that are in any way connected to you, knowing that the same thing happened before with the same problem and probably many times before with another person, but! as you have defined yourself as a discoverer of the world you should have already notice that that feeling will cause wrong neurons in your brain to get exited, wrong because you will start relating that feeling with the one of ignoration, and as you have seen throught relations of mathematical equations you must have already discovered that this world is all about relations, but you haven't!(you will not get it, as i do, words are not enough), your brain has set a common reaction, a way of thinking and as you do whatever of the things you do you will still be the same, thats a natural way of reacting by our human desing and you must discover how can you change that to continue that natural reaction of sensing(the senses) and making it more sensible.
What if i told you i know how to do it, i don't, maybe i will, MUAAHAHAHAHAHAUHUHUHUHU!!!! bye.

### #18Olof Hedman  Members

5701
Like
0Likes
Like

Posted 27 March 2012 - 02:16 PM

Can't believe I fell for the troll...
Pretty obvious in hindsight.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.