POV-Ray : Newsgroups : povray.text.scene-files : Differential rotation : Differential rotation Server Time
28 Jul 2024 20:23:33 EDT (-0400)
  Differential rotation  
From: Bob
Date: 5 Jun 1999 10:25:46
Message: <37593344.9D2CD3DF@aol.com>
Differential spiral rotation script. The number of "rings", as it were,
could be increased of course to refine the adjacent rotations. This is
basically a simple example of the effect. The important factor would be
the rotation ratios if to be looped in animation (that is the idea after
all). In this case the number of spiral arms being 4 matches up with the
360, 270 and 90 degree amounts turned by the 'clock'.

//BEGIN
/* A simple way to fake differential rotation of a spiral galaxy, etc.
The number of textures, S1...Sn, could be increased. The 'onion' pattern
is used to mask off the spiral pattern.
*/

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

light_source { <LCX,LCY,LCZ> color rgb 1.5
}
camera
{ fisheye //to enclose this particular scene
  location  <LCX,LCY,LCZ>
  up y right x //squared off for this also
  angle 22.5
  look_at   <0, 0, 0>
}

// ring or band textures
#declare S1 =
 texture {pigment {spiral1 4 color_map {
		[0 color rgb 0]
		[1 color rgb 1]
 } //rotate 0*z //offset if any
 } }
texture {pigment {onion color_map {
		[0 color rgbt 1]
		[.25 color rgbt 0]
 } } scale 2 //all scales were for a example animation render
}

#declare S2 =
 texture {pigment {spiral1 4 color_map {
		[0 color rgb 0]
		[1 color rgb 1]
 } //rotate 0*z //offset if any
 } }
texture {pigment {onion color_map {
		[0 color rgbt 0]
		[.25 color rgbt 1]
		[.5 color rgbt 0]
 } } scale 2
}

#declare S3 =
 texture {pigment {spiral1 4 color_map {
		[0 color rgb 0]
		[1 color rgb 1]
 } //rotate 0*z //offset if any
 } }
texture {pigment {onion color_map {
		[.25 color rgbt 0]
		[.5 color rgbt 1]
		[1 color rgbt 0]
 } } scale 2
}

//spiral texture surface
plane {z,0
	texture {average texture_map {
		[1 S1 rotate clock*360*z]
		[1 S2 rotate clock*270*z]
		[1 S3 rotate clock*90*z]
 } } scale 1.25
}
//END


-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto://inversez@aol.com?Subject=PoV-News


Post a reply to this message

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