|
|
// This is Saturns Rings with commentary for tutorial purposes
// Molly J.
// YOU MAY HAVE TO COPY AND PASTE THIS INTO YOUR OWN TEXT READER TO PRESERVE
LEGIBLE FORMATTING. STUPID 80 CHARACTER LINE LIMIT INHERITED FROM PUNCH-CARDS!
camera { location <0,0,-200> look_at <0,0,0> right x*1600/900 angle 4 }
background {rgb <0, 0, 0>}
light_source { <-15,5,-15> color rgb <2,2,2> } // sharp shadows-- "parallel?
point source?"
// STARRY SKY BACKGROUND SPHERE ADAPTED FROM Jeff Burton'S "stars.inc"
// THIS PIGMENT IS LESS CROWDED WITH STARS AND LABELED BY COLOUR.
// TO CHANGE THE POPULATION COUNT, CHANGE THE BANDWIDTH ON THE LINES
// FOR EXAMPLE "0.270 0.2701" TO "0.270 0.27001"
// REMEMBER TO MATCH THE BLACK LINE THAT FOLLOWS TO "0.27001 0.470"
//
// 0.000 BLACK 0.270 YELLOW 0.2701 BLACK 0.470 BLUE 0.4701 BLACK 0.680 RED
0.6801 BLACK 0.880 WHITE 0.8801 BLACK 1.000
// BLACK SKY SPHERE WITH STARS
sky_sphere
{
pigment
{
granite
color_map
{
[ 0.000 0.270 color rgb < 0, 0, 0> color rgb < 0, 0, 0>
] // BLACK
[ 0.270 0.2701 color rgb <.5,.5,.4> color rgb
<.8,.8,.4> ] // YELLOW STARS DIM TO BRIGHT (0.270-)
[ 0.2701 0.470 color rgb < 0, 0, 0> color rgb < 0, 0,
0> ] // BLACK
[ 0.470 0.4701 color rgb <.4,.4,.5> color rgb
<.4,.4,.8> ] // BLUE STARS DIM TO BRIGHT (0.470-)
[ 0.4701 0.680 color rgb < 0, 0, 0> color rgb < 0, 0,
0> ] // BLACK
[ 0.680 0.6801 color rgb <.5,.4,.4> color rgb
<.8,.4,.4> ] // RED STARS DIM TO BRIGHT (0.680-)
[ 0.6801 0.880 color rgb < 0, 0, 0> color rgb < 0, 0,
0> ] // BLACK
[ 0.880 0.8801 color rgb <.5,.5,.5> color rgb < 1, 1,
1> ] // WHITE STARS DIM TO BRIGHT (0.880-)
[ 0.8801 1.000 color rgb < 0, 0, 0> color rgb < 0, 0,
0> ] // BLACK
}
turbulence 8
sine_wave
scale .5
}
}
// PLANET IMAGE MAPS AVAILABLE ONLINE ARE GENERALLY PLATE-CARREE
PROJECTIONS WITH THE PRIME MERIDIAN IN THE CENTER -
// THIS WRAPS LONGITUDE ZERO ON THE LEFT SIDE. ROTATE THE PLANET -90
DEGREES ON THE Y AXIS TO PUT IT IN FRONT
// SATURN:
sphere
{ <0,0,0>, 1.0 scale <1,1,1>
pigment {image_map {jpeg "/home/molly/.povray/3.7/saturn.jpg" map_type 1
interpolate 4 }}
finish {reflection 0.0 refraction 0.0 metallic 0.0}
rotate y*-90 // Correction for prime meridian AT ZERO
// CHOOSE LATITUDE / LONGITUDE
rotate y*-75 // Longitude - West is negative
rotate x*-13 // Latitude - North is negative
}
// APPLYING AN IMAGE MAP TO A DISC IN THE CORRECT ORIENTATION FOR
CONCENTRIC RINGLETS IS NOT INTUITIVE
// BE SURE YOUR IMAGE MAP OF THE RING'S CROSS-SECTION IS ORIENTED
INNER>OUTER, LEFT>RIGHT
// CREATE THE DISC WITH ORIENTATION VECTOR ON THE Y AXIS
// USE MAP_TYPE ZERO
// SCALE THE MAP TO MATCH THE OUTER DIAMETER OF THE DISC; 5 IN THIS CASE
// WARP WITH CYLINDRICAL ORIENTATION IN THE X AXIS
// APPLY THE SAME X-Y ROTATIONS AS YOU DID THE PLANET SO THEY MATCH EACH
OTHER
//RINGS:
disc
{ <0,0,0>, <0,1,0>, 5.0, 2.0 // <POSITION>, <ATTITUDE = +Z>, OUTER, INNER
-- match image scale to OUTER. ATT-Z = X-warp **
pigment
{ image_map { png "2k_saturn_ring_alpha.png" map_type 0
interpolate 4}
scale 5 // match ring diameter **
warp { cylindrical orientation x dist_exp 0 } // TEXTURE WARP
ORIENTATION = X **
}
// LAT-LONG
rotate y*-75 // West is negative
rotate x*-13 // North is negative
}
// YOU MAY HAVE TO COPY AND PASTE THIS INTO YOUR OWN TEXT READER TO PRESERVE
LEGIBLE FORMATTING
Post a reply to this message
Attachments:
Download 'ring_syst_tmplt-00.png' (293 KB)
Preview of image 'ring_syst_tmplt-00.png'
|
|