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

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