POV-Ray : Newsgroups : povray.advanced-users : Density filling option for polygon : Re: Density filling option for polygon Server Time
29 Apr 2024 12:24:28 EDT (-0400)
  Re: Density filling option for polygon  
From: clipka
Date: 6 Jun 2018 10:12:03
Message: <5b17ebb3@news.povray.org>
Am 06.06.2018 um 13:56 schrieb William F Pokorny:

> I was thinking up front about point order or winding (cw,ccw) directions
> and what they 'usually' mean - hole or not in the non-POV-Ray world -
> though should have stated that more explicitly. I've not spent time in
> the polygon code, but for prism and text I don't believe our current cw,
> ccw ordering today carries any particular hole, not-hole meaning. We use
> even/odd curve crossing tests to determine insides. If we adopt
> something with respect to ccw/cw point ordering, aligning with the most
> common - or perhaps even standard - definition makes sense(1). To be
> more compatible with external tools if nothing else.

POV-Ray's polygons don't have a well-defined winding order because it
depends on how the common plane (the plane on which all the polygon's
vertices lie) is mapped to pure 2D space.

In 2D space, counter-clockwise winding order for outlines and clockwise
winding order for holes is pretty much the one and only standard out
there; but since there is no guaranteed mapping from 3D space to 2D
space, any algorithm we design needs to be effectively symmetric anyway.

> As said above the winding order idea touches prism and text objects too.
> The latter I know from some performance code work I've done doesn't
> today match match all defined font curve overlapping behaviors - because
> we're not working with set cw/ccw winding definitions.

Text objects are a fun topic with respect to filling: Different font
file formats have different standards; IICR TrueType effectively uses
density filling, whereas Type 1 effectively uses binary filling.
(According to the specs that is; POV-Ray's implementation of TrueType
may indeed differ.)


Post a reply to this message

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