POV-Ray : Newsgroups : povray.animations : scale an rotate Server Time
24 Nov 2024 09:07:01 EST (-0500)
  scale an rotate (Message 1 to 3 of 3)  
From:
Subject: scale an rotate
Date: 26 Dec 2000 09:06:47
Message: <3a48a5f7$1@news.povray.org>
hello

I want to make an animation.

First I want to scale an Object.
After the Object has scaled the camera should rotate

How can I do this????

thanks
chris


Post a reply to this message

From: Chris Colefax
Subject: Re: scale an rotate
Date: 26 Dec 2000 17:48:44
Message: <3a49204c@news.povray.org>

> I want to make an animation.
>
> First I want to scale an Object.
> After the Object has scaled the camera should rotate

Animation is generally achieved using POV-Ray's internal clock value, which
is a timeline for the scene that (by default) runs from 0 to 1 over the
course of the animation.  You can animate anything using this value in
formulas and such, e.g. for scaling:

   object {MyLittleObject scale 1 + clock*4}

Here the object grows from its original size (scale 1) to 5 times that at
the end of the animation.  For rotation, something similar:

   camera {location <0, 0, -20>
      rotate y*clock*360
      look_at <-1, 5, 2>}

Here the clock location spins around the y-axis a full revolution, but
remains looking at <-1, 5, 2> for the entire animation.

Now, if you want more complicated, multi-stage animations I might suggest
you look at my Automatic Clock Modifier macro file, which allows you to
keyframe practically any aspect of your animation (including floats,
vectors, pigments and textures):

   http://www.geocities.com/ccolefax

There you'll also find a link to a great animation tutorial by Steve
Strickland, and a tutorial for my Spline Macro file that offers full support
for animation.


Post a reply to this message

From: Bob H 
Subject: Re: scale an rotate
Date: 26 Dec 2000 20:15:38
Message: <3a4942ba@news.povray.org>
Specifically, you would be using something like this for doing ranges with the
Clock Modifier include file:

#declare clock_start=0;
#declare clock_finish=0.5; // ends where other begins
#include "clockmod.inc"
#declare Scaled=1+mclock*3; // whatever

#declare clock_start=0.5; // begins where other left off
#declare clock_finish=1;
#include "clockmod.inc"
#declare Rotated=mclock*360; // whatever

object { YourObject  scale <Scaled,Scaled,Scaled> }

camera { location <0,0,-10>
 rotate <0,Rotated,0>
 look_at 0 }


Or this using the Auto Clock macro (still need the include file in Library
path):

#include "autoclck.mcr"

object { YourObject  scale From ( 0, <1,1,1> ) To ( 0.5, <4,4,4> ) }

camera { location <0,0,-10>
 rotate From ( 0.5, <0,0,0> ) To ( 1, <0,360,0> )
 look_at 0 }

The first numbers in parentheses are the clock values you want.
Second numbers are the floats or vectors of the amounts you want changed.

Bob H.


Post a reply to this message

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