|
![](/i/fill.gif) |
"Pahidla" <dol### [at] yahoo com> wrote in message
news:web.46ef777c6a46897c3ccd3f470@news.povray.org...
> Thanks!
>
> Is there such a thing as a "rectangle", rather than a "box"?
there are polygons, and triangles. If I want to create a rectangle, I use
this macro:
#macro Quad(P1,P2,P3,P4)
triangle {P1,P2,P3} triangle {P1,P3,P4}
#end
(you'll have to put this inside a mesh, like this:
mesh {
Quad(<0,0,0>,<0,1,0>,<1,1,0>,<1,0,0>)
}
You could even add uv-coordinates, like this: (untested code!!!)
#macro Quad(P1,P2,P3,P4)
triangle {P1,P2,P3 uv_vectors <0,0>,<0,1>,<1,1>}
triangle {P1,P3,P4 uv_vectors <0,0>,<1,1>,<1,0>}
#end
mesh {
Quad(<0,0,0>,<0,1,0>,<1,1,0>,<1,0,0>)
texture {
uv_mapping pigment {image_map {jpeg "puppy.jpg" interpolate 2}}
finish {ambient 0 diffuse 1}
}
}
cu!
--
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x) // ZK http://www.povplace.com
Post a reply to this message
|
![](/i/fill.gif) |