POV-Ray : Newsgroups : povray.advanced-users : Constrained motion Server Time
25 Nov 2024 14:40:33 EST (-0500)
  Constrained motion (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Andrew Coppin
Subject: Constrained motion
Date: 1 Oct 2002 09:51:48
Message: <3d99a874@news.povray.org>
Suppose an object is acted on be several forces at once. The resultant force
is represented by the vector V. Suppose, say, V = <5, -7, 9> So, we can
divide this by the mass of the object and thus discover it's acceleration.

But... suppose the object is contrained to the X-Y plane. (And let's suppose
that whatever mechanism "constrains" it has no friction - impossible but
simpler to compute ;-) What do we do now? Do we just write V = <5, -7, 0>
and continue as usual? Or does something more ellaborate need to be done?
(I'm not worried about the orientation of the object - it's a sphere. And
this sphere is not in any way deformable, so there's no extra complications
there ;-)

Sorry to keep pestering!

Thanks.
Andrew.


Post a reply to this message

From: Christoph Hormann
Subject: Re: Constrained motion
Date: 1 Oct 2002 10:14:05
Message: <3D99ADA8.6722C2B9@gmx.de>
Andrew Coppin wrote:
> 
> [...]
> 
> But... suppose the object is contrained to the X-Y plane. (And let's suppose
> that whatever mechanism "constrains" it has no friction - impossible but
> simpler to compute ;-) What do we do now? Do we just write V = <5, -7, 0>
> and continue as usual? Or does something more ellaborate need to be done?

There are mainly two possibilities to achieve this:

1) use coordinates that completely and uniquely describe the motion of the
object and at the same time do not violate the constraints.  In this case
it would mean calculating the whole thing in 2d in the x-y-plane.

2) introducing additional forces to make the object fit the constraints
(commonly known as penalty methods) This is quite easy, also for
complicated constraints but if you want the objects to fit the constraints
very precisely the integration of the equations of movement will be quite
difficult (small stepsize required).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christopher James Huff
Subject: Re: Constrained motion
Date: 1 Oct 2002 10:29:10
Message: <chrishuff-1ADA6D.10262801102002@netplex.aussie.org>
In article <3d99a874@news.povray.org>,
 "Andrew Coppin" <orp### [at] btinternetcom> wrote:

> But... suppose the object is contrained to the X-Y plane. (And let's suppose
> that whatever mechanism "constrains" it has no friction - impossible but
> simpler to compute ;-) What do we do now? Do we just write V = <5, -7, 0>
> and continue as usual? Or does something more ellaborate need to be done?

The component of force perpendicular to the plane can be ignored. If you 
have a perfect horizontal plane and the only force on a ball sitting on 
it is gravity, the ball won't move, and if there is no friction, the 
gravity won't affect the force required to move it in any direction 
parallel to the plane.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Andrew Coppin
Subject: Re: Constrained motion
Date: 1 Oct 2002 10:42:39
Message: <3d99b45f@news.povray.org>
Thanks guys. It seems it's as I thought... at least, if we're talking about
being constrained to a plane.

Now... what happens if my moving particle is contraigned to a sphere? In
other words, there is a mass-less inextensible "string" teathering it to a
fixed point in space. (The force will always be acting in such a way that
the "string" remains taut - there is no possibility of it 'going slack',
which makes things a bit easier.)

If an unconstrained object were acted upon by a resultant force F, it would
accelerate in a path along F. So do I just need to find the nearest curved
path along the sphere? (And gosh, how the hell am I gonna do that? ;-)

Just thought I'd try making my Chaos Pendulum into an actual "penulum" - the
flat view I did was a deliberate simplification.

Thanks.
Andrew.


Post a reply to this message

From: Micha Riser
Subject: Re: Constrained motion
Date: 2 Oct 2002 12:37:00
Message: <3d9b20ac@news.povray.org>
Andrew Coppin wrote:
> Now... what happens if my moving particle is contraigned to a sphere? In
> other words, there is a mass-less inextensible "string" teathering it to a
> fixed point in space. (The force will always be acting in such a way that
> the "string" remains taut - there is no possibility of it 'going slack',
> which makes things a bit easier.)

If the string remains taut the part of the force that is colinear with the 
string will get compensated. In other words the particle will always move 
in the plane perpendicular to the string! This means that all you have to 
do is to project your force into this plane. 

Given n the unit vector which is colinear with the string and f the vector 
of your force, the projection f' of f into the plane is given by:

 f' = f - n*vdot(n,f)

An example: is the string along the y-axe then the normal vector is <0,1,0> 
and therefore:
 f' = f - <0,1,0>*vdot(<0,1,0>,f)
Now vdot(<0,1,0>,f) is equal to f.y and hence:
 f' = f - <0,f.y,0> = <f.x, 0, f.z>

You could also check if the string remains taut by looking if vdot(n,f) is 
negative or positive (you have to fix the direction of n (that means choose 
if it points from from string base to particle or the other way round).

Hope I got this right

- Micha

-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

From: Christopher James Huff
Subject: Re: Constrained motion
Date: 2 Oct 2002 20:24:48
Message: <chrishuff-80994A.20214202102002@netplex.aussie.org>
In article <3d9b20ac@news.povray.org>, Micha Riser <mri### [at] gmxnet> 
wrote:

> If the string remains taut the part of the force that is colinear with the 
> string will get compensated. In other words the particle will always move 
> in the plane perpendicular to the string! This means that all you have to 
> do is to project your force into this plane. 

Not quite...if you move it along a straight line in the direction of 
force, the "string" will get longer and longer with time. You need to 
move it along a curved path:

strLen is the "string" length.
strOrig is the pivot point, the non-moving end of the string.

1: Figure out the force as you said.

2: Compute the distance (partDist) and direction (partDir) the particle 
would move for this time step without any restrictions.

3a: The particle moves the same distance along the surface of a sphere 
with radius == the string length. Compute the angle (angDist) of an arc 
segment with a length == partDist and a radius == strLen. This is the 
angle between the start and end positions from the string origin.

3b: Find a vector perpendicular to the plane of the string and the 
particle direction vector (rotAxis): vcross(partPos - strOrig, partDir)

4: Rotate the particle around strOrig by angDist around the axis 
rotAxis. Use vaxis_rotate() or the Axis_Rotate_Trans() macro.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Andrew Coppin
Subject: Re: Constrained motion
Date: 3 Oct 2002 05:24:57
Message: <3d9c0ce9@news.povray.org>
Late last night I figured out the part that Micha said by myself...
(Typical! You ask for help then figure it out yourself anyway... lol) But
it's more complicated than that...

Will have a go and see where I get to...

Thanks folks!
Andrew.


Post a reply to this message

From: Micha Riser
Subject: Re: Constrained motion
Date: 4 Oct 2002 08:24:00
Message: <3d9d8860@news.povray.org>
Christopher James Huff wrote:

> In article <3d9b20ac@news.povray.org>, Micha Riser <mri### [at] gmxnet>
> wrote:
> 
>> If the string remains taut the part of the force that is colinear with
>> the string will get compensated. In other words the particle will always
>> move in the plane perpendicular to the string! This means that all you
>> have to do is to project your force into this plane.
> 
> Not quite...if you move it along a straight line in the direction of
> force, the "string" will get longer and longer with time. You need to
> move it along a curved path:

Yes, I did not think at this. While the force and also the velocity is 
always perpendicular to the string, you need to correct the error made by 
the Euler method.

I have digged out my sliding macro and adapted it to run with POV-Ray 3.5. 
You can find the source and some examples in p.b.s-f. There I use trace to 
place the slider on the surface again after it has moved. You could use a 
similar thing in your case: trace against the imaginary sphere that limits 
the orbit of the particle.

I have made a pendulum animation (see p.b.animation) with exactly this way. 
The friction force is still as if it would move on the sphere... so it is 
probably not realistic in that respect.

- Micha

-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

From: Christopher James Huff
Subject: Re: Constrained motion
Date: 4 Oct 2002 14:03:06
Message: <chrishuff-28CAF8.13594604102002@netplex.aussie.org>
In article <3d9d8860@news.povray.org>, Micha Riser <mri### [at] gmxnet> 
wrote:

> I have digged out my sliding macro and adapted it to run with POV-Ray 3.5. 
> You can find the source and some examples in p.b.s-f. There I use trace to 
> place the slider on the surface again after it has moved. You could use a 
> similar thing in your case: trace against the imaginary sphere that limits 
> the orbit of the particle.

Well, you could also have normalized the point and multiplied it by the 
length of the string, with the same effect and no need for tracing 
against a sphere.
The problem with these methods is that the particle doesn't travel as 
far when projected onto the sphere like this, so it will constantly be 
slowing down. Computing the angle it would travel if it went the same 
distance along the sphere surface and rotating by that amount avoids 
this, and you are left with mainly precision errors to worry about. 
(though the step size still matters for shifts in direction)

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Micha Riser
Subject: Re: Constrained motion
Date: 4 Oct 2002 14:15:33
Message: <3d9ddac5@news.povray.org>
Christopher James Huff wrote:

> Well, you could also have normalized the point and multiplied it by the
> length of the string, with the same effect and no need for tracing
> against a sphere.

Yes, but my macro allows sliding on arbitrary surfaces, so it needed some 
general approach.

> The problem with these methods is that the particle doesn't travel as
> far when projected onto the sphere like this, so it will constantly be
> slowing down. Computing the angle it would travel if it went the same
> distance along the sphere surface and rotating by that amount avoids
> this, and you are left with mainly precision errors to worry about.
> (though the step size still matters for shifts in direction)
> 

I just scale the velocity after projecting into the surface so that the 
velocity remains the same (if there were no friction).


-- 
objects.povworld.org - The POV-Ray Objects Collection
book.povworld.org    - The POV-Ray Book Project


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.