POV-Ray : Newsgroups : povray.general : Transform to a spline without loop-de-loops : Transform to a spline without loop-de-loops Server Time
29 Jul 2024 14:16:01 EDT (-0400)
  Transform to a spline without loop-de-loops  
From: gregjohn
Date: 8 Mar 2011 22:05:00
Message: <web.4d76ee3b27f8363e34d207310@news.povray.org>
I'm not posting (soley) to brag about an animation.  I've got my character
walking system set up to walk along any spline, so I figured I'd try it in 3D. I
found code for the curve of a baseball seam and set it to go:

http://www.youtube.com/watch?v=Fh2pIMN3ZlQ

Does anyone have any ideas on how I can prevent the loop-de-loops? I'd like to
have it always pointing outwards from the circle.

Given a bodypath spline, I go:

#declare bodypos0=<0,0,0>+bodypath(clock) ;  // the bo
#declare bodypos1=<0,0,0>+bodypath(clock+1e-4);
#declare bodylocalz=bodypos1-bodypos0;
#declare bodylocalx=vcross(-y,bodylocalz);

object{body  Reorient(z+0.0001,bodylocalz)  translate bodypos0 }


I guess my problem is in my vcross statement.


Post a reply to this message

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