POV-Ray : Newsgroups : povray.advanced-users : Constrained motion : Re: Constrained motion Server Time
29 Jul 2024 06:24:10 EDT (-0400)
  Re: Constrained motion  
From: Micha Riser
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

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