Accueil Carrara : Index 

 

L'éditeur de formules de Carrara Studio - Page 37

Enveloppes des normales

1 - Avec l'hippopède d'Eudoxe

Formule objet Formule texture Rendu
a=8;n=3;
p=2*n*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*cos(p);
yc=a*sin(p);
zc=a*sin(p/n);
xv=-a*sin(p);
yv=a*cos(p);
zv=-a/n*cos(p/n);
xa=-a*cos(p);
ya=-a*sin(p);
za=-a/pow(n,2)*sin(p/n);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm01

2 - Avec le noeud de trèfle

Formule objet Formule texture Rendu
a=3;b=3;c=3;
p=2*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*(cos(p)+2*cos(2*p));
yc=b*(sin(p)-2*sin(2*p));
zc=2*c*sin(3*p);
xv=a*(-sin(p)-4*sin(2*p));
yv=b*(cos(p)-4*cos(2*p));
zv=6*c*cos(3*p);
xa=a*(-cos(p)-8*cos(2*p));
ya=b*(-sin(p)+8*sin(2*p));
za=-18*c*sin(3*p);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm02

3 - Avec les noeuds toriques

Formule objet
a=5;b=2;c=3;m=2;n=5;
p=2*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=(a+b*cos(n*p))*cos(m*p);
yc=(a+b*cos(n*p))*sin(m*p);
zc=c*sin(n*p);
xv=-b*n*sin(n*p)*cos(m*p)-m*(a+b*cos(n*p))*sin(m*p);
yv=-b*n*sin(n*p)*sin(m*p)+m*(a+b*cos(n*p))*cos(m*p);
zv=c*n*cos(n*p);
xa=-cos(m*p)*(a* m*m+b *(m*m+n*n)* cos(n* p))+2* b* m *n *sin(m *p)* sin(n *p);
ya=-(a* m*m+b *(m*m+n*n)* cos(n *p))* sin(m *p)-2 *b* m* n* cos(m *p)* sin(n* p);
za=-c*n*n*sin(n*p);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
 
Formule texture Rendu pour a != 0 , m = 2 et n = 7
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm03

4 - Avec la fenêtre de Viviani

Formule objet Formule texture Rendu
a=2;
p=4*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*(1+cos(p));
yc=a*sin(p);
zc=2*a*sin(p/2);
xv=-a*sin(p);
yv=a*cos(p);
zv=a*cos(p/2);
xa=-a*cos(p);
ya=-a*sin(p);
za=-a*sin(p/2)/2;
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm04

5 - Avec les hélices

Formule objet Formule texture Rendu
a=3;c=3;
p=8*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*cos(p);
yc=a*sin(p);
zc=c*p;
xv=-a*sin(p);
yv=a*cos(p);
zv=c;
xa=-a*cos(p);
ya=-a*sin(p);
za=0;
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm05

6 - Avec la spirale conique de Pappus

Formule objet Formule texture Rendu
a=0.5;t=PI/4;
ct=cos(t);st=sin(t);
p=8*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*st*p*cos(p);
yc=a*st*p*sin(p);
zc=a*ct*p;
xv=a*st*(cos(p)-p*sin(p));
yv=a*st*(sin(p)+p*cos(p));
zv=a*ct;
xa=a*st*(-2*sin(p)-p*cos(p));
ya=a*st*(2*cos(p)-p*sin(p));
za=0;
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm06

7 - Horoptère

Formule objet Formule texture Rendu
a=3;b=3;
p=20*(u-0.5);
q=0.25*(1+p1)*(2*v-1);
dc=1+p*p;
xc=2*a/dc;
yc=b*p;
zc=2*a*p/dc;
xv=-4*a*p/(dc*dc);
yv=b;
zv=2*a*(1-p*p)/(dc*dc);
xa=4*a*(-3*pow(p,4)-2*pow(p,2)+1)/pow(dc,4);
ya=0;
za=2*a*(2*pow(p,5)-4*pow(p,3)-6*p)/pow(dc,4);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm07

8 - Avec une spirale logarithmique

Formule objet Formule texture Rendu
a=3;c=3;m=0.02;
p=20*PI*u;
q=0.25*(1+p1)*(2*v-1);
xc=a*exp(m*p)*cos(p);
yc=a*exp(m*p)*sin(p);
zc=c*exp(m*p);
xv=a*(m*cos(p)-sin(p))*exp(m*p);
yv=a*(m*sin(p)+cos(p))*exp(m*p);
zv=c*m*exp(m*p);
xa=a*(m*m-m*sin(p)-cos(p)*exp(m*p));
ya=a*(m*m+m*cos(p)-sin(p)*exp(m*p));
za=c*m*m*exp(m*p);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm08

9 - 

Formule objet Formule texture Rendu
a=3;c=3;m=2;
p=4*PI*(u-0.5);
q=0.25*(1+p1)*(2*v-1);
xc=a*p*cos(p);
yc=a*p*sin(p);
zc=c*cos(m*p);
xv=a*(cos(p)-p*sin(p));
yv=a*(sin(p)+p*cos(p));
zv=-c*m*sin(m*p);
xa=a*(-2*sin(p)-p*cos(p));
ya=a*(2*cos(p)-p*sin(p));
za=-c*m*m*cos(m*p);
xva=yv*za-ya*zv;
yva=zv*xa-za*xv;
zva=xv*ya-xa*yv;
sva=xv*xva+yv*yva+zv*zva;
nv=sqrt(pow(xv,2)+pow(yv,2)+pow(zv,2));
nva=sqrt(pow(xva,2)+pow(yva,2)+pow(zva,2));
xn1=(nv*xa-(sva/nv)*xv)/nva;
yn1=(nv*ya-(sva/nv)*yv)/nva;
zn1=(nv*za-(sva/nv)*zv)/nva;
x=xc+q*xn1;
y=yc+q*yn1;
z=zc+q*zn1;
mt=20;
q=0.25*(1+p1)*(2*v-1);
red=abs(cos(mt*q));
blue=1-red;
green=0;
envnorm09

Documentation

Documentation