/* Pov3 Parametric equation template-T. Nordstrand */ /*ASTROIDAL ELLIPSOID*/ /* You need the parametric formulas in separate files as given below. Make a bach file as indicated, or make them manually. echo pow(a*cos(uu)*cos(vv),3) >uuvv.x echo pow(b*sin(uu)*cos(vv),3) >uuvv.y echo pow(c*sin(vv),3) >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=1 //In this case; scale factors. #declare b=1 #declare c=1 #declare uiter = 40 //Number of steps (lengthwise) #declare viter = 40 //and across. Edit these for better res. #declare vmin = -pi //Endpoints in the #declare vmax = pi //parametric rectangle. #declare umin = -pi //I.e. min and max uu and vv #declare umax = pi //Simple textures for triangles #declare simple1 = texture{ pigment {checker color Gray60, color White} finish {ambient 0.2 specular 0.7 roughness 0.05 } scale 0.15 } #declare simple2 = texture{ pigment {color Green} finish {ambient 0.2 specular 0.7 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 { 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,10,0> //This is just changing the //rotate <0,180,0> //coordinate system. scale 8 translate<0,0,-2> }