#version 3.8; global_settings { assumed_gamma 1.0 adc_bailout 0.005 max_trace_level 50 charset utf8 } camera { orthographic location -z * 128 // position & direction of view direction +z right +x * 4 // horizontal size of view up +y * 4 // vertical size of view // rotate +x * 90 rotate +x * 15 rotate +y * 45 } /* camera { location <0, 0, -4> // position & direction of view look_at <0, 0, 0> right x*image_width/image_height // horizontal size of view up y // vertical size of view rotate x * 15 rotate y * 15 } */ sky_sphere {pigment {rgb <1/2,1/2, 1>}} plane {+y, -1 pigment {checker}} light_source {<30, 30, -30> color rgb 1 parallel point_at 0} #declare surf_thick = 0.1; #declare f_spheroid = function(var1,var2,var3, a,b,c) {var1*var1/a/a+var2*var2/b/b+var3*var3/c/c-1} #declare f_spheroid_normalized = function(var1,var2,var3, a,b,c) {f_spheroid(var1,var2,var3, a,b,c)/sqrt(4*var1*var1/pow(a,4)+4*var2*var2/pow(b,4)+4*var3*var3/pow(c,4))} //than difference these two isosurfaces difference { isosurface { function {f_spheroid(x,y,z,2,1,2)} accuracy 0.001 max_gradient 40 all_intersections //evaluate P0, P1, min (P2, 1) contained_by {sphere {0, 2}} } isosurface { function {f_spheroid_normalized(x,y,z,2,1,2)+surf_thick} accuracy 0.001 max_gradient 40 all_intersections //evaluate P0, P1, min (P2, 1) contained_by {sphere {0, 2}} } plane {-y, 0} bounded_by {sphere {0, 2}} pigment {color rgbt <1,1,1,1/2>} }