Triangle Spring Model/ +Simulation Link

Started by
10 comments, last by Eelco 17 years, 10 months ago
Linear Spring Model A spring is defined by two points. The forces on each point is determined linearly as a function of the distance between the points. If the spring is left free, its length second derivative is a linear function of the distance between the points. Triangular Spring Model The spring is defined by three points. If the triangle is left free, its area's second derivative must be a linear function of the area itself. An additional requirement is that the shape of the triangle remains the same [QUESTIONS] How can I calculate the forces on each point of the triangle? Is this a sane method for the extension from 1-dimension to 2-dimensions? [Edited by - arithma on May 24, 2006 6:44:55 AM]
[ my blog ]
Advertisement
Quote:Original post by arithma
How can I calculate the forces on each point of the triangle?

energy physics are your friend. forces are gradients of energy. if you express the energy of an element in its nodes, two for a spring, then you can take two partial derivatives, one with respect to each node, being representative of the force on each node.

you can do the same for a triangle. if you want a force that preserves area, simply express the energy of a triangle in its area (one common one is area deviation from initial area squared, analogous to k*(length-restlength)^2), and differentiate that formula, which is given in the triangles' node coords, with respect to the node coords to get the forces on each of them.

Quote:
Is this a sane method for the extension from 1-dimension to 2-dimensions?

yes, you are on the right track, but it depends on what you are doing. its a fairly realistic material model of most common materials and has some desirable properties, like resistance to inversion. it most likely suffices for what you are trying to do. if you can get this to work, its not that big a step to more sophisticed material models, which more accurately take shear into account for instance. the procedure remains the same, you only need a different energy formula, which might be a little harder to differentiate.
One thing i can immediately think of is that such triangle will not try to preserve shape but only area (will work kind of like it is filled with 2d gas).
Let's find force. It's clear that area does not change if vertice moves along the direction of opposite edge. So, force will be orthogonal to opposite edge
Let distance from vertice to opposite edge is h and length of opposite edge is w
Area is
1.) a = w*h*0.5

If energy formula is
E=0.5*k*(a-a0)^2 [ala linear spring]
it is easy to differentiate by area
dE/da=k*(a-a0)

and then differentiate 1.) so da = dh*w*0.5
so
dE=k*(a-a0)*dh*w*0.5

F=dE/dh=k*(a-a0)*w*0.5
and finally
F = k*(w*h*0.5-a0)*w*0.5 = k*w2*h*0.25-a0*w*0.5
(that's if i didn't screw up somewhere)
Quote:Original post by Dmytry
One thing i can immediately think of is that such triangle will not try to preserve shape but only area (will work kind of like it is filled with 2d gas).

if you only use area elements, yes. the most simple solution is to simply keep the 1d springs on the edges of triangles aswell, or you can introduce a shear-energy.
Yes, i see. Say, we have triangle abc with horizontal bc side, then the shear will define horizontal force on the vertice a and this "2d pressure" thing will define vertical...
Have been experimenting with this stuff for a while now..

Check this Simulation, it needs dx9.
To run the simulation, press and hold the space button.
To increase the gas mass, hold onto numpad+, to decrease it, hold onto numpad-.
Also check out the numpad0 and numpad1.. Left them for surprise...

That out.. Am still unsatisfied with my solution, which I will not even explain since it is TOTALLY adhoc..

Quote:E=0.5*k*(a-a0)^2
Isn't this a little bit adhoc.

My thoughts right now are that:
I will apply forces on segments rather than points (how should I resolve these forces onto the points?).

(1) I didn't mean that the forces SHOULD preserve the shape of the triangle, but they, on their own, must not change its shape.

What analytic relation between the three forces on the segments can be deduced from constraint (1) putting in perspective some solution to resolving forces onto points..

When am able to answer these questions, I believe I will be able to go on and finish it the right way.

Thnx guys
[ my blog ]
You must put d3d9.dll, d3dx9_30.dll and simulation exe file in the same folder for it to work... Plus you have to register the dll files.. I just didn't want to upload a fat installer file to geocities. Sorry for that [sad]
[ my blog ]
Quote:Original post by arithma
Have been experimenting with this stuff for a while now..

Check this Simulation, it needs dx9.
To run the simulation, press and hold the space button.
To increase the gas mass, hold onto numpad+, to decrease it, hold onto numpad-.
Also check out the numpad0 and numpad1.. Left them for surprise...

That out.. Am still unsatisfied with my solution, which I will not even explain since it is TOTALLY adhoc..

i cant get it to run. i dont have d3dx9_30.dll either, but that doesnt seem to be the problem.

Quote:
Quote:E=0.5*k*(a-a0)^2
Isn't this a little bit adhoc.

not more adhoc than E=0.5*k*(l-l0)^2

but if its too adhoc, why dont you take some classes in partial differential equations, finite element method, material science, and whatnot? thats probably because you are looking for an adhoc solution, no?

Quote:
My thoughts right now are that:
I will apply forces on segments rather than points (how should I resolve these forces onto the points?).

(1) I didn't mean that the forces SHOULD preserve the shape of the triangle, but they, on their own, must not change its shape.

What analytic relation between the three forces on the segments can be deduced from constraint (1) putting in perspective some solution to resolving forces onto points..

When am able to answer these questions, I believe I will be able to go on and finish it the right way.

Thnx guys

im sorry, but youve lost me here. can you be a little more descriptive?
Setup file, contains source :)

Now, you might want to read the original post again.
That done, here is more explanation of my problem

MORE DESCRIPTION
If the triangle is totally free, ie no external forces, the only deformation that is allowed to happen is change in scale. The center of mass of the triangle must remain where it is. That means that the forces applied to the vertexes of the triangle are along the direction of the line that connects them to the center of the triangle and that condition (2) is satisfied. What I still need to determine is the magnitude of each of these forces. The defining constraints are

(1) If the triangle is left free, the area's second derivative is a first-order linear function of the area itself.
(2) If the triangle is left free, the shape remains the same. It is only scaled.

Constraint(2) is satisfied when
Fi / || vi - center || == constant
This constant is the same for all three vertices
is satisfied for each vertex (v) in the triangle...

That leaves me with constraint (1) as unsolved...

Are these conditions sufficient to define a value for the forces?

There is another option where forces are applied on segments rather on the vertexes, any suggestions?
----------
MORE NOTES
I will make sure to take these courses. (Still first year), thnx for the suggestions.

Am actually doing this work as a way to get ready for these subjects.
[ my blog ]
the more i read the less i understand...

your application doesnt shed any light on your intentions either.

maybe you want to contrain the angle between the intersection of two lines?

This topic is closed to new replies.

Advertisement