POV-Ray : Newsgroups : povray.advanced-users : Density filling option for polygon : Re: Density filling option for polygon Server Time
29 Apr 2024 04:53:09 EDT (-0400)
  Re: Density filling option for polygon  
From: Hedrondude
Date: 7 Sep 2018 16:35:01
Message: <web.5b92e0764a5570bb478b32bb0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 03/06/2018 à 05:24, Hedrondude a écrit :
> > I'm using POV-Ray to render cross sections of four and five dimensional uniform
> > polytopes - especially star polytopes.  These renders can be seen on my website
> > http://www.polyope.htm/hedrondude/polychora.htm  I use the polygon keyword quite
> > a bit, but it only renders with the binary filling (all odd density regions gets
> > filled in, even density are left as holes) which forces me to manually fill in
> > all the non-0 even density regions.  This isn't too bad for simple polytopes,
> > but with more complex ones, this gets very tedious.  Is it possible to render
> > polygons with density filling (all non-0 density regions gets filled in - i.e.
> > filled in by the 'winding method') or better yet could this be a feature for
> > POV-Ray 3.8 where there is a density filling option for the polygon keyword.  I
> > would suggest something like this:
> >
> > #local obj=polygon {45,v1,v2,v3,......,v44,v1 density}
> >
> >
>
> I did an experimentation on
> https://github.com/LeForgeron/povray/tree/extension/winding-polyline
>
> #declare A=<0,3,0>;
> #declare B=<6,3,0>;
> #declare C=<4.5,1,0>;
> #declare D=<7,2,0>;
> #declare E=<4.5,6,0>;
> #declare F=<7,4,0>;
> #declare G=<2,4,0>;
> #declare H=<4,6,0>;
> #declare I=<4,0,0>;
> #declare J=<5,0,0>;
> #declare K=<5,8,0>;
> polyline
> {
>   A, B, C, D,
>   E, F, G, H,
>   I, J, K, A
>   range { <1,2> }
>   texture { pigment { color srgb 0.5 }}
> }

Excuse the late reply, I haven't been on the forum in a while.

The experiment looks right.  Is there a way to add this code to POV-Ray before
the next update?


Post a reply to this message

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