POV-Ray : Newsgroups : povray.newusers : Re: Vibrate objects in animation : Re: Vibrate objects in animation Server Time
30 Jul 2024 02:15:54 EDT (-0400)
  Re: Vibrate objects in animation  
From: Oleguer Vilella
Date: 26 Nov 2004 11:16:12
Message: <41a756cc@news.povray.org>
Yes, but your function is:
======================================
#include "transforms.inc"

#declare damping = 5;
#declare frequenci = 5;
#declare framerate = 25;
#declare frames = 100;

#declare xvibrate =
distance*cosd(clock*360*(frames/framerate)*frequenci*pow(2.817,-clock*(frame
s/framerate)*damping);
=======================================
xvibrate is  the name of the function, so, why I can not  write "object {
Prot translate <xvibrate, 0, 0> }"?

If I put this:
=======================================
object { Prot translate
<cos(clock*2*pi*(frames/framerate)*frequenci)*pow(2.817,-clock*(frames/frame
rate)*damping), 0, 0> }

#declare damping = 5;
#declare frequenci = 5;
#declare framerate = 25;
#declare frames = 100;
=======================================
The program gives me this error: " Expected numeric expression, undeclared
identifier frames found instead.
Why this error? I have declared it above.

All my objects are:
=======================================
 object { ROM2 translate <0, 0, 0> translate <0.5*pi*clock, 0.2*pi*clock,
0> }
object { RHO1 translate <0, -0.2, 0> translate <-0.3*pi*clock, 0.2*pi*clock,
0> }
object { PKC1 translate <0, 0, 0> translate <0.3*pi*clock, 0.2*pi*clock,
0> }
object { BCK1 translate <0, 0, 0> translate <-0.31*pi*clock, 0.18*pi*clock,
0> }
object { MKK1_MKK2 translate <0, 0, 0> translate <0.2*pi*clock,
0.18*pi*clock, 0>}
object { Slt2 translate <-0.3*pi*clock, 0.2*pi*clock, 0> translate <0, -0.5,
0> }

object { Prot }
=======================================

Thanks for the help,
Oleguer





news:web.41a6923ffa0d3b25fce34a90@news.povray.org...
> > Why I can not write this:
> > ======================================
> > rotate <xvibrate, 0, 0>?
> > ======================================
> > It gives me an error.
>
> the cosd function requires that transforms.inc has been included into the
> script
> the other way is to use not worrying about transforms.inc
> cos(clock*2*pi*[rest_of_function]) instead of
> cosd(clock*360*[rest_of_function])
>
> #include "transforms.inc"
> > > #declare damping = 5;
> > > #declare frequency = 5;
> > > #declare framerate = 25;
> > > #declare frames = 100
> > >
> #declare xvibrate = [distance or rotation
>
angle]*cosd(clock*360*(frames/framerate)*frequency)*pow(2.817,-clock*(frames
/framerate)*damping);
>
>
>


Post a reply to this message

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