|
|
> See p.advanced-users.
> Message-ID: <3d6bd332$1@news.povray.org>
Needs param.inc and makemesh.inc from
http://members.home.nl/seedseven/
direct link:
http://members.home.nl/seedseven/MMMM.zip
---%<------%<---
#version 3.5;
#include "colors.inc"
#include "param.inc"
global_settings {
assumed_gamma 1.0
}
#declare w=function(u,v){
min(1, (1-u-v)/max( 1-2*u*v,0.001 ) )
}
#macro bezier3(A,B,C,D,E,F,G)
#local Ax=A.x; #local Ay=A.y; #local Az=A.z;
#local Bx=B.x; #local By=B.y; #local Bz=B.z;
#local Cx=C.x; #local Cy=C.y; #local Cz=C.z;
#local Dx=D.x; #local Dy=D.y; #local Dz=D.z;
#local Ex=E.x; #local Ey=E.y; #local Ez=E.z;
#local Fx=F.x; #local Fy=F.y; #local Fz=F.z;
#local Gx=G.x; #local Gy=G.y; #local Gz=G.z;
object {
Parametric(
function(u,v) { //functions from Micha Riser
u*u*(1-2*u*w(u,v) )*Ax
+ 2*u*v*(1-w(u,v) )*Bx
+ v*v*(1-2*w(u,v)*u)*Cx
+ 2*v*w(u,v)*(1-u)*Dx
+ pow(w(u,v),2)*(1-2*u*v)*Ex
+ 2*u*w(u,v)*(1-v)*Fx
+ 4*u*v*w(u,v)*Gx
},
function(u,v) {
u*u*(1-2*u*w(u,v) )*Ay
+ 2*u*v*(1-w(u,v) )*By
+ v*v*(1-2*w(u,v)*u)*Cy
+ 2*v*w(u,v)*(1-u)*Dy
+ pow(w(u,v),2)*(1-2*u*v)*Ey
+ 2*u*w(u,v)*(1-v)*Fy
+ 4*u*v*w(u,v)*Gy
},
function(u,v) {
u*u*(1-2*u*w(u,v) )*Az
+ 2*u*v*(1-w(u,v) )*Bz
+ v*v*(1-2*w(u,v)*u)*Cz
+ 2*v*w(u,v)*(1-u)*Dz
+ pow(w(u,v),2)*(1-2*u*v)*Ez
+ 2*u*w(u,v)*(1-v)*Fz
+ 4*u*v*w(u,v)*Gz
}
<0,0>,<1,1>
50, 50,""
)
}
#end
object {
bezier3(
<0,0,0>,<0.5,1,0>,<1,0,0>,
<1,1,0.4>,<1,0,1>,
<0.5,1,0.5>,<0.7,1.5,0.3>
)
texture {
uv_mapping
pigment {checker scale 0.1}
}
}
light_source{<0,5,0> rgb 1}
camera{
location <0,4,-1>
look_at 0.5
angle 40
}
plane{y,0 pigment{rgb <0,0,1>}}
---%<------%<---
Post a reply to this message
|
|