- For that I’m having the co-ordinates of the polygon(not in either clock-wise or anti-clockwise order).
- I can sort them in one order. But, what I need to do is,I have to divide that polygon into convex polygons for mapping textures properly.
3.The polygon what Im getting is rectilinear polygon(polygon with edges parallel to XZ co-ordinate axes) with n-sides.
4.I want to convert it into convex polygons.
I have attached some complex cases in which I’m facing more problems…
Case 1:
---------
| |
| |
----------------- |
| ----------------
| |
| |
| ---------------
-------------- |
| |
| |
| |
---------------
The Co-ordinates are,
150,100
150,150
70,150
70,250
120,250
120,300
220,300
220,230
250,230
250,170
200,170
200,100
case 2:
-----------------
| |
| |
| |
---- ----
| |
| |
| |
---- ----
| |
| |
| |
------------------
The Co-ordinates are,
100,100
100,175
150,175
150,225
100,225
100,300
300,300
300,225
225,225
225,175
300,175
300,100
Could anyone please guide me how to overcome this problem?