POV-Ray : Newsgroups : povray.animations : Vectors POV : Re: Vectors POV Server Time
28 Jul 2024 18:25:19 EDT (-0400)
  Re: Vectors POV  
From: Nils Steinkamp
Date: 1 Jun 1999 06:32:17
Message: <3753a8a1.0@news.povray.org>
Hi there !

I fixed the problem by using

    #declare NX = vnormalize( Punkt_naechster - Punkt_vorher );     // last
and next point
    #declare NZ = vnormalize(vcross(NX,y));
    #declare NY = vcross(NZ,NX);

    object { Test2               // has to declared before
       matrix < NX.x            , NX.y            , NX.z,
                NY.x            , NY.y            , NY.z,
                NZ.x            , NZ.y            , NZ.z,
                Punkt_aktuell.x , Punkt_aktuell.y , Punkt_aktuell.z >  //
the actuell translation
    }

where the basic object is orientated from -x to +x

In this case the x-axis is orientated to the right, y-axis to the top and
z-axis from camera away to the depth of the room. The full code is
downloadable on my site, see adress at the end of the mail.

It works fine, when putting the object on a spline, it is rotated to follow
the spline.

Next step is the proclivity of the object to rotate it in x-axis left when
"flying" a left turn or right when "driving" a left turn.
Not as easy as it seems, but I'm on my way ;-)

Nils

http://www.steini.de


Post a reply to this message

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