HOME | DD

MathMod — Holed Spheres

#3d #mathmod #mathematics
Published: 2015-10-08 20:02:10 +0000 UTC; Views: 559; Favourites: 2; Downloads: 1
Redirect to original
Description Holed Spheres (implicit version)
Good news: This example proves that we can "export" quite easily some parametric holed spheres (or any other mathematical shape) models to an implicit description of the same holed sphere, by using the "thickness" function property.
MathMod script:
{
"Iso3D": {
"Description": ["Holed Spheres (implicit version) by Abderrahman Taha 08/10/2015"],
"Name": ["Holed Spheres (implicit version)"],
"Component": ["HoledSphere"],
"Const": ["cx=0.0000000000001",
"cy=0.0000000000001",
"cz=0.0000000000001"],
"Funct": ["Iso=x*x+y*y+z*z-1",
"Tickness= ( .05*cos((abs(cos(21*atan2(x,y))+sin(19*atan2(z,sqrt(x*x+y*y))))/1.1)^2))",
"DFx= ((Iso(x,y,z,t)-Iso(x+cx,y,z,t))/cx)",
"DFy= ((Iso(x,y,z,t)-Iso(x,y+cy,z,t))/cy)",
"DFz= ((Iso(x,y,z,t)-Iso(x,y,z+cz,t))/cz)",
"Rapport= (sqrt(DFx(x,y,z,t)*DFx(x,y,z,t)+DFy(x,y,z,t)*DFy(x,y,z,t)+DFz(x,y,z,t)*DFz(x,y,z,t)))",
"Iso2= (Iso(x+t*DFx(x,y,z,t)*Tickness(x,y,z,t)/Rapport(x,y,z,t),y+t*DFy(x,y,z,t)*Tickness(x,y,z,t)/Rapport(x,y,z,t),z+t*DFz(x,y,z,t)*Tickness(x,y,z,t)/Rapport(x,y,z,t),t))",
"TickIso=max(Iso2(x,y,z,1), Iso2(x,y,z,-1))"],
"Fxyz": ["-max(Iso2(x,y,z,1), (x*x+y*y+z*z-1))*Iso2(x,y,z,1)"],
"Xmax": ["1.2"],
"Xmin": ["-1.2"],
"Ymax": ["1.2"],
"Ymin": ["-1.2"],
"Zmax": ["1.2"],
"Zmin": ["-1.2"]
}
}
Related content
Comments: 0