POV-Ray : Newsgroups : povray.windows : This Scrip is not working on POV 3.1 ... BUG ? : Re: This Scrip is working on POV 3.1 Server Time
28 Jul 2024 16:24:37 EDT (-0400)
  Re: This Scrip is working on POV 3.1  
From: LE COAT Francois
Date: 13 Jul 1998 10:23:24
Message: <35AA0C99.D3A53891@ief.u-psud.fr>
Hello,

In Fact, working a little on this script, we can imagine that
maybe normals are too "sharp". When the normal is too sharp
POV 3.1 eliminates the considered vertex. So in this script
I eliminated the smooth_triangle, and replaced it by simple
triangle. Like this it works ...

-- Francois LE COAT

_______________________________________________________________________
#declare Gold_Phong = texture {
	pigment { color rgb <1.0,0.84,0.0> }
	normal { ripples 0.5 scale 0.1 }
	finish { phong 0.5 phong_size 1.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);
#macro point(uu,vv)
    #local ro=max((1-3*sin(2*vv)*sin(5*uu+pi/2)),0);
    #declare zn=-ro*sin(vv)*cos(uu);
    #declare xn=ro*sin(vv)*sin(uu);
    #declare yn=ro*cos(vv);
#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 p1=<xn,yn,zn>;

    #declare yy=yy+iy;
    point(xx,yy)
    #declare p2=<xn,yn,zn>;

    #declare xx=xx+ix;
    point(xx,yy)
    #declare p3=<xn,yn,zn>;

    #declare yy=yy-iy;
    point(xx,yy)
    #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))
        triangle { p1, p2, p3 }
#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))
        triangle { p1, p3, p4 }
#end

      #declare yy = yy+iy;
   #end                 //inner loop
   #declare xx = xx+ix;
 #end                   //outer loop
 scale 1/5
}

object {
 etoile
 texture { Gold_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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.