POV-Ray : Newsgroups : povray.newusers : difficulties rendering hexagonal crystal group : difficulties rendering hexagonal crystal group Server Time
28 Jul 2024 14:29:04 EDT (-0400)
  difficulties rendering hexagonal crystal group  
From: engelbert buxbaum
Date: 16 Mar 2009 09:35:00
Message: <web.49be542b519610b7604827740@news.povray.org>
Hi,

in an attempt to explain crystal groups I generated the following:

camera {
  location  <0, 0, -270>
  look_at   <0, 0, 0>
  angle 1.7
}

global_settings {
  assumed_gamma 2.2
  max_trace_level 100
}

light_source { < 10, 10, -10> color rgb <1.0, 1.0, 0.8> }       // right, top,
front
light_source { <-10, 10, -10> color rgb <1.0, 0.8, 1.0> }       // left, top,
front
light_source { < 10,-10, -10> color rgb <0.8, 1.0, 1.0> }       // right, below,
front
light_source { <-10,-10, -10> color rgb <1.0, 1.0, 1.0> }       // left, below,
front
light_source { <0, 0, -10> color rgb <1.0, 1.0, 0.8> area_light
<10,0,0>,<0,10,0>, 5, 5 }   // center, front




//-------------------------- drawing 3 axes --------------------------------

#macro Axis_( AxisLen, RedTexture,WhiteTexture)
union{
    cylinder {<0,-AxisLen,0>,<0,AxisLen,0>,0.05
              texture{checker texture{RedTexture}
                              texture{WhiteTexture}
                      translate<0.1,0,0.1>}}
    cone{<0,AxisLen,0>,0.2,<0,AxisLen+0.7,0>,0
         texture{RedTexture}}
     }
#end

#macro AxisXYZ( AxisLenX, AxisLenY, AxisLenZ, TexRed, TexWhite)

union{
   object{Axis_(AxisLenX, TexRed, TexWhite)   rotate< 0,0,-90>}   // x axis
   object{Axis_(AxisLenY, TexRed, TexWhite)   rotate< 0,0, 30>}   // y axis
   object{Axis_(AxisLenZ, TexRed, TexWhite)   rotate<-90,0,  0>}   // z axis

   text{ ttf"arial.ttf",  "x",  0.15,  0  texture{TexRed}
         scale 0.5 translate <AxisLenX+0.05,0.4,-0.10>}
   text{ ttf"arial.ttf",  "y",  0.15,  0  texture{TexRed}
         scale 0.5 translate <-2,AxisLenY-1.0,-0.00>}
   text{ ttf"arial.ttf",  "z",  0.15,  0  texture{TexRed}
         scale 0.5 translate <-0.4,0,AxisLenZ-6>}
}
#end

// ----------------------- object ----------------------------------


#declare  Hexagon =
 intersection
  {plane {z, 1}  /* Rotate 90 in z axis to stand up */
   plane {z, 1 rotate < 60, 0, 0>}
   plane {z, 1 rotate <120, 0, 0>}
   plane {z, 1 rotate <180, 0, 0>}
   plane {z, 1 rotate <240, 0, 0>}
   plane {z, 1 rotate <300, 0, 0>}
   plane { x, 1}
   plane {-x, 1}

   bounded_by {sphere{0, 1.5}}
  }


#declare Hexagonal =
      intersection{
         object{ Hexagon
               }
         object{ Hexagon
                   translate <0, 0.58, 1>
               }
         texture
            { pigment {color rgbf <0.1, 0.15, 0.5, 1.0> }         // blue
              finish { ambient 0.5 diffuse 0.1 phong 0.2 }
             }
         interior
             { refraction on
               ior 1.0
               fade_distance 10
               fade_power 0.2
             }
      }

#declare CutOut =
     difference{
         object{ Hexagon
               }
         object{ Hexagon
                   scale 1.001
                   translate <0, 0.58, 1>
                                       }
         texture
               { pigment {color rgbf <0.2, 0.2, 0.2, 1.0> }         // grey
                 finish { ambient 0.5 diffuse 0.1 phong 0.05 }
               }
         interior
             { refraction on
               ior 1.0
               fade_distance 10
               fade_power 0.2
             }
     }

#declare Final_Object =
    union{
       object{ Hexagonal }
       object{ CutOut }
       rotate <0, 90, 30>
       translate <0, 0, 1>
       scale <1.7, 1.7, -1.0>
    }


union{
   object{AxisXYZ (3,3,3,
                texture{ pigment{rgb<1,0,0>} finish{diffuse 0.8 phong 1}},
                texture{ pigment{rgb<1,1,1>} finish{diffuse 0.8 phong 1}})
         }
   object{ Final_Object
         }
   rotate<20,-20,0>
}

Both the hexagonal crystal and the cut-out hexagon render fine by themselfs, but
in combination the crystal looses colour, also, the surface of the crystal in
contact with the cut-out becomes invisible. I have fiddled with lighting and
optical properties of the bodies for days, but I just don't get it. Any ideas?

Thanks in advance

Engelbert


Post a reply to this message

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