POV-Ray : Newsgroups : povray.binaries.images : Caustic Problems : Caustic Problems Server Time
17 Aug 2024 08:14:32 EDT (-0400)
  Caustic Problems  
From: banty
Date: 21 Oct 2001 16:23:47
Message: <3BD33110.BA4DB3EB@rapidnet.com>
I'm currently experimenting with refraction through crystal.
Unfortunately, I'm unable to post an image because my computer keeps
freezing up about two thirds of the way through the render.  Since it
seems to freeze at the same point every time, I'm thinking the problem
must be in the code.

/*
 Persistence of Vision Ray Tracer Scene Description File
 File: Crystal.pov
 Vers: 3.1
 Desc:
 Date: 10/19/01
 Auth: Anthony D. Baye
*/

#include "colors.inc"
#include "textures.inc"

/* Global Switches */
#declare RAD = on ;
#declare PHO = on ;
#declare Use_Camera = 2 ;
/* --------------- */

global_settings {
#if(RAD)
 radiosity {
  pretrace_start 0.01
  pretrace_end   0.01
  count 200

  nearest_count 10
  error_bound 0.02
  recursion_limit 2

  low_error_factor 0.2
  gray_threshold 0.2
  minimum_reuse 0.015
  brightness 0.5

  adc_bailout 0.01/2
    }
#end

#if (PHO)
 photons {
  count 20000
  autostop 0
  jitter 0.4
  media 50, 30
  }
#end
 }

#declare ft = 12 ;

#if (Use_Camera = 1)
camera {
 location <0.0, 0.0, -5.0*ft>
 look_at 0.0
 }
#end

#if (Use_Camera = 2)
camera {
 location <6.0, 6.0, -6.0>
 look_at 0.0
 }
#end

light_source { <30.0*ft, 25.0*ft, -25.0*ft> color rgb 1
media_interaction off photons { reflection on refraction on } }

object {
 plane { <0 1 0> 1 }
  pigment { White*0.625 }
  translate -1.0
 }

#declare Crystal =
 union {
  difference {
   cylinder { <0.0, -1.0, 0.0> <0.0, 0.2125, 0.0> 0.25 }
 #declare A = 0 ;
 #while ( A < 360 )
   box { <-2.0, 0.0, -2.0> <2.0, 1.75, 2.0> rotate 45.0*z translate
<-0.25, 0.0, 0.0> rotate A*y }
   box { <-2.0, 0.0, -2.0> <1.75, -1.75, 2.0> rotate -80.0*z translate
<-0.25, 0.0, 0.0> rotate A*y }
 #declare A = A + 36.0 ;
 #end
   translate 1.125*y
   rotate 180*z
   }
  difference {
   cylinder { <0.0, -0.5, 0.0> <0.0, 0.1875, 0.0> 0.25 }
 #declare B = 0 ;
 #while ( B < 360 )
   box { <-2.0, 0.0, -2.0> <2.0, 1.75, 2.0> rotate 45.0*z translate
<-0.25, 0.0, 0.0> rotate B*y }
   box { <-2.0, 0.0, -2.0> <1.75, -1.75, 2.0> rotate -70.0*z translate
<-0.25, 0.0, 0.0> rotate B*y }
 #declare B = B + 36.0 ;
 #end
   translate 0.625*y
   }
  difference {
   cylinder { <0.0, -0.5, 0.0> <0.0, 0.1875, 0.0> 0.25 }
 #declare C = 0 ;
 #while ( C < 360 )
   box { <-2.0, 0.0, -2.0> <2.0, 1.75, 2.0> rotate 45.0*z translate
<-0.25, 0.0, 0.0> rotate C*y }
   box { <-2.0, 0.0, -2.0> <1.75, -1.75, 2.0> rotate -70.0*z translate
<-0.25, 0.0, 0.0> rotate C*y }
 #declare C = C + 36.0 ;
 #end
   translate 0.625*y
   rotate 90*z
   }
  difference {
   cylinder { <0.0, -0.5, 0.0> <0.0, 0.1875, 0.0> 0.25 }
 #declare D = 0 ;
 #while ( D < 360 )
   box { <-2.0, 0.0, -2.0> <2.0, 1.75, 2.0> rotate 45.0*z translate
<-0.25, 0.0, 0.0> rotate D*y }
   box { <-2.0, 0.0, -2.0> <1.75, -1.75, 2.0> rotate -70.0*z translate
<-0.25, 0.0, 0.0> rotate D*y }
 #declare D = D + 36.0 ;
 #end
   translate 0.625*y
   rotate 270*z
   }
  pigment { color rgbft <1.0, 0.03, 1.0, 1.0, 1.0> }
  finish { diffuse 0.1 reflection 0.2 roughness 0.01 }
   interior { ior 2.4 }
  photons { target 0.75 reflection on refraction on }
 }

#declare Joiner =
union {
 difference {
  cylinder { <0.0, -0.3125, 0.0> <0.0, 0.3125, 0.0> 0.125 }
 #declare E = 0 ;
 #while ( E < 360 )
  box { <-0.125, -0.1875, -0.09375> <0.125, 0.1875, -0.21875> rotate E*y
}
 #declare E = E + 36.0 ;
 #end
  cylinder { <0.0, 0.125, 0.0> <0.0, 0.375, 0.0> 0.0625 }
  cylinder { <0.0, -0.125, 0.0> <0.0, -0.375, 0.0> 0.0625 }
  }
  pigment { Silver }
  finish { SilverFinish }
  photons { target 1.0 refraction off reflection on }
 }

object {
 union {
  object { Crystal }
  object { Joiner }
  object { Joiner rotate 90*z }
  }
 translate 1.25*y


Post a reply to this message

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