POV-Ray : Newsgroups : povray.binaries.images : Debug my mesh2 macro! : Re: Debug my mesh2 macro! Server Time
5 Nov 2024 08:24:13 EST (-0500)
  Re: Debug my mesh2 macro!  
From: Charles C
Date: 2 Oct 2007 17:30:00
Message: <web.4702b6cfb4a2659cc667cf480@news.povray.org>
"gregjohn" <pte### [at] yahoocom> wrote:
> I've been working on a macro to do character animation. It is similar to
> Mike Williams' sweep mesh work, only this one allows for any spline as the
> cross section along each point. Thus  instead of a "worm" one can have a
> thigh shape, a calf muscle shape, a lower calf shape, etc.   It may also
> seem like I'm doing a bunch of funny business with redefining my splines
> back and forth, but this allows me to have a smoothly varying radius.
>
> But as you can see, something is going haywire when it has to bend over!
>
> (scene file to p.b.s-f.  image file to p.b.i.)

I don't have time to look at your code at the moment, but I hope to later.
The way I'm handling it though is to use two vectors for each bone, one for
direction and length and another (perpendicular) vector for
orientation/twist.  For a spine/backbone a series of vector pairs turn into
a pair of 'parallel' splines with orientation explicitly defined the whole
way by the 2nd spline.   For limbs, I'm not using two splines, but I'm
using the 'bones' more directly.

I'm not using vorient_transform (sp), but instead using a macro which
figures sequential x y and z rotations based on two vectors assumed to have
the purposes described above.  The key is that for each angle check in the
macro, vectors are checked to see which side of 0 they're on to see which
direction to rotate by.

Charles


Post a reply to this message

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