// Persistence of Vision Ray Tracer Scene Description File // File: HF.inc // Vers: 3.6 // Desc: Heightfield from object // Date: 01/31/08 // Auth: Nekar Xenos // // +KFF12 // #version 3.6; #if(frame_number>12) #error "Done" #end global_settings { assumed_gamma 1.0 } /// different test objects //////////////////////////////////////////////////////// #declare TextObj =// create a TrueType text shape text { ttf // font type (only TrueType format for now) "impact.TTF", // Microsoft Windows-format TrueType font file name "POV-Ray", // the string to create 2, // the extrusion depth 0 // inter-character spacing } #declare Min = min_extent ( TextObj ); #declare Max = max_extent ( TextObj ); #declare Centre= (Max+Min)/2; #declare MaxS=max((Max-Min).x,(Max-Min).y,(Max-Min).z); #declare TextObject=intersection{ object{TextObj translate -Centre} sphere{0,1 scale<((Max-Min).x)*.6,((Max-Min).y)*.5,(Max-Min).z> translate z*(-Min.z-Centre.z) //pigment{colour rgb 1} } } //////////////////////////////////////////////////////// #declare FractObject = // create a 3-D slice of a 4-D julia fractal object julia_fractal { <-0.083,0.0,-0.83,-0.025> quaternion // hypercomplex cube // TYPE: sqr | cube | exp | reciprocal | sin | asin | sinh | asinh | cos | acos | // cosh | acosh | tan | atan | tanh | atanh | log | pwr( X_Val, Y_Val ) max_iteration 8 precision 20 // slice <0,0,0,1>,0 } /////////////////////////////////////////////////////////// #declare sObject =sphere{0,1} /////////////////////////////////////////////////////////// #declare bObject =box{-1,1 rotate 45} ////////////////////////////////////////////// #declare hObject=sObject; //bObject; // FractObject; // TextObject; // sObject; ///////////////////------------------------------\\\\\\\\\\\\\\\\\\\\\\\\\\ #declare Min = min_extent ( hObject ); #declare Max = max_extent ( hObject ); #declare Centre= Min+((Max-Min)/2); #declare MaxS=max((Max-Min).x,(Max-Min).y,(Max-Min).z); #declare Texture=texture{ pigment{spherical translate -.5*z scale 2.01 colour_map{[0 rgb<0,0,.5>][.5 rgb<1,0,0>][1 rgb<1,1,0>]}} finish{ambient 1 diffuse 1 reflection 0 specular 0} } camera { orthographic location -2*z look_at z right 1.01*x up 1.01*y } #declare hObject=object{hObject translate -Centre scale 1/MaxS } #if (frame_number>6) global_settings{hf_gray_16 on} #declare Texture=texture{ pigment {gradient z /*translate -.5*/ scale .5 colour_map{[0 rgb 1][1 rgb 0]}} finish{ambient 1 diffuse 1 reflection 0 specular 0} } #end #switch (frame_number) #case (0) object{hObject texture{Texture} rotate x*45 } #break //// pigments//// #case (1) // -x object{hObject texture{Texture} rotate y*-90 } #break #case (2) // x object{hObject texture{Texture} rotate y*90 } #break #case (3) // -y object{hObject texture{Texture} rotate x*90 } #break #case (4) // y object{hObject texture{Texture} rotate x*-90 } #break #case (5) // -z object{hObject texture{Texture} //rotate x*360 } #break #case (6) // z object{hObject texture{Texture} rotate x*180 } #break //////heightfields////////////////////////////////// #case (7) // -x object{hObject rotate y*-90 texture{Texture} } #break #case (8) // x object{hObject rotate y*90 texture{Texture} } #break #case (9) // -y object{hObject rotate x*90 texture{Texture} } #break #case (10) // y object{hObject rotate x*-90 texture{Texture} } #break #case (11) // -z object{hObject texture{Texture} //rotate x*360 } #break #case (12) // z object{hObject rotate x*180 texture{Texture} } #break #end