POV-Ray : Newsgroups : povray.general : rotation around arbitary axis? Server Time
6 Aug 2024 23:23:06 EDT (-0400)
  rotation around arbitary axis? (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
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

From: Sebastian H 
Subject: Re: rotation around arbitary axis?
Date: 14 Feb 2002 08:29:11
Message: <3C6BBC09.7080700@web.de>
Bill DeWitt wrote:
> "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...
> 
> 
> 

Damn, didn't expected such confusion, I have to formulate my question 
better. :-))

What I wanted is a function like "rotate 90*x" but for "x" an arbitary 
vector.


your name the right way?) I took a look at transforms.inc where there is 
a macro "Axis_Rotate_Trans(Axis, Angle)" which does exactly this.

So again rtfm! :-)

Sebastian H.


Post a reply to this message

From:
Subject: Re: rotation around arbitary axis?
Date: 14 Feb 2002 08:42:14
Message: <qbfn6u8ur20alldb2m10v3jbpc1icm6v3c@4ax.com>
On Thu, 14 Feb 2002 14:30:49 +0100, "Sebastian H." <seb### [at] webde> wrote:
> Following the hint from W?odimirez ABX Skiba (Does my Newsreader show 
> your name the right way?)

rather something like Wlodzimierz ABX Skiba
or just ABX

> I took a look at transforms.inc where there is 
> a macro "Axis_Rotate_Trans(Axis, Angle)" which does exactly this.

you can have fast preview what each include file contains if you install my
Insert Menu Bonus Pack (http://www.abx.art.pl/pov/bonus/pack.php)
(oh, you are using linux ? then convert structure of directiories with txt
files in this package into one file)

ABX


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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