#include "common.povinc" #declare fx = 0.5; #declare fy = 2.0; #declare cf = 0.5; #declare ts = 1.0; #declare chx = 0.7; #declare chy = -0.1; #declare hts = 0.5; #declare eps = 0.5; #declare bean = function { sqrt(fx*x*x + fy*(y-cf*x*x)*(y-cf*x*x) + z*z) - ts } #declare hole = function { sqrt((x - chx)*(x - chx) + (y - chy)*(y - chy) + z*z) - hts } #declare smoo = function(d) { 0.5*tanh (d/eps) + 0.5 } #declare grotto = isosurface { function { bean(x,y,z) - smoo(-bean(x,y,z)-hole(x,y,z))*(bean(x,y,z)+hole(x,y,z)) } open max_gradient 4 contained_by { box { <-1.6,-1,-1.5>, <1.6,1.5,1.5> } } //scale <1, .25, 1> //rotate <30, 0, 45> rotate 70*y translate -0.25*y }