POV-Ray : Newsgroups : povray.text.scene-files : Differential rotation : Re: Differential rotation Server Time
28 Jul 2024 20:27:40 EDT (-0400)
  Re: Differential rotation  
From: Bob
Date: 6 Jun 1999 04:14:12
Message: <375A2DB9.8F710084@aol.com>
// Persistence of Vision Ray Tracer Scene Description File
// File: slipping.pov
// Vers: 3.1
// Desc: A way to slip textures past one another in a circle at different
rates
// Date: 99.425
// Auth: Bob Hughes  mailto://inversez@aol.com?Subject=PoV-Scene
// Note: the second #switch in each defined layered texture will not work.
// This scene hasn't been made to be adjustable for other situations, just
an example.

// white pointlight at camera position
#declare LCX = 0;
#declare LCY = -10;
#declare LCZ = -10;

light_source { <LCX,LCY,LCZ> color rgb <1,1.25,1.5>
}
camera
{ //fisheye //to enclose this particular scene
  location  <LCX,LCY,LCZ>
  up y right 4/3*x //squared off for this also
  angle 44//34
  look_at   <0, -1.66, 0>
}

#declare TA = 0; //turbulence amount (does not work for looped animation)

  //1 ramp, 2 sine, 3 scallop, 0 or other default triangle_wave
#declare WT1 = 0;
#declare WT2 = 3;

// spiral arms in ring (banded) textures

#declare S1 =
 texture {pigment {spiral1 4 turbulence .05*TA color_map {
		[0 color rgb .5]
		[1 color rgb 1.5]
 }
#switch (WT1)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
 //rotate 0*z
  }   normal {granite .25 scale .01}
       finish {ambient <.2,.3,.4>*3 diffuse .5}	
 }
texture {pigment {onion turbulence .1*TA color_map {
		[0 color rgbt 1]
		[.125 color rgbt 0]
 } //sine_wave
/*
#switch (WT2)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
*/
  }   normal {granite .25 scale .001}
 scale 3
}

#declare S2 =
 texture {pigment {spiral1 4 turbulence .05*TA color_map {
		[0 color rgb .25]
		[1 color rgb 1.25]
 }
#switch (WT1)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
 //rotate 0*z
  }   normal {granite .25 scale .01}
       finish {ambient <.2,.3,.4>*2 diffuse .5}	
 }
texture {pigment {onion turbulence .1*TA color_map {
		[0 color rgbt 0]
		[.125 color rgbt 1]
		[.25 color rgbt 0]
 } //sine_wave
 /*
#switch (WT2)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
*/
  }   normal {granite .25 scale .001}
 scale 3
}

#declare S3 =
 texture {pigment {spiral1 4 turbulence .05*TA color_map {
		[0 color rgb 0]
		[1 color rgb 1]
 }
#switch (WT1)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
 //rotate 0*z
  }   normal {granite .25 scale .01}
       finish {ambient <.2,.3,.4>*1 diffuse .5}	
 }
texture {pigment {onion turbulence .1*TA color_map {
		[.125 color rgbt 0]
		[.25 color rgbt 1]
		[.5 color rgbt 0]
 } //sine_wave
 /*
#switch (WT2)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
*/
  }   normal {granite .25 scale .001}
 scale 3
}

#declare S4 =
 texture {pigment {spiral1 4 turbulence .05*TA color_map {
		[0 color rgb 0]
		[1 color rgb 1]
 }
#switch (WT1)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
 //rotate 0*z
  }   normal {granite .25 scale .01}
       finish {ambient <.2,.3,.4>*.75 diffuse .5}	
 }
texture {pigment {onion turbulence .1*TA color_map {
		[.25 color rgbt 0]
		[.5 color rgbt 1]
		[1 color rgbt 0]
 } //sine_wave
 /*
#switch (WT2)
#case (1)
  ramp_wave
#break
#case (2)
  sine_wave
#break
#case (3)
  scallop_wave
#break
#else //default triangle_wave
#end
*/
  }   normal {granite .25 scale .001}
 scale 3
}

union {
//spiral arm surface
disc {<0,0,0>,<0,0,1>,2.5
	texture {average texture_map {
		[1 S1 rotate clock*720*z]
		[1 S2 rotate clock*360*z]
		[1 S3 rotate clock*180*z]
		[1 S4 rotate clock*90*z] //minimum, based upon spiral arm number
	} sine_wave scale .85 } 
  scale 2 //fit to view
}
//overlay of central bright region
disc {<0,0,-.001>,<0,0,1>,2.5
texture {pigment {onion turbulence .1*TA color_map {
		[.05 color rgbft <1,.95,.75,.5,.125>]
		[.1 color rgbft <.9,.85,.8,.75,.25>]
		[.2 color rgbft <.9,.9,.9,.5,.25>]
		[.3 color rgbft <.85,.9,1,.25,.75>]
		[.9 color rgbft <1,1,1,1,1>]
  } ramp_wave }
   normal {granite .25 scale .005}
  finish {ambient 1}
   scale 2.5
 } scale 2
}
 scale 1 rotate 0 translate 0
}
//END


Post a reply to this message

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