// Devil Plate by Abderrahman Taha 15/10/2019 (MathMod version 12) /* Devil=x^4+2*x^2*z^2-(36/100)*x^2-y^4+(25/100)*y^2+z^4 Devil2=Devil(x,sqrt(y*y+z*z)-(15/10),z,t) IsoExterior=Devil2(x,y,sqrt(x*x+z*z)-(15/10),t) DFx=((IsoExterior(x+c,y,z,t)-IsoExterior(x,y,z,t))/c) DFy=((IsoExterior(x,y+c,z,t)-IsoExterior(x,y,z,t))/c) DFz=((IsoExterior(x,y,z+c,t)-IsoExterior(x,y,z,t))/c) R=x/sqrt(x*x+y*y+z*z) Iso=(IsoExterior(x+t*Th*R(DFx(x,y,z,t),DFy(x,y,z,t),DFz(x,y,z,t),t),y+t*Th*R(DFy(x,y,z,t),DFz(x,y,z,t),DFx(x,y,z,t),t),z+t*Th*R(DFz(x,y,z,t),DFx(x,y,z,t),DFy(x,y,z,t),t),t)) ThickIsoExterior=(Iso(x,y,z,1)*Iso(x,y,z,-1)) // How to apply?? F(x,y,z,t) = if(y<(44/10)&y>-(24/10),ThickIsoExterior((10*x/15),y,z,t),1) // How to apply?? Cst: c = 1/1000 Th = 1/10 X min/max -+45/10 Y min/max -25/10;+45/10 Z min/max -+75/10 // Z is up! */ #version 3.7; global_settings { assumed_gamma 2.2 } #include "colors.inc" #include "textures.inc" #include "metals.inc" #declare Win = image_width/image_height; camera { location <0, 10, -20> up y right Win*x look_at <0.0, 0.0, 0.0> angle 54 } light_source { <7, 25, -50> color White } #declare c = 1/1000; #declare Th = 1/10; #declare Devil = function { pow(x,4)+2*pow(x,2)*pow(z,2)-(36/100)*pow(x,2)-pow(y,4)+(25/100)*pow(y,2)+pow(z,4) } #declare Devil2 = function { Devil ( x, sqrt(y*y+z*z)-(15/10), z ) } #declare IsoExt = function { Devil2 ( x, y, sqrt(x*x+z*z)-(15/10) ) } #declare DFx = function { (IsoExt(x+c,y,z)-IsoExt(x,y,z))/c } #declare DFy = function { (IsoExt(x,y+c,z)-IsoExt(x,y,z))/c } #declare DFz = function { (IsoExt(x,y,z+c)-IsoExt(x,y,z))/c } #declare R = function { x/sqrt(x*x+y*y+z*z) } #declare Iso = function(x,y,z) { IsoExt ( x+Th*R(DFx(x,y,z),DFy(x,y,z),DFz(x,y,z)), y+Th*R(DFy(x,y,z),DFz(x,y,z),DFx(x,y,z)), z+Th*R(DFz(x,y,z),DFx(x,y,z),DFy(x,y,z)) ) } #declare Xmin = -45/10; #declare Xmax = 45/10; #declare Ymin = -25/10; #declare Ymax = 45/10; #declare Zmin = -75/10; #declare Zmax = 75/10; //#declare Devil_Plate = isosurface { function {Iso(x,y,z) } contained_by{box{, }} threshold 0.0 accuracy 0.01 max_gradient 1913 open pigment {Yellow} rotate 0*y rotate -90*z rotate 90*x } // Trace Time: 29 minutes using 16 threads