POV-Ray : Newsgroups : povray.newusers : Polygon not rendering in 3d Server Time
28 Jul 2024 14:27:05 EDT (-0400)
  Polygon not rendering in 3d (Message 1 to 4 of 4)  
From: terminallyconfused
Subject: Polygon not rendering in 3d
Date: 5 Aug 2008 09:35:00
Message: <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?

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

From: Chris B
Subject: Re: Polygon not rendering in 3d
Date: 5 Aug 2008 11:07:34
Message: <48986cb6@news.povray.org>
"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

From: Thorsten Froehlich
Subject: Re: Polygon not rendering in 3d
Date: 5 Aug 2008 14:13:17
Message: <4898983d$1@news.povray.org>
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

From: Tim Attwood
Subject: Re: Polygon not rendering in 3d
Date: 5 Aug 2008 21:39:53
Message: <489900e9$1@news.povray.org>
> 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

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