[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I solved the polygon problem.

From: David Feuer
Subject: I solved the polygon problem.
Date: Tue, 4 Apr 2006 14:52:29 -0400

Use the postscript "arct" command.  Drawing a filled polygon becomes

x0 x1 add 2 div y0 y1 add 2 div moveto
x1 y1 x2 y2 r arct
x2 y2 x3 y3 r arct
x3 y3 x4 y4 r arct
x(n-1) y(n-1) x0 y0 r arct
x0 y0 x1 y1 r arct

where n is the number of points and r is the radius of the arc.

arct is a language level 2 feature, but it shouldn't be too hard to
emulate it in level 1 if need be (using arc).

I don't know SVG, but it should be possible to use the same technique there.

David Feuer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]