POV-Ray : Newsgroups : povray.binaries.animations : Creating tunnels... (MPGs, 2x126 kb) : Re: Creating tunnels... (MPGs, 2x126 kb) Server Time
19 Jul 2024 01:02:49 EDT (-0400)
  Re: Creating tunnels... (MPGs, 2x126 kb)  
From: Rune
Date: 11 Feb 2004 05:17:53
Message: <402a0151$1@news.povray.org>
Tim Nikias v2.0 wrote:
> My approach was to simply take the direction it
> should point to, and rotate the face of the disc
> to align with the normal.

How is the disc oriented before this rotation? I suppose you just start
with a standard orientation, like facing in the z direction, and then
rotate it to be aligned with the normal? This would give the jagged look
you talk about.

The trick here is to not start out with a standard orientation, but
instead start out with the orientation of the previous circle and rotate
that one so that it is aligned with the normal.

In order for this to make sense you need of course to keep completely
track of the orientation of the circles, not just their normals. For
example, if the normal of each circle is "forward" then you additionally
need to have an "up" direction for each circle, which could be the place
where the first node is build. The point now is that for each circle you
take the forward and up vectors from the previous circle and rotate them
both by the same amount around the same axis in such a way that the new
forward vector is aligned with the spline.

This method is rather simple, since instead of correcting the twisting,
you prevent the twisting from happening in the first place. Let me know
if you need more details.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Jan 29**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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