POV-Ray : Newsgroups : povray.animations : clock with polynomial coefficients Server Time
1 Jun 2024 10:35:52 EDT (-0400)
  clock with polynomial coefficients (Message 1 to 5 of 5)  
From: beowulf
Subject: clock with polynomial coefficients
Date: 6 Jul 2005 03:55:00
Message: <web.42cb8db563e84067f16a95070@news.povray.org>
hello,

need to produce an animation by changing the coefficients of a polynomial.
just using clock in poly{} doesn't work. what do you suggest? thank you


Post a reply to this message

From: Warp
Subject: Re: clock with polynomial coefficients
Date: 6 Jul 2005 07:06:52
Message: <42cbbb4c@news.povray.org>
beowulf <csa### [at] uibkacat> wrote:
> just using clock in poly{} doesn't work.

  What do you mean it doesn't work? Does it give an error? What?
  Can you give a small example scene?

-- 

                                                          - Warp


Post a reply to this message

From: beowulf
Subject: Re: clock with polynomial coefficients
Date: 6 Jul 2005 09:15:00
Message: <web.42cbd87cebc7c478ea0b2e400@news.povray.org>
"doesn't work" means that it produces always the same picture (with clock
=0). example scene follows tomorrow if necessary.


Post a reply to this message

From: beowulf
Subject: Re: clock with polynomial coefficients
Date: 7 Jul 2005 03:00:01
Message: <web.42ccd1a3ebc7c478f16a95070@news.povray.org>
here is the whole scene:

   //------------------------------------------------------------------
//
//      Ejemplo Luis (Discriminante de Saito):
256*z3-128*x2*z2+16*x4*z+144*x*y2*z-4*x3*y2-27*y4
//
//------------------------------------------------------------------

#include "colors.inc"

//------------------------------------------------------------------
//
//   Transformation SwapCoords allows you to work with standard
//   notation for algebraic equations but visualize in
//                                z
//                                |
//                                |
//                               /
//                              /
//                             y     x
//------------------------------------------------------------------


#declare SwapCoords = transform { matrix < 0,0,1, 1,0,0, 0,1,0, 0,0,0 > }
#declare SwapCoordsInverse = transform { matrix < 0,1,0, 0,0,1, 1,0,0, 0,0,0
> }


//------------------------------------------------------------------
//
//      correct position is given by SwapCoordsInverse*POV_position
//      be sure that all specified coords are >= 0 since camera
//      has to be in first octant
//
//------------------------------------------------------------------

#declare c=1/180;
#declare a=144-2 + clock*c;
#declare b=256 - 2+ clock*c;


//#declare a=144-2 + 4*clock*1/180;
//#declare b=256 - 2 + 4*clock*1/180;

#declare camera_x_position= -1.5;
#declare camera_y_position=-0;
#declare camera_z_position= -.3;
#declare cameraposition = < camera_y_position, camera_z_position,
camera_x_position>;
#declare lookat_x=0;
#declare lookat_y=0;
#declare lookat_z=0.3;
#declare cameralookat = <lookat_y, lookat_z, lookat_x>;

camera {orthographic
        location cameraposition
        look_at cameralookat
        angle 70
        }

//------------------------------------------------------------------

//------------------------------------------------------------------

// this is for orientation
 #declare axes_radius = 0.00;
 #declare axes_length = 4;
 object { cylinder { 0*x,  axes_length*x,  axes_radius texture { pigment {
color Red filter 0.0} }
          finish { ambient rgb <1.0,0.0,0.0> phong 0.9 metallic} }
transform SwapCoords }
 object { cylinder { 0*y,  axes_length*y,  axes_radius texture { pigment {
color Green filter 0.0} }
          finish { ambient rgb <0.0,1.0,0.0> phong 0.9 metallic} } transform
SwapCoords }
 object { cylinder { 0*z,  axes_length*z,  axes_radius texture { pigment {
color Blue filter 0.0} }
          finish { ambient rgb <0.0,0.0,1.0> phong 0.9 metallic} } transform
SwapCoords }
//------------------------------------------------------------------


//------------------------------------------------------------------
//
//
//      Objects
//
//
//------------------------------------------------------------------


#declare bound_cylinder_radius = 1.5;
#declare bound_cylinder = cylinder { < 0, 0, -1.6>, < 0, 0, 1.6>,
bound_cylinder_radius }

#declare bound_sphere_radius = 1.15;
#declare bound_sphere = sphere { <0,0,.2>, bound_sphere_radius }


object {
 poly {
  5,
   <0, 0, 16, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0,
0, 0, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   -27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, b, 0, 0, 0>
   sturm
  texture { pigment { color 0.5*Turquoise+0.6*LightBlue+.2*Blue filter 0} }
  bounded_by { bound_sphere}
  clipped_by { bounded_by }
  finish { ambient 0.2 phong 1 specular 0.5 roughness 0.00001 metallic} }
  transform SwapCoords}

#declare clip_sphere_radius = 1.5;
#declare clip_sphere_shift = 0;
#declare clip_sphere =  sphere { <clip_sphere_shift, clip_sphere_shift, 0>,
clip_sphere_radius };
#declare clip_sphere_radius_plane = 1.2;
#declare clip_sphere_shift_plane = 0;
#declare clip_sphere_plane =  sphere { <clip_sphere_shift_plane,
clip_sphere_shift_plane, 0>, clip_sphere_radius_plane };

//object{
 //    plane { y, 0
//     pigment { color Green filter 0.0}
//       finish { ambient 0.5 phong 1 specular 1 roughness 0.00005 metallic
brilliance 1}
//      clipped_by{ clip_sphere_plane}
//      bounded_by{ clipped_by} }
//transform SwapCoords}



object {light_source { < 0, 0, -.6> color Yellow shadowless  } transform
SwapCoords }
//object {light_source { < 0, 0, 1> color Orange shadowless  } transform
SwapCoords }
object {light_source { < 2, 3, 0> color Yellow shadowless  } transform
SwapCoords }
object {light_source { < 2, 3, 0> color White shadowless  } transform
SwapCoords }
//object {light_source { < 2,-7, 7 > color 1.5*White } transform SwapCoords
}
//object {light_source { < 0.7, 1, -0.3> color 0.55*White} transform
SwapCoords }
//object {light_source { < 0, 0,2> color 0.9*Turquoise shadowless} transform
SwapCoords }

//object {light_source { < 0, 0, 4> color Red shadowless} transform
SwapCoords }
//object {light_source { < -0.5, 0, 2> color Pink shadowless} transform
SwapCoords }
//object {light_source { < 7, -2, -4> color Turquoise shadowless} transform
SwapCoords }
//object {light_source { < +1, -3, -1> color Gray shadowless} transform
SwapCoords }
//object {light_source { < +5, 5, 0> color Blue shadowless} transform
SwapCoords }

//object {light_source { < 0, 0, 4> color SpicyPink shadowless} transform
SwapCoords }
//object {light_source { < 5, 4, -4> color Violet shadowless} transform
SwapCoords }


Post a reply to this message

From: Mike Williams
Subject: Re: clock with polynomial coefficients
Date: 7 Jul 2005 04:08:49
Message: <P5NwBKAHMOzCFwIE@econym.demon.co.uk>
Wasn't it beowulf who wrote:
>here is the whole scene:
...
>#declare c=1/180;
>#declare a=144-2 + clock*c;
>#declare b=256 - 2+ clock*c;

It just so happens that this particular polynomial looks the same when a
and b change from 142,254 to 142.006,254.006. POV is animating it
correctly but it doesn't happen to move.

In general, you'd expect most polynomials to look pretty much the same
when you change a couple of parameter values by 0.004%.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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