Blender(jusqu'à 2.49)
|
Python
:
Représenter
une surface implicite
|
|
Télécharger
le fichier blend / download the blend file
Voir
le script / display the script
|
def f(x,y,z):
a=1.0/2.3
b=1.0/2.0
if (x**4+y**2+z**2)!=0:
return -(a**2*(x**2+y**2+z**2))**-6.0-(b**8*(x**8+y**8+z**8))**6.0+1.0
else:
return 1.0
xmin = -2.5;
xmax = -xmin;
ymin = -2.5;
ymax = -ymin;
zmin = -2.5;
zmax = -zmin; |
|
|
def f(x,y,z):
Ro=0.45
Ri=2.0
P=(Ri*Ri+Ro*Ro)
M=(Ri*Ri-Ro*Ro)
MM=M*M
return x**4.0+2*(x**2)*((y**2)+z**2-P)+y**4+2*(y**2)*(z**2+M)+z**4-2*(z**2)*P+MM
xmin = -3.0;
xmax = -xmin;
ymin = -3.0;
ymax = -ymin;
zmin = -3.0;
zmax = -zmin; |
|
|
def f(x,y,z):
Ro=0.45
Ri=2.0
P=(Ri*Ri+Ro*Ro)**cos(y*x)
M=(Ri*Ri-Ro*Ro)**cos(z*x)
MM=M*M
return x**4.0+2*(x**2)*((y**2)+z**2-P)+y**4+2*(y**2)*(z**2+M)+z**4-2*(z**2)*P+MM
xmin = -3.0;
xmax = -xmin;
ymin = -3.0;
ymax = -ymin;
zmin = -3.0;
zmax = -zmin; |
|
|
def f(x,y,z):
Ro=0.45
Ri=2.0
P=Ri*Ri+Ro*Ro
M=Ri*Ri-Ro*Ro
MM=M*M
return exp(-(x**4+2*sqr(x)*(sqr(y)+sqr(z)-P)+y**4+2*sqr(y)*(sqr(z)+M)+\
z**4-2*sqr(z)*P+MM))
+\
exp(-(x**4+2*sqr(x)*(sqr(z)+sqr(y)-P)+z**4+2*sqr(z)*(sqr(y)+M)+\
y**4-2*sqr(y)*P+MM))
+\
exp(-(y**4+2*sqr(y)*(sqr(x)+sqr(z)-P)+x**4+2*sqr(x)*(sqr(z)+M)+\
z**4-2*sqr(z)*P+MM))
- 0.7
xmin = -2.5;
xmax = -xmin;
ymin = -2.5;
ymax = -ymin;
zmin = -2.5;
zmax = -zmin;
xsegs = 24.0;
ysegs = 24.0;
zsegs = 24.0;
|
|
Les questions concernant cette page
peuvent être posées sur :
news://news.zoo-logique.org/3D.Blender
|