POV-Ray : Newsgroups : povray.off-topic : Drunken pathing... : Re: Drunken pathing... Server Time
3 Sep 2024 15:16:35 EDT (-0400)
  Re: Drunken pathing...  
From: Patrick Elliott
Date: 4 Dec 2010 22:12:50
Message: <4cfb0332$1@news.povray.org>
On 12/4/2010 7:50 PM, Patrick Elliott wrote:
> On 12/4/2010 12:22 PM, Le_Forgeron wrote:
>> Le 04/12/2010 20:08, Patrick Elliott nous fit lire :
>>
>>>
>>> Any suggestions?
>>>
>> Change your spline, get a x spline (basic, general or extended) or a tcb
>> spline and adjust some parameter with the damage level.
>
> Hmm. Tcb and General X Spline do both look real interesting. Now to hunt
> down formula on them I can bloody understand. lol

And.. May need help with that. Formula I am using for Catmull is:

P0 = llList2Vector(points,0);
P1 = llList2Vector(points,1);
P2 = llList2Vector(points,2);
P3 = llList2Vector(points,3);

for (t = 0; t < 1; t = t + 0.1)
   NP = 0.5 * ((2 * P1) + (P2 - P0) * t + (2 * P0 - 5 * P1 + 4 * P2 - 
P3) * t * t - (3 * P1 - P0 - 3 * P2 + P3) * t * t * t;

Which I assume is derived from the mess on the bottom of the wiki page 
for them.

     CINTx(p_{-1}, p_0, p_1, p_2) = 1/2 * x ((2-x) x-1)  * p_{-1}
                                          x^2 (3x-5)+2     p_{0}
                                          x ((4-3x) x+1)   p_1
                                          (x-1) x^2        p_2

But, truth told, I don't know how to hell they got from one to the 
other. It only gets worse with Tcb. It looks like the 'D' interpolation 
stuff is going on from the one I was looking at, but I am not sure.. 
Worse, the code example given is a mish mash of *multiple* curve types, 
so its fuzzy as to what belongs to what, and why, and what is being done 
in there too.

Sigh. Some days it seems like I need to go back and take/retake about 6 
years of math. lol

-- 
void main () {
   If Schrödingers_cat is alive or version > 98 {
     if version = "Vista" {
       call slow_by_half();
       call DRM_everything();
     }
     call functional_code();
   }
   else
     call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models, 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

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