0

Resize java Polygon

I have a point array that represents a polygon. Now i want to resize that polygon, so scale it down with a given factor. Are there any build in methods or have you any idea how to implement it in a nice way. Important: I want to change the coordinates of the points, not draw the polygon with a transformation on a jpanel.

13th Nov 2016, 7:10 PM
No One
No One - avatar
2 Respostas
+ 1
Hi, try the code in my code playground use the file Point.java, Polygon.java and PolygonTest.java. Point.java to define a simple class to manipulate geometric points on a plane. Polygon.java is a simple class to create and resize regular polygons inscribed in a circle. I'll write the documentation of classes as soon as possible. bye bye
15th Nov 2016, 10:41 AM
Simone Novaro
Simone Novaro - avatar
0
Thank you! It's awesome
15th Nov 2016, 1:59 PM
No One
No One - avatar