POV-Ray : Newsgroups : povray.text.scene-files : VRML tp POV rotations Server Time
22 Dec 2024 18:43:06 EST (-0500)
  VRML tp POV rotations (Message 1 to 3 of 3)  
From: J  Cranmer
Subject: VRML tp POV rotations
Date: 9 Mar 2003 12:59:27
Message: <520n6v8qkgcm23aup1obgfolnoops43eul@4ax.com>
I want to convert some VRML files to PPOV format.  The main problem is
th erotations command.

In VRML youi can rotate about an vector for example

Rotation {  rotation  1 0 1.61803   1.570796326795}   

Has any one got a macro that will convert this to POV format or a
formula for doing this

John


Post a reply to this message

From: Warp
Subject: Re: VRML tp POV rotations
Date: 9 Mar 2003 13:17:07
Message: <3e6b8523@news.povray.org>
J. Cranmer <joh### [at] worldcom> wrote:
> Rotation {  rotation  1 0 1.61803   1.570796326795}   

  You should explain to those who don't know VRML (like me) what that does.

  If that generates a rotation of 1.570796326795 radians around the
axis <1, 0, 1.61803>, then what you need to use is the Axis_Rotate_Trans()
macro (in transforms.inc). (Note that you need to convert the angle to
degrees, which is most easily done with the degrees() function.)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: J  Cranmer
Subject: Re: VRML tp POV rotations
Date: 10 Mar 2003 13:47:25
Message: <u0np6v02rjhbvi74dcmm9f2nsdm63e4kv9@4ax.com>
On 9 Mar 2003 13:17:07 -0500, Warp <war### [at] tagpovrayorg> wrote:

>J. Cranmer <joh### [at] worldcom> wrote:
>> Rotation {  rotation  1 0 1.61803   1.570796326795}   
>
>  You should explain to those who don't know VRML (like me) what that does.
>
>  If that generates a rotation of 1.570796326795 radians around the
>axis <1, 0, 1.61803>, then what you need to use is the Axis_Rotate_Trans()
>macro (in transforms.inc). (Note that you need to convert the angle to
>degrees, which is most easily done with the degrees() function.)

Thanks for the info..I will look at that macro.  I did not know it
esisted.  My understanding of the command is as you have it but I am
checking to make sure.  Clockwise or anticlockwise looking to or from
the origin ??  Left or right handed coordinate system etc etc.

VRML is Virtual Reality Markup (modeling ??) Language.  It was used
for early interactive graphics on the WWW.  I think that it has been
replaced by the more modern graphic programs.  However it was very
good for displaying polyhedra and there at a lot of files for these
out there.  You need a plug in for the browser you are using but then
you can grasp the polyhedra and rotate it how you want.  I just want
to render some of the polyhedra in POVray as the output is so much
better.

John


Post a reply to this message

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