POV-Ray : Newsgroups : povray.text.scene-files : Just messing around.. Server Time
28 Jun 2024 22:55:21 EDT (-0400)
  Just messing around.. (Message 1 to 1 of 1)  
From: Tom Stone
Subject: Just messing around..
Date: 23 Jul 2002 20:28:05
Message: <3D3DF42A.D31A3DDB@swipnet.se>
...by randomly putting together items from the docs. The following
thingie became rather nice, even though I put together it without really
knowing what I was doing. Needs to be rendered with more than 150 frames
(24 frames/second), otherwise it will be too fast.

Sorry for the messy code, but as I said; I don't really know what I've
done :-)

Tom Stone

//---Testfunctions.pov-----------------------------------------------------

//Tom Stone 2002-07-24

#include "colors.inc"
#include "textures.inc"
#include "functions.inc"
#include "math.inc"

background { color rgb <0.1, 0.3, 0.8> }

cylinder{
-2*y, -0.01*y, 7
texture{pigment{Green}}
}
#declare Aclock=clock;
#declare
Liten=vaxis_rotate(<3,0,0>,<0,0,1>,360*3*Aclock);
//trying out vaxis_rotate
#declare Mellan =vaxis_rotate(Liten,<0.2,0.4,0.6>,360*2*Aclock);
#declare Stor =vaxis_rotate(Mellan,<0,4,0>,360*Aclock);
#declare Stor =Stor*<2.2,0.8,1.2>;
#declare Stor =Stor+<0,11.6,0>;

#declare Snurr=0;
#while (Snurr < 360)
#declare Varia=Mellan/4;
#declare Plats1=vaxis_rotate(<6,0,0>,<0,1,0>,Snurr);
#declare Topp=VWith_Len(Stor-Plats1,
8.5+Varia.z+Varia.y)+Plats1;            //trying out VWith_Len

#declare BallCount = 0;
#declare BallNumber = 67;
#while (BallCount < BallNumber)
#declare BallMove = BallCount/BallNumber;
  sphere {
    <Interpolate(BallMove, 0, 1, Plats1.x, Topp.x,
1),                                       //Trying out interpolate
macros
    Interpolate(BallMove, 0, 1, Plats1.y, Topp.y+Varia.x, 0),
    Interpolate(BallMove, 0, 1, Plats1.z, Topp.z, 2)>,
    0.22
    texture{pigment{Red}}
  }
  #declare BallCount = BallCount+1;
#end

#declare Snurr=Snurr+43;
#end


light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  looks_like { sphere { 0*x, 0.4 pigment { White } } }
  translate Stor
}
light_source {
  0*x                  // light's position (translated below)
  color rgb <0.76,0.76,0.84>    // light's color
  translate <2, 20, -30>
}
camera {
  location  <0, 14.0, -19.0>
  look_at   <0,5.2,0>
  right     x*image_width/image_height
}
//-------end------------------------------------------------------------------------


Post a reply to this message

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