POV-Ray : Newsgroups : povray.text.scene-files : IsoCactus : IsoCactus Server Time
28 Jul 2024 14:22:43 EDT (-0400)
  IsoCactus  
From: Chris Huff
Date: 24 Feb 2000 16:13:08
Message: <chrishuff_99-EF2879.16143224022000@news.povray.org>
// Here it is, complete with the awful textures.
// Unless you render with anti-aliasing and radiosity,
// you will get a lot of "static" around the areas with
// a high spine density.
// These radiosity settings were just taken from a
// MegaPOV example file.
// When I render it using radiosity, I got a huge number
// of these warnings:
// "bounds error, unreasonable size 141"
// However, they did not interrupt the rendering, and I just
// closed the status window and let it complete rendering.


#include "colors.inc"
#version unofficial MegaPov 0.4;

global_settings {
   assumed_gamma 1
   ambient_light 0
// ini_option "+QR"
// ini_option "Preview_Start_Size=8"
// ini_option "Preview_End_Size=4"

   radiosity{
      count 50             // CHANGE range from 20 to 150
      nearest_count 5      // CHANGE range from 3 to 10
      error_bound 1        // CHANGE - range from 1 to 3 - should 
correspond with Preview_End_Size
                            //   1 : preview_end_size = 4
                            //   3 : preview_end_size = 8
                            //   use preview_start_size = 16 (or 8 for 
high quality)
                            // you can go lower than 1, but then you 
probably will want to set
                            // preview_end_size to 2, which is really 
slow
      recursion_limit 4    // CHANGE
       
      low_error_factor .5  // leave this
      gray_threshold 0.0   // leave this
      minimum_reuse 0.015  // leave this
      brightness 1         // leave this

      max_sample 2         // CHANGE - this should be the same as the 
brightest object
      adc_bailout 0.01/2   // CHANGE - use adc_bailout = 0.01 / 
brightest_ambient_object
   }
}
background {color White}
sky_sphere {
   pigment {gradient y
      color_map {
         [0 color Blue*0.6]
         [1 color White]
      }
   }
}
// ----------------------------------------
camera {
   location <0, 3.5,-8>
   up y*image_height right x*image_width
   angle 30
   look_at <0, 0.5, 0>
}
// ----------------------------------------
plane {y, 0
   texture {
      pigment {color rgb < 0.9, 0.9, 0.5>}
      normal {average
         normal_map {
            [1 granite 0.5 scale 0.005]
            [1 waves 0.1 scale 25]
         }
      }
      finish {brilliance 2}
   }
}

// Could be replaced with one of the other trig functions, like atan2()
#declare TH = function {"TH"}

#declare cactusBody =
isosurface {
   function {sqrt(sqr(x) + sqr(y-sqrt(sqr(x/2)+sqr(z/2))*1.5) + sqr(z)) 
- 1 -
      (sin(atan2(x, z)*18)*0.1)
//    (sin(TH(x, y, z)*18)*0.1)
   }
   threshold 0
   eval
   contained_by {sphere {< 0, 0, 0>, 3.1}}
   accuracy 0.001
   texture {
      pigment {color rgb < 0.3, 0.85, 0.4>*0.8}
   }
   scale < 1, 0.75, 1>
   translate y*0.35
   double_illuminate
}
#declare rs = seed(4654786);
union {
   object {cactusBody}
   #declare J=0;
   #while(J<18)
      #declare K=0;
      #while(K<20)
         #declare Orig = vrotate(-z*5, x*(K*90/20));
         #declare Orig = vrotate(Orig, y*(360*J/18 + 360/72));
         #declare PtNorm = y;
         #declare Pt = trace(cactusBody, Orig,-Orig, PtNorm);
         #declare L=0;
         #while(L<5)
            #declare NewNorm = PtNorm + (< rand(rs), rand(rs), 
rand(rs)>*2 - 1);
            cone {Pt, 0.01, Pt+vnormalize(NewNorm)*0.25, 0
               texture {pigment {color rgb < 0.98, 0.98, 0.5>}}
               bounded_by {cylinder {Pt, Pt+vnormalize(NewNorm)*0.25, 
0.011}}
            }
            #declare L=L+1;
         #end
         #declare K=K+1;
      #end
      #declare J=J+1;
   #end
}

// ----------------------------------------


light_source {<-20, 30, -30>*3 color White}

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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