POV-Ray : Newsgroups : povray.binaries.images : Difficult simple object : Re: Difficult simple object Server Time
18 Aug 2024 20:12:17 EDT (-0400)
  Re: Difficult simple object  
From: Mark James Lewin
Date: 15 Mar 2001 17:05:08
Message: <3AB13BEB.2067CE5B@yahoo.com.au>
Ewww, sorry for that terrible coding. Here is the three hemispheres thing you
wanted, this time done using standard pigments (and pigment_pattern).

#declare Spherical_Red_Pigment =
pigment
        {
        spherical
        colour_map
                {
                [0 rgb 0]
                [0 rgb <3,0,0>]
                [1 rgb <3,0,0>]
                }
        }

#declare Spherical_Green_Pigment =
pigment
        {
        spherical
        colour_map
                {
                [0 rgb 0]
                [0 rgb <0,3,0>]
                [1 rgb <0,3,0>]
                }
        }

#declare Spherical_Blue_Pigment =
pigment
        {
        spherical
        colour_map
                {
                [0 rgb 0]
                [0 rgb <0,0,3>]
                [1 rgb <0,0,3>]
                }
        }


#declare Hemispherical_Red_Pigment =
pigment
        {
        pigment_pattern
                {
                planar
                translate <0,1,0>
                }

        pigment_map
                {
                [0 colour rgb 0]
                [0 Spherical_Red_Pigment]
                [1 Spherical_Red_Pigment]
                }
        }

#declare Hemispherical_Green_Pigment =
pigment
        {
        pigment_pattern
                {
                planar
                translate <0,1,0>
                rotate <0,0,-90>
                }

        pigment_map
                {
                [0 colour rgb 0]
                [0 Spherical_Green_Pigment]
                [1 Spherical_Green_Pigment]
                }
        }

#declare Hemispherical_Blue_Pigment =
pigment
        {
        pigment_pattern
                {
                planar
                translate <0,1,0>
                rotate <-90,0,0>
                }

        pigment_map
                {
                [0 colour rgb 0]
                [0 Spherical_Blue_Pigment]
                [1 Spherical_Blue_Pigment]
                }
        }

#declare Combined_Hemisphere_Pigment =
pigment
        {
        average
        pigment_map
                {
                [1 Hemispherical_Red_Pigment]
                [1 Hemispherical_Green_Pigment]
                [1 Hemispherical_Blue_Pigment]
                }
        }

sphere
        {
        <0,0,0>
        0.999

        texture
                {
                pigment { Combined_Hemisphere_Pigment }

                finish
                        {
                        diffuse 1
                        }
                }

        rotate <0,30,0>
        rotate <-30,0,0>
        }


Post a reply to this message


Attachments:
Download '3hemis.png' (11 KB)

Preview of image '3hemis.png'
3hemis.png


 

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