Login  Register

Regaring union of two polygons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Regaring union of two polygons

Dilip Baluguri
4 posts
Hello everyone,
      Can anyone help me to find union of two polygons (polygons can be
convex or concave). Number of sides are not fixed, it can range from 5 to
50 sides. I do have all the vertices. Can someone help me out with useful
links or Java code. Thanks in advance.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Regaring union of two polygons

dscho
1631 posts
Hi,

On Mon, 18 Jan 2010, Dilip Baluguri wrote:

>       Can anyone help me to find union of two polygons (polygons can be
> convex or concave). Number of sides are not fixed, it can range from 5
> to 50 sides. I do have all the vertices. Can someone help me out with
> useful links or Java code. Thanks in advance.

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/GeneralPath.html#append(java.awt.Shape,
boolean)

Note that java.awt.Polygon is a Shape, and note further that the union of
two polygons does not need to be a polygon itself.

Hth,
Dscho