POV-Ray : Newsgroups : povray.general : rotation around arbitary axis? Server Time
6 Aug 2024 19:30:33 EDT (-0400)
  rotation around arbitary axis? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Sebastian H 
Subject: rotation around arbitary axis?
Date: 12 Feb 2002 16:36:44
Message: <3C698B4C.6030504@web.de>
When just reading a bit about quaternions and that stuff
I was wondering if I could make Pov rotate any object around an arbitary 
axis (not around X,Y,Z).


This has surely been discussed before or I've just missed it in the 
docs, but how is it?

Sebastian H.


Post a reply to this message

From: Bill DeWitt
Subject: Re: rotation around arbitary axis?
Date: 12 Feb 2002 16:52:36
Message: <3c698ea4$1@news.povray.org>
"Sebastian H." <seb### [at] webde> wrote in message
news:3C6### [at] webde...
> When just reading a bit about quaternions and that stuff
> I was wondering if I could make Pov rotate any object around an arbitary
> axis (not around X,Y,Z).
>
>
> This has surely been discussed before or I've just missed it in the
> docs, but how is it?

    vaxis_rotate???


Post a reply to this message

From: Christopher James Huff
Subject: Re: rotation around arbitary axis?
Date: 12 Feb 2002 17:35:13
Message: <chrishuff-04E7D0.17345612022002@netplex.aussie.org>
In article <3c698ea4$1@news.povray.org>,
 "Bill DeWitt" <bde### [at] cflrrcom> wrote:

>     vaxis_rotate???

vaxis_rotate() is a function that operates on vectors. There are a few 
macros available that will generate a transform for rotating objects 
around any axis (do a search on the scene file groups here, or look in 
the povray.org link pages), and one is included in the POV 3.5 standard 
includes.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Bill DeWitt
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 01:30:08
Message: <3c6a07f0$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> In article <3c698ea4$1@news.povray.org>,
>  "Bill DeWitt" <bde### [at] cflrrcom> wrote:
>
> >     vaxis_rotate???
>
> vaxis_rotate() is a function that operates on vectors. There are a few
> macros available that will generate a transform for rotating objects
> around any axis (do a search on the scene file groups here, or look in
> the povray.org link pages), and one is included in the POV 3.5 standard
> includes.

    Maybe I misunderstood the question.

#declare Sphere1 = x;
#declare Sphere2 = vaxis_rotate(Sphere1, 1, 360*clock);

   sphere { Sphere1, 0.4 pigment { rgb x } } // the object
   sphere { Sphere2, 0.5 pigment { rgb y } } // the rotated object
   cylinder { 0, 1, 0.25 pigment { rgb z } } // the arbitrary axis


Post a reply to this message

From:
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 03:25:35
Message: <7b8k6u09e18dl5gn1m14qk26elgu6bthmb@4ax.com>
On Tue, 12 Feb 2002 22:38:20 +0100, "Sebastian H." <seb### [at] webde> wrote:
> When just reading a bit about quaternions and that stuff
> I was wondering if I could make Pov rotate any object around an arbitary 
> axis (not around X,Y,Z).

Sure, do following steps:
1. Download, install and start current beta of 3.5
2. Write at begining of your scene
    #include "transforms.inc"
3. Call macro in object modifiers list of your object:
    Axis_Rotate_Trans(Axis, Angle)

> This has surely been discussed before or I've just missed it in the 
> docs, but how is it?

If you not use 3.5 then look at http://enphilistor.users4.50megs.com/macs.htm
There is macro AxisRotate - afaik result is the same.

ABX


Post a reply to this message

From: Sebastian H 
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 06:46:00
Message: <3C6A5258.3070108@web.de>

> On Tue, 12 Feb 2002 22:38:20 +0100, "Sebastian H." <seb### [at] webde> wrote:
> 
>>When just reading a bit about quaternions and that stuff
>>I was wondering if I could make Pov rotate any object around an arbitary 
>>axis (not around X,Y,Z).
>>
> 
> Sure, do following steps:
> 1. Download, install and start current beta of 3.5
> 2. Write at begining of your scene
>     #include "transforms.inc"
> 3. Call macro in object modifiers list of your object:
>     Axis_Rotate_Trans(Axis, Angle)
> 
> 
>>This has surely been discussed before or I've just missed it in the 
>>docs, but how is it?
>>
> 
> If you not use 3.5 then look at http://enphilistor.users4.50megs.com/macs.htm
> There is macro AxisRotate - afaik result is the same.
> 
> ABX
> 

Ah, ok that is what im looking for.


Post a reply to this message

From: Christopher James Huff
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 09:19:15
Message: <chrishuff-58548D.09190113022002@netplex.aussie.org>
In article <3c6a07f0$1@news.povray.org>,
 "Bill DeWitt" <bde### [at] cflrrcom> wrote:

>     Maybe I misunderstood the question.
> 
> #declare Sphere1 = x;
> #declare Sphere2 = vaxis_rotate(Sphere1, 1, 360*clock);
> 
>    sphere { Sphere1, 0.4 pigment { rgb x } } // the object
>    sphere { Sphere2, 0.5 pigment { rgb y } } // the rotated object
>    cylinder { 0, 1, 0.25 pigment { rgb z } } // the arbitrary axis

Now rotate a sphere with a patterned texture. Or rotate a box, or a 
julia fractal.
Vectors aren't always enough, which is why the axial rotation macro is 
included with 3.5.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Bill DeWitt
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 13:39:36
Message: <3c6ab2e8@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> In article <3c6a07f0$1@news.povray.org>,
>  "Bill DeWitt" <bde### [at] cflrrcom> wrote:
>
> >     Maybe I misunderstood the question.
> >
> > #declare Sphere1 = x;
> > #declare Sphere2 = vaxis_rotate(Sphere1, 1, 360*clock);
> >
> >    sphere { Sphere1, 0.4 pigment { rgb x } } // the object
> >    sphere { Sphere2, 0.5 pigment { rgb y } } // the rotated object
> >    cylinder { 0, 1, 0.25 pigment { rgb z } } // the arbitrary axis
>
> Now rotate a sphere with a patterned texture. Or rotate a box, or a
> julia fractal.

#declare Sphere1 = x;
#declare I = 0;
#while ( I < 1 )

#declare Sphere2 = vaxis_rotate(Sphere1, 1, 360*I) ;
   // the object
   sphere { Sphere1, 0.4 pigment { checker scale .1 } }
   // the rotated object
   sphere { 0, 0.2 pigment { checker scale .1 } translate Sphere2 }
   // box rotated twice as far out
   box { -0.25, 0.25 pigment { bozo scale .1 } translate Sphere2*2 }
   // the arbitrary axis
   cylinder { 0, 1, 0.25 pigment { rgb y } }
   // insert your own fractal here...
#declare I = I + 0.1;
#end


Post a reply to this message

From: Christopher James Huff
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 14:05:36
Message: <chrishuff-63D2E8.14052213022002@netplex.aussie.org>
In article <3c6ab2e8@news.povray.org>,
 "Bill DeWitt" <bde### [at] cflrrcom> wrote:

> #declare Sphere1 = x;
> #declare I = 0;
> #while ( I < 1 )
> 
> #declare Sphere2 = vaxis_rotate(Sphere1, 1, 360*I) ;
>    // the object
>    sphere { Sphere1, 0.4 pigment { checker scale .1 } }
>    // the rotated object
>    sphere { 0, 0.2 pigment { checker scale .1 } translate Sphere2 }
>    // box rotated twice as far out
>    box { -0.25, 0.25 pigment { bozo scale .1 } translate Sphere2*2 }
>    // the arbitrary axis
>    cylinder { 0, 1, 0.25 pigment { rgb y } }
>    // insert your own fractal here...
> #declare I = I + 0.1;
> #end

None of those are rotated at all, they all stay in their original 
orientation. All translate will do is change their location. You can 
make a ring of them, but you can't rotate them with vaxis_rotate().
Now, you could use vaxis_rotate together with the Reorient_Trans() 
macro, but that's just making it hard for yourself...why not just use 
the Axis_Rotate_Trans() macro?

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Bill DeWitt
Subject: Re: rotation around arbitary axis?
Date: 13 Feb 2002 14:13:46
Message: <3c6abaea$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote :
>
> None of those are rotated at all, they all stay in their original
> orientation.

    Then maybe I did misunderstand the question, I thought he wanted to
rotate an object -around- the axis, not rotate the -object- around an
axis.... uh... what ever that means...


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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