Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

The best way to draw a (filled) hexagons in ofPath or ofPolyline

$
0
0

@nosarious wrote:

I have a collection of points for a hexagon that consist of a vector of 6 ofVec3f and one ofVec3f for the centre.

the 6 are in order and can create a polyline from points 0 - 5.

I can draw a filled ofPath currently, but I get voids when I try to fill them, as if the slope(?) or normal between points gets too extreme, although this isn't consistent. (some 'flatter' hexagons have voids as well, and some extremely stretched ones are fine)

I know that, when using polylines, one gets better results when including triangles but I am unsure how to start this kind of polyline to get the best results.

             1      2

          0     cp     3

             5      6

you can see some of the visual problems with just using the corners of the hexes for polylines here:

http://gersart.tumblr.com/post/152106216934/some-odd-tesselation-problems-here
http://gersart.tumblr.com/post/152060984634/oops-httpifttt2env1py

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles