triangulate a shape

hello,

does anyone know of an algorithm, implementation or class that triangulates or polygonizes a java.awt.Shape ?

it would help me with rendering the shape using OpenGL. the input should be the shape data and the output should the list of vertices and the respective faces

so a converter from
java.awt.Area to java.awt.Polygon would be nifty

thanks!

I don’t really understand your question.

Sorry but if you wish to create a polygonal model from a mathematical model(A shape of any kind) you need an equation.

Here’s the class I used in Phys2D for triangulating shapes:

http://phys2d.googlecode.com/svn/trunk/phys2d/src/net/phys2d/util/Triangulator.java

Kev