POV-Ray : Newsgroups : povray.general : Coplanarity of 4 points in space Server Time
25 Dec 2024 09:18:20 EST (-0500)
  Coplanarity of 4 points in space (Message 1 to 5 of 5)  
From: stevenvh
Subject: Coplanarity of 4 points in space
Date: 9 Nov 2016 03:45:00
Message: <web.5822e12e34a5e2dfddeb13060@news.povray.org>
I recently bumped into a problem when working on polygons. Most of my pentagons
weren't generated. In the end changing the points' coordinates from 8
significant digits to 15 significant digits solved the problem. Shouldn't 8
digits be sufficient? That's enough to describe a 100 mm object with a 1 micron
accuracy. Shouldn't POVray take some margin of error into account?


Post a reply to this message

From: scott
Subject: Re: Coplanarity of 4 points in space
Date: 9 Nov 2016 03:56:33
Message: <5822e4c1$1@news.povray.org>
> I recently bumped into a problem when working on polygons. Most of my pentagons
> weren't generated. In the end changing the points' coordinates from 8
> significant digits to 15 significant digits solved the problem. Shouldn't 8
> digits be sufficient? That's enough to describe a 100 mm object with a 1 micron
> accuracy. Shouldn't POVray take some margin of error into account?

Draw them as 3 triangles instead?


Post a reply to this message

From: William F Pokorny
Subject: Re: Coplanarity of 4 points in space
Date: 9 Nov 2016 08:10:46
Message: <58232056$1@news.povray.org>
On 11/09/2016 03:41 AM, stevenvh wrote:
> I recently bumped into a problem when working on polygons. Most of my pentagons
> weren't generated. In the end changing the points' coordinates from 8
> significant digits to 15 significant digits solved the problem. Shouldn't 8
> digits be sufficient? That's enough to describe a 100 mm object with a 1 micron
> accuracy. Shouldn't POVray take some margin of error into account?
>
>
There are epsilon fuzz values - tuning values - in use throughout the 
POV-RAY code. Without specifics, unsure what might be happening in your 
case.

I'll offer 2D objects like the polygon(1) are not all that much used in 
part because they are 2D objects. Meaning when a ray approaches in a way 
essentially in the plane in which the 2D object exists, it can be a 
substantial portion - or all - of the rays passing near, miss.

It might be too you've found a bug. If you think so, and you want others 
to verify it, please post as short a scene as possible which shows 
failing and passing cases to povray.bugreports.

Bill P.
(1) The prism object is an alternative allowing for depth >0.


Post a reply to this message

From: clipka
Subject: Re: Coplanarity of 4 points in space
Date: 9 Nov 2016 10:22:05
Message: <58233f1d$1@news.povray.org>
Am 09.11.2016 um 09:41 schrieb stevenvh:
> I recently bumped into a problem when working on polygons. Most of my pentagons
> weren't generated. In the end changing the points' coordinates from 8
> significant digits to 15 significant digits solved the problem. Shouldn't 8
> digits be sufficient? That's enough to describe a 100 mm object with a 1 micron
> accuracy. Shouldn't POVray take some margin of error into account?

Maybe you're simply using an unsuited scale. POV-Ray uses fixed absolute
margins for many purposes, rather than margins relative to the
magnitudes involved (though I think this is not the problem here).

Also, the absolute location of the polygons may play a role. If you're
specifying vertex coordinates with 8 significant digits, but your
polygon contains a pair of vertices that differ only in, say, the last 2
of those 8 digits, then rounding can be expected to introduce a
deviation from the plane of about 1%.


Post a reply to this message

From: Alain
Subject: Re: Coplanarity of 4 points in space
Date: 9 Nov 2016 19:37:54
Message: <5823c162@news.povray.org>

> I recently bumped into a problem when working on polygons. Most of my pentagons
> weren't generated. In the end changing the points' coordinates from 8
> significant digits to 15 significant digits solved the problem. Shouldn't 8
> digits be sufficient? That's enough to describe a 100 mm object with a 1 micron
> accuracy. Shouldn't POVray take some margin of error into account?
>
>
If possible, try to only use 2D coordinate for your polygon, then, apply 
any required rotation.

Yes, there is some margin error that is tolerated, it's the epsilon 
value. It's rather small, around 1e-9 I think.


Post a reply to this message

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