#version unofficial 3.8; // yuqk #if (file_exists("version.inc")) #include "version.inc" #end #if (!defined(Fork_yuqk)) #error "This POV-Ray SDL code requires the yuqk fork." #end global_settings { assumed_gamma 1 } #declare Grey50 = srgb <0.5,0.5,0.5>; background { Grey50 } #declare Camera00 = camera { perspective location <2,2,-2.001> sky y angle 35 right x*(image_width/image_height) look_at <0,0,0> } #declare VarOrthoMult = 2.0/max(image_width/image_height,image_height/image_width); #declare Camera01z = camera { orthographic location <0,0,-2> direction z right VarOrthoMult*x*max(1,image_width/image_height) up VarOrthoMult*y*max(1,image_height/image_width) } #declare Camera01y = camera { orthographic location <0,2,0> direction -y right VarOrthoMult*x*max(1,image_width/image_height) up VarOrthoMult*z*max(1,image_height/image_width) } #declare Camera01x = camera { orthographic location <2,0,0> direction -x right VarOrthoMult*z*max(1,image_width/image_height) up VarOrthoMult*y*max(1,image_height/image_width) } #declare White = srgb <1,1,1>; #declare Light00 = light_source { <50,150,-250>, White } #declare Red = srgb <1,0,0>; #declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } } #declare Green = srgb <0,1,0>; #declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } } #declare Blue = srgb <0,0,1>; #declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } } #include "functions.inc" // Function f_sphere defined in functions.inc #declare Fn00 = function (x,y,z) { f_sphere(x,y,z,0.7) } #declare Iso99 = isosurface { function { Fn00(x,y,z) } contained_by { box { -2.0,2.0 } } threshold 0 accuracy 0.0005 max_gradient 1.1 } #declare LightSalmon = srgb <1,0.62745,0.47843>; #declare Pigm99 = pigment { LightSalmon } #declare Fin99 = finish { brilliance 2 } #declare Nrml_0 = normal { spatial type 0 bump_size +0.5 warp { it_amount <25.0,25.0,25.0> it_octaves 3 it_omega 0.5 it_lambda 3.0 it_scale 1/30 } } #declare Nrml_1 = normal { spatial type 1 bump_size +0.5 warp { it_amount <1.0,1.0,1.0> it_octaves 6 it_omega 0.75 it_lambda 4.0 it_scale 3 } } #declare Nrml_2 = normal { spatial type 1 bump_size +1.5 warp { it_amount <1.0,1.0,1.0> it_octaves 6 it_omega 0.75 it_lambda 4.0 it_scale 3 } } #declare Nrml_3 = normal { spatial type 2 bump_size -1.5 // type 2 prevents inversion warp { it_amount <1.0,1.0,1.0> it_octaves 6 it_omega 0.75 it_lambda 4.0 it_scale 3 } } #declare Txtr_0 = texture { pigment { Pigm99 } normal { Nrml_0 } finish { Fin99 } } #declare Txtr_1 = texture { pigment { Pigm99 } normal { Nrml_1 } finish { Fin99 } } #declare Txtr_2 = texture { pigment { Pigm99 } normal { Nrml_2 } finish { Fin99 } } #declare Txtr_3 = texture { pigment { Pigm99 } normal { Nrml_3 } finish { Fin99 } } #declare Obj_0 = object { Iso99 texture { Txtr_0 } } #declare Obj_1 = object { Iso99 texture { Txtr_1 } } #declare Obj_2 = object { Iso99 texture { Txtr_2 } } #declare Obj_3 = object { Iso99 texture { Txtr_3 } } //--- scene --- camera { Camera00 } light_source { Light00 } // camera { Camera01x } // camera { Camera01y } // camera { Camera01z } object { CylinderX } object { CylinderY } object { CylinderZ } object { Obj_0 } // object { Obj_1 } // object { Obj_2 } // object { Obj_3 }