POV-Ray : Newsgroups : povray.advanced-users : Constrained motion : Re: Constrained motion Server Time
29 Jul 2024 06:23:06 EDT (-0400)
  Re: Constrained motion  
From: Christopher James Huff
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

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