User:Le Forgeron/polyline

From POV-Wiki
Jump to navigation Jump to search

Polyline

Similar to polygon, but using the absolute value of the winding number instead of odd-even filling.

Syntax

 polyline { \(Px [,]\)\{3,n\} range { \(<low,high>\)\{1,m\} } OBJECT_MODIFIERS }

    n coplanars points Px 
    <low,high> specification of interval for winding number

Winding number

Only the absolute number is considered (the notions of clockwise & anti-clockwise vary with the orientation of the system).

"winding number"

#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 { 2 }
  texture { pigment { color srgb 0.5 }}
}
polyline
{
  A, B, C, D,
  E, F, G, H,
  I, J, K, A
  range { 1 }
  texture { pigment { color srgb 0.75 }}
}