You can draw the n sided polygon with line array or line strip array and
then need to triangulate by your own derived triangulation algorithm to
divide the polygon in to triangles.Then the triangle array can be fed to
java3D shape3D argument. Simple algorithm for triangulation like
delaunay triangulation is used for convex hull generation but
triangulation for the polygon with holes is bit tedius and I am also
looking for the freeware algorithm for this. A triangulation called
Constrained Delaunay Triangulation(CDT) is used for triangulating
polygons with holes with high flexibility. I think Java3D is still not
smart enough to allow you all this features. Should you have little
background on the triangulation things please look for the CDT for hole
generation.
Good Luck.
>From [EMAIL PROTECTED] Wed Jan 20 11:52:25 1999
>Received: from Eng.Sun.COM (engmail4 [129.144.134.6]) by
mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id LAA08699; Wed, 20 Jan
1999 11:51:32 -0800
>Received: from capra.eng.sun.com (capra.Eng.Sun.COM [129.144.125.71])
> by Eng.Sun.COM (SMI-8.6/SMI-5.3) with SMTP id LAA15004;
> Wed, 20 Jan 1999 11:51:24 -0800
>Received: by capra.eng.sun.com (SMI-8.6/SMI-SVR4)
> id LAA18777; Wed, 20 Jan 1999 11:47:26 -0800
>Message-Id: <3.0.1.32.19990120115150.01fcd4e0@tone>
>X-Sender: davef@tone
>X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
>Date: Wed, 20 Jan 1999 11:51:50 -0800
>To: [EMAIL PROTECTED]
>From: David Freda <[EMAIL PROTECTED]>
>Subject: [java3d] Q: n-sided polygons, n > 4 ?
>Mime-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Sender: [EMAIL PROTECTED]
>Precedence: bulk
>
>Hi,
>
>Is there, or will there be, the ability to draw polygons with more than
4
>sides without subdividing them into 3- or 4-sided polygons?
>
>Several times I've searched the documentation to have my question
answered.
> The question seems to have been asked here once before in July, but I
>didn't see an answer to it.
>
>Maybe I missed something, but it seems to me that polys of more than 4
>sides are not supported by the Java3D API. Is this correct? There's
no
>specific wording that one can not do polys of more than 4 sides, which
left
>a few of us wondering if that might change to the spec in the future.
One
>could derive one's own class to handle these (from
IndexedGeometryArray,
>say, and call it IndexedPolygonArray), but I hoped that maybe someone
out
>there could comment on this and set us straight once and for all.
>
>Thanks in advance,
>
>-david
>
>+--------------------------------------------------------------------------+
>+ David Freda, MTS, JPL Mailing Address: M/S 169-315
+
>+ [EMAIL PROTECTED] (work) 4800 Oak Grove
Drive +
>+ [EMAIL PROTECTED] (home) Pasadena, CA 91109
+
>+--------------------------------------------------------------------------+
>DISCLAIMER: JPL now requires notice in all electronic communication
that all
> personal and professional opinions presented herein are my own and do
not,
> in any way, represent the opinion or policy of JPL.
>=====================================================================
>To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
>Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/