POV-Ray : Newsgroups : povray.advanced-users : Random rotation Server Time
24 Nov 2024 21:38:49 EST (-0500)
  Random rotation (Message 1 to 6 of 6)  
From: Andrew the Orchid
Subject: Random rotation
Date: 13 Nov 2004 05:23:46
Message: <4195e0b2$1@news.povray.org>
Does anyone have any idea how I can make an object rotate randomly?

Making an object rotate about a random axis is easy enough. But I want 
the axis to *change* over time.

I could use the old trick of rotating about several axies at different 
speeds to make it /look/ random... Does anyone have a better idea?

Andrew.


Post a reply to this message

From: Rune
Subject: Re: Random rotation
Date: 13 Nov 2004 05:45:55
Message: <4195e5e3$1@news.povray.org>
Andrew the Orchid wrote:
> Does anyone have any idea how I can make an object rotate randomly?
>
> Making an object rotate about a random axis is easy enough. But I want
> the axis to *change* over time.

Hmm. Maybe having the object rotated 180 degrees around a changing axis that 
you get from the vturbulence() function? Even though the 180 degrees don't 
change over time, it will look like the object is rotating randomly, I 
think.

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Random rotation
Date: 13 Nov 2004 06:07:33
Message: <4195eaf5@news.povray.org>
> Hmm. Maybe having the object rotated 180 degrees around a changing axis that 
> you get from the vturbulence() function? Even though the 180 degrees don't 
> change over time, it will look like the object is rotating randomly, I 
> think.

Hmm... vturbulence? Sounds interesting... I'll go look that up.

Andrew.


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Random rotation
Date: 13 Nov 2004 06:09:55
Message: <4195eb83$1@news.povray.org>
Hmm, yes, that appears to do what I need. I can just feed it with a 
point that varies (linearly) over time, and the axis of rotation will 
vary. And because it's a turbulence function, it will vary smoothly. 
Nice job!

(Only problem is... hope the vector doesn't ever come out as zero... :-/)

Andrew.


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Random rotation
Date: 13 Nov 2004 07:00:02
Message: <4195f742@news.povray.org>
WOOOOW!

TRIPPIFY YOUR MIND BABY! :-D

Simply add
   rotate 180*vturbulence(2, 0.5, 1, frame_number/100)
to any object for a tripposcopic experience. :-)

(I have a camera inside a hollow checkered cube, rotating to the power 
of vturbulence. It's... um... fantastic. In fact, I might post it in 
it's own right. [Was to be a kind of "environment map" to pick up the 
reflectiveness of some objects - but it kinda kills the render time.])

w00t!


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Random rotation
Date: 13 Nov 2004 10:33:36
Message: <41962950$1@news.povray.org>
See povray.binaries.animations ;-)


Post a reply to this message

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