/* Pov3 Parametric equation template- */ /*SWALLOWTAIL*/ /* Make files as indicated echo u*pow(vv,2) + 3*pow(vv,4) >uuvv.x echo -2*uu*vv - 4*pow(vv,3) >uuvv.y echo uu >uuvv.z */ #include "colors.inc" #include "textures.inc" #version 3.0 #declare tofile = 0 //set to 1 for debug to file, change .ini global_settings { assumed_gamma 1.0 } /* Put any other constants in the eqns. here */ #declare a=0.5 #declare b=1.5 #declare c=1 #declare uiter = 40 //Number of steps (lengthwise) #declare viter = 40 //and across. Edit these for better res. #declare vmin = -0.8 //Endpoints in the #declare vmax = 0.8 //parametric rectangle. #declare umin = -2 //I.e. min and max uu and vv #declare umax = 2 //Simple textures for triangles #declare simple1 = texture{ pigment {checker color Gray60, color Green} finish {ambient 0.2 specular 0.7 roughness 0.05 } scale 0.15 } #declare simple2 = texture{ pigment { bozo color_map { [0.0, 0.4 color rgb <0.8, 0.0, 0.0> color rgb <0.4, 0.0, 0.4>] [0.4, 0.6 color rgb <0.4, 0.0, 0.4> color rgb <0.0, 0.0, 0.2>] [0.6, 1.0 color rgb <0.0, 0.0, 0.2> color rgb <0.0, 0.0, 0.0>] } } finish {ambient 0.3 specular 0.5 roughness 0.05 } } //Lights, camera, action camera { location < 15, 9,-15> direction 1*z look_at < 0, 0, -1> } light_source { <-10, 29,-19> color rgb 1 } light_source { <23, 20, -15> color rgb 1 } object {box{-30,30 inverse}pigment{color rgb 0.6}} //object {plane{ y,-29.5 pigment{checker color Black color PaleGreen}}} //OBJECT DECLARED HERE #include "paraloop.inc" //Returns a mesh named surface object{ surface texture {simple2 /* pigment { granite color_map { [0.0, 0.3 color rgb <0.82, 0.57, 0.46> color rgb <0.82, 0.57, 0.46>] [0.3, 0.6 color rgb <0.0, 0.0, 0.0> color rgb <0.85, 0.85, 0.95>] [0.6, 1.0 color rgb <0.82, 0.57, 0.46> color rgb <0.85, 0.85, 0.95>] } } finish { metallic brilliance 6.0 reflection 0.25 phong 0.75 } */ } rotate <90,70,0> //This is just changing the rotate <0,180,0> //coordinate system. scale 3 translate<0,0,-2> }