Accueil | Carrara : Index |
x=a*(cos(q)>0?pow(cos(q),n):-pow(-cos(q),n)); |
x=f(p); |
On introduit un deuxième paramètre (q) de la façon suivante :
x=a*(sin(q)>0?pow(sin(q),n):-pow(-sin(q),n))*f(p); |
le paramètre p variant de 0 à 2*PI
Pour avoir un aspect "plaque", prendre n strictement positif voisin de 0 (par exemple n=1/5)
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*cos(p); y=a*r*sin(p); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
mt=4; p=2*PI*u; q=PI*v; red=abs(cos(mt*(p-q))); blue=abs(cos(mt*(p+q))); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*cos(p); y=a*r*sin(p); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
n=0.2; q=PI*v; red=pow(abs(cos(q/n)),n); blue=pow(abs(sin(q/n)),n); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*(1+cos(p))*cos(p); y=a*r*(1+cos(p))*sin(p); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
mt=4; p=2*PI*u; q=PI*v; red=abs(cos(mt*(p-q))); blue=abs(cos(mt*(p+q))); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*(1+cos(p))*cos(p); y=a*r*(1+cos(p))*sin(p); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
n=0.2; q=PI*v; red=pow(abs(cos(q/n)),n); blue=pow(abs(sin(q/n)),n); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*pow(cos(p),3); y=a*r*pow(sin(p),3); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
mt=4; p=2*PI*u; q=PI*v; red=abs(cos(mt*(p-q))); blue=abs(cos(mt*(p+q))); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*pow(cos(p),3); y=a*r*pow(sin(p),3); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
n=0.2; q=PI*v; red=pow(abs(cos(q/n)),n); blue=pow(abs(sin(q/n)),n); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*(2*cos(p)+cos(2*p)); y=a*r*(2*sin(p)-sin(2*p)); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
mt=4; p=2*PI*u; q=PI*v; red=abs(cos(mt*(p-q))); blue=abs(cos(mt*(p+q))); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*(2*cos(p)+cos(2*p)); y=a*r*(2*sin(p)-sin(2*p)); z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
n=0.2; q=PI*v; red=pow(abs(cos(q/n)),n); blue=pow(abs(sin(q/n)),n); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*sin(p); y=a*r*sin(2*p)/2; z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
mt=4; p=2*PI*u; q=PI*v; red=abs(cos(mt*(p-q))); blue=abs(cos(mt*(p+q))); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |
Objet | Texture |
a=10;c=0.5;n=0.2; p=2*PI*u; q=PI*v; cq=cos(q); sq=sin(q); r=(sq>0?pow(sq,n):(sq<0?-pow(-sq,n):0)); x=a*r*sin(p); y=a*r*sin(2*p)/2; z=c*(cq>0?pow(cq,n):(cq<0?-pow(-cq,n):0)); |
n=0.2; q=PI*v; red=pow(abs(cos(q/n)),n); blue=pow(abs(sin(q/n)),n); green=1-red*blue; |
Rendu (vue de trois-quarts) | Rendu (vue de dessus) |
![]() |
![]() |