POV-Ray : Newsgroups : povray.animations : clock with polynomial coefficients : Re: clock with polynomial coefficients Server Time
1 Jul 2024 03:05:54 EDT (-0400)
  Re: clock with polynomial coefficients  
From: beowulf
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

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