polygons with holes(toxi)
in
Contributed Library Questions
•
1 year ago
hi
i am trying to reproduce the map from this thread in 2D. I got just the boundary points (not the landmass) from the dataset that is mentioned at the end of the post. i draw the map and then i choose countries to see how the polygon is drawn. So polygons with no holes are correctly drawn,
Germany with no islands
and from the same area France
and this is the code
i am trying to reproduce the map from this thread in 2D. I got just the boundary points (not the landmass) from the dataset that is mentioned at the end of the post. i draw the map and then i choose countries to see how the polygon is drawn. So polygons with no holes are correctly drawn,
Germany with no islands
and from the same area France
and this is the code
- selectedCountry=new Polygon2D(load.coords.get(p1.stringValue()));
- fill(100);
- gfx.polygon2D(selectedCountry);
- // vor=new Voronoi(load.coords.get(p1.stringValue()).size());
- for (int i = 0; i < load.coords.get(p1.stringValue()).size(); i++) {
- fill(0,0,255);
- ellipse(load.coords.get(p1.stringValue()).get(i).x,
- load.coords.get(p1.stringValue()).get(i).y, .5f,.5f);
- }
i have read the thread 100 times i have also tried the code that toxi posted(with voronoi & delaunay triang.) but with similar results. (i am not posting them now so an not to make this post huge, of course i will if someone comes in)
obviously i am missing something, but how do we fix this?
anyone can help me understand? where do i go from here?
obviously i am missing something, but how do we fix this?
anyone can help me understand? where do i go from here?
1