POV-Ray : Newsgroups : povray.general : Easy math question Server Time
6 Nov 2024 14:25:02 EST (-0500)
  Easy math question (Message 1 to 5 of 5)  
From: Hugo
Subject: Easy math question
Date: 9 Aug 2002 16:01:43
Message: <3d541fa7@news.povray.org>
Sometimes I feel quite dull... Do you mind if I ask a dull question?  Well
for those who don't mind: I have a vector. How do I rotate a cylindrical
pattern, so it faces towards that vector? Example:

#declare Vector=<257,47,2>;
#declare Origin=<0,0,0>;

cylinder { Origin,Vector, 1
    pigment { cylindrical rotate Vector? }
}

It's so easy, right ... so tell me... :o} I already tried a bunch of things
and I'm getting tired.

Thank you,
Hugo


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Easy math question
Date: 9 Aug 2002 16:27:35
Message: <3d5425b7@news.povray.org>
"Hugo" <hua### [at] post3teledk> schrieb im Newsbeitrag
news:3d541fa7@news.povray.org...

> It's so easy, right ... so tell me... :o} I already tried a bunch of
things
> and I'm getting tired.

Should be easy with the Reorient_Trans(Axis1, Axis2) Macro in
transforms.inc, Axis1 should be y, and Axis2 your Vector. Did not test it,
but IIRC this should work.

Marc-Hendrik


Post a reply to this message

From: Warp
Subject: Re: Easy math question
Date: 9 Aug 2002 16:34:00
Message: <3d542738@news.povray.org>
Use the Reorient_Trans() macro in transforms.inc.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Hugo
Subject: Re: Easy math question
Date: 9 Aug 2002 16:54:03
Message: <3d542beb@news.povray.org>
Thanks guys, I was browsing around math.inc and forgot about
transforms.inc.. It works now, I'm just having some other problems.. Maybe I
should let it go, until I've slept.

Regards,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: Easy math question
Date: 9 Aug 2002 20:51:52
Message: <chrishuff-B53E5E.19420609082002@netplex.aussie.org>
In article <3d5425b7@news.povray.org>,
 "Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote:

> Should be easy with the Reorient_Trans(Axis1, Axis2) Macro in
> transforms.inc, Axis1 should be y, and Axis2 your Vector. Did not test it,
> but IIRC this should work.

Or just use Point_At_Trans(Vector).

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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