|
|
Hello everybody,
I just downloaded the 3.1 version of POV for Windows 95, and I am
testing a few scripts of mine. The first thing that I noticed is
that you must put a ';' when #declaring a float. Then it goes with
no warning. But this script that draws a star is not working well.
Only part of the vertex are drawn. I'm wondering if it's a bug of
the 3.1 version ... The initial 3.02 script that is available on
my home page at :
http://www.ief.u-psud.fr/~lecoat/vrml/etoile.pov
is not working even if you add the #version 3.0;
directive ... Thanks to help me ...
-- Francois LE COAT
Author of Eureka 2.12 (2D Graph Describer 3D Modeller)
WEB : http://www.ief.u-psud.fr/~lecoat
E-mail : mailto:lec### [at] iefu-psudfr
________________________________________________________________________#declare
Green_Phong = texture {
pigment { color rgb <0.0,0.5,0.5> }
normal { ripples 0.5 scale 0.1 }
finish { phong 1.0 phong_size 5.0 }
}
#declare xmin = 0;
#declare xmax = 2*pi;
#declare ymin = 0;
#declare ymax = pi;
#declare xiter = 11;
#declare yiter = 5;
#declare ix = (xmax-xmin)/(xiter-1.0);
#declare iy = (ymax-ymin)/(yiter-1.0);
#declare deltax = (xmax-xmin)/((xiter-1.0)*4.0);
#declare deltay = (ymax-ymin)/((yiter-1.0)*4.0);
#macro point (xx,yy)
#local ro=max((1-3*sin(2*yy)*sin(5*xx+pi/2)),0);
#declare zn=-ro*sin(yy)*cos(xx);
#declare xn=ro*sin(yy)*sin(xx);
#declare yn=ro*cos(yy);
#declare xx=xx+deltax;
#local ro=max((1-3*sin(2*yy)*sin(5*xx+pi/2)),0);
#local zp=-ro*sin(yy)*cos(xx);
#local xp=ro*sin(yy)*sin(xx);
#local yp=ro*cos(yy);
#declare xx=xx-deltax;
#declare yy=yy+deltay;
#local ro=max((1-3*sin(2*yy)*sin(5*xx+pi/2)),0);
#local zq=-ro*sin(yy)*cos(xx);
#local xq=ro*sin(yy)*sin(xx);
#local yq=ro*cos(yy);
#declare yy=yy-deltay;
#declare vn=vcross(<xp-xn,yp-yn,zp-zn>,<xq-xn,yq-yn,zq-zn>);
#end
#declare etoile = mesh {
#declare xx = xmin;
#while (xx<xmax) //outer loop
#declare yy = ymin;
#while (yy<ymax) //inner loop
//POINTS
point(xx,yy)
#declare n1=vnormalize(vn);
#declare p1=<xn,yn,zn>;
#declare yy=yy+iy;
point(xx,yy)
#declare n2=vnormalize(vn);
#declare p2=<xn,yn,zn>;
#declare xx=xx+ix;
point(xx,yy)
#declare n3=vnormalize(vn);
#declare p3=<xn,yn,zn>;
#declare yy=yy-iy;
point(xx,yy)
#declare n4=vnormalize(vn);
#declare p4=<xn,yn,zn>;
#declare xx=xx-ix;
#if(!(p1.x=p2.x&p1.y=p2.y&p1.z=p2.z)|(p2.x=p3.x&p2.y=p3.y&p2.z=p3.z)|(p1.x=p3.x&p1.y=p3.y&p1.z=p3.z))
smooth_triangle {
p1,n1,
p2,n2,
p3,n3
}
#end
#if(!(p1.x=p3.x&p1.y=p3.y&p1.z=p3.z)|(p3.x=p4.x&p3.y=p4.y&p3.z=p4.z)|(p1.x=p4.x&p1.y=p4.y&p1.z=p4.z))
smooth_triangle{
p1,n1,
p3,n3,
p4,n4
}
#end
#declare yy = yy+iy;
#end //inner loop
#declare xx = xx+ix;
#end //outer loop
scale 1/5
}
object {
etoile
no_shadow
texture { Green_Phong }
}
//Lights, camera, action
camera
{ location < 1, 1.25, -1>
direction 1*z
look_at < 0, 0, 0>
}
light_source { < 0, 1.25, -1> color rgb 1 }
light_source { < 1, 1.25, -1> color rgb 1 }
object { box{-2,2 inverse} pigment{color rgb 0.8} }
_______________________________________________________________________
Post a reply to this message
|
|