POV-Ray : Newsgroups : povray.text.tutorials : Saturn's Rings with Adjustable Starfield Sky_Sphere Server Time
29 Mar 2024 08:35:49 EDT (-0400)
  Saturn's Rings with Adjustable Starfield Sky_Sphere (Message 1 to 3 of 3)  
From: Molly-J
Subject: Saturn's Rings with Adjustable Starfield Sky_Sphere
Date: 22 Mar 2022 12:30:00
Message: <web.6239f82399fba4b39cded0992eac0897@news.povray.org>
//      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'
ring_syst_tmplt-00.png


 

From: Thomas de Groot
Subject: Re: Saturn's Rings with Adjustable Starfield Sky_Sphere
Date: 23 Mar 2022 03:43:27
Message: <623acf9f$1@news.povray.org>
Neat. Thanks!

-- 
Thomas


Post a reply to this message

From: jr
Subject: Re: Saturn's Rings with Adjustable Starfield Sky_Sphere
Date: 23 Mar 2022 06:15:00
Message: <web.623af2d9ac83a3bffc0c8de6cde94f1@news.povray.org>
hi,

"Molly-J" <nomail@nomail> wrote:
> //      This is Saturns Rings with commentary for tutorial purposes

nice.  (audacious! :-))  made me smile.  thank you.


regards, jr.


Post a reply to this message

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