POV-Ray : Newsgroups : povray.general : Need help figuring something out : Re: Need help figuring something out Server Time
1 Aug 2024 02:19:03 EDT (-0400)
  Re: Need help figuring something out  
From: Daniel Nilsson
Date: 2 May 2006 14:19:15
Message: <4457a2a3@news.povray.org>
DJ Wiza wrote:
> I just implemented my method.  It was actually extremely easy to 
> implement.  Rather than taking a weighted average of two integers and 
> creating a vector on that, I created two vectors, and created a weighted 
> average of those.
> 
> It works.  The corkscrew problem works out, and loops work, but really 
> tight loops (As in, very little lateral movement) have a slight glitch 
> when it goes vertical.
 >
> I'm about to post the latest track to p.b.animations.  You'll see it there.

First I must say I like your animations, keep up the good work!

About the interpolation I think I understand the problem you have at the 
vertical point in the loop. You are just linearly interpolating the x, y 
& z values of the up-vector and than normalizing the result, right? So 
if the first vector is close to straight up and the second close to 
straight down there is a point near t=0.5 where the vector is close to 
the zero-vector before normalization and then normalization makes errors 
show up.
One way to fix the problem is to us quaternion interpolation. 
Quaternions is an extension of complex numbers to 4D and are good for 
representing rotations in 3D. Try google for "quaternion interpolation".
I found this include file that may be of interest:
http://news.povray.org/Xns940C86DC9B1D4None%40204.213.191.226

The spherical interpolation that Tim Nikias talks about in 
http://news.povray.org/44480022%40news.povray.org may also be of use to you.

Hope you solve your problems because I'm looking forward to a cool ride...

-- 
Daniel Nilsson
Long time lurker


Post a reply to this message

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