POV-Ray : Newsgroups : povray.programming : sine/cosine and exponents with animations? : Re: sine/cosine and exponents with animations? Server Time
28 Jul 2024 22:16:51 EDT (-0400)
  Re: sine/cosine and exponents with animations?  
From: Juha Leppälä
Date: 30 Apr 1999 05:58:21
Message: <372970D4.6D3AE8FB@kolumbus.fi>
Lounento wrote:
> 
> Hi,
> I've done some expirement animations with Povray, but have been missing a
> couple of useful features. In order to make objects to move smoothly, the
> object has to have a mathematical function that define the object's path.
> Sine/cosine and exponent functions would be of great help there. Although
> you can type "clock*clock" to make it a parabel, an exponent feature would
> be much easier to use and it would also make possible to take the square
> root (x^.5).
> One other improvement would be an animation script through which you could
> set individual enviroment for every frame of the animation.
> For example: ball bouncing on th floor. The ball loses energy every time it
> bounces from the floor (of course also in the air, but that's minimal) and
> the maximal altitude lowers. A function which describes this is
> y=<max.altitude>*sin x, where <max. altitude> is an individual value for
> every bounce. It's value should be calculated for every bounce, not for
> every frame.
> 
> This ball is one example, which would gain advantidge of all of those
> features I'm missing:
> 1) sine function
POV has this, RTFM

> 2) ability to use exponent in scene language
POV has this, RTFM

> 3) a separate script file, which would control animation (for example:
> calculate multipliers)
POV has this as of 3.1, if you have it then RTFM. Otherwise go get it
 
> If someone has different solutions I'd gladly like to know about them.
> 
> Htl

I'm sorry but this is just a gross example of not reading the manual.
POV-Ray knows sin, cos and all that.

<Snippets from the manual>
cos(A) Cosine of A. Returns the cosine of the angle A, where A is
measured in radians.

sin(A) Sine of A. Returns the sine of the angle A, where A is measured
in radians. 

pow(A,B) Exponentiation. Returns the value of A raised to the power B.

sqrt(A) Square root of A. Returns the value whose square is A. 

<End snippet>

I didn't include the file handling routines, go read em yourself if you
need em. Please do read the whole manual :P



Post a reply to this message

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