![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Does the polygon primitive only draw 2D polygons or am I doing something wrong
when I try to use it to draw a pentagon in 3D?
I walked through the tutorial portion that deals with rendering polygons. The
tutorial focuses on a 2d polygon but I was assuming as I read it that if I
specified z components for the points, the polygon primitive would still work.
I loaded 5 points for my first attempt at building a single surface on a
dodecahedron and got a black screen. To make sure the camera and lights were
reasonably oriented, I culled the z components from the pentagon's vertices and
got a flat pentagon. Put the z components back in after verifying that the 5
points did lie in a plane and the polygon vanished again. I was subsequently
able to render the pentagon by stitching together three triangles using the 5
points.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"terminallyconfused" <nomail@nomail> wrote in message
news:web.489855e7bc511af377a8183b0@news.povray.org...
> Does the polygon primitive only draw 2D polygons or am I doing something
> wrong
> when I try to use it to draw a pentagon in 3D?
Yes it only draws 2D polygons (it is planar). The prism object is the
equivalent 3D object which enables you to extrude a polygonal shape by a
specified amount. In this case I suspect you'll be wanting to specify a
linear_spline and linear_sweep for the prism object.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris B wrote:
> "terminallyconfused" <nomail@nomail> wrote in message
> news:web.489855e7bc511af377a8183b0@news.povray.org...
>> Does the polygon primitive only draw 2D polygons or am I doing
>> something wrong
>> when I try to use it to draw a pentagon in 3D?
>
> Yes it only draws 2D polygons (it is planar).
Your explanation falls short explaining the real issue:
The polygon is 3D, but all points (vertices) have to be within a plane. This
is not a limitation of POV-Ray, but a mathematical necessity because one
cannot define a 3D polygon unambiguously unless all points are within a
plane. Thus, the points are all 3D, but the polygon will not be well-defined
unless the points are all in some plane. Unless a computer generates the 3D
points, usually it is easier to specify the polygon in the x-y plane
(basically 2D) and then transform it.
Thorsten
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Unless a computer generates the 3D points, usually it is easier to specify
> the polygon in the x-y plane (basically 2D) and then transform it.
Not only is it easier, but because of floating point errors, a
well behaved polygon created on 3D points may be detected
as not co-plannar, and not render in POV. =(
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |