POV-Ray : Newsgroups : povray.general : alligning a torus Server Time
1 Nov 2024 17:21:12 EDT (-0400)
  alligning a torus (Message 1 to 2 of 2)  
From: JWV
Subject: alligning a torus
Date: 17 Aug 2004 11:08:09
Message: <41221f59@news.povray.org>
hello,

I am having some problems with rotating a torus. I have a vector, and a
torus in the scene, and I want the torus rotated in such a way that the
"normal"of the torus is equal to V1. Should this be done  manualy, or is
there some sort of macro/trick for it?

Here is the code to explain what i mean:

#declare V1=<10,3,-10>; //or any other vector

cylinder{0,V1,0.1 pigment{Green}}

#union{
torus{0.5,0.1}
cylinder{0,y,0.1}//"normal" of the torus
pigment{Red}
rotate ???????
}

So, what I am trying to do is making te red cylinder pointing in the same
direction as the green one.

I hope someone can help me,

Greetings,

JWV


Post a reply to this message

From: ABX
Subject: Re: alligning a torus
Date: 17 Aug 2004 11:10:41
Message: <ar74i0hsnnmaulrk0c46pbsgami70pfmos@4ax.com>
On Tue, 17 Aug 2004 17:08:13 +0200, "JWV" <jwv|at|planet.nl> wrote:
> I am having some problems with rotating a torus.

I suppose you are looking for Reorient_Trans() macro which is described at
http://www.povray.org/documentation/view/3.6.1/488/

ABX


Post a reply to this message

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