qrohlf / trianglify

Algorithmically generated triangle art
http://qrohlf.com/trianglify/
GNU General Public License v3.0
10.08k stars 669 forks source link

make round corner of triangle shapes on canvas #107

Closed Allidylls closed 5 years ago

Allidylls commented 5 years ago

For wide storke with default 'miter' lineJoin style on canvas, some very pointed shape corners may be cut by neighbours, and cause isolated color points.

cell_size = 1000, stroke_width = 20, default miter lineJoin trianglify-2 0 0-canvas-wide-before-0

The 'round' lineJoin style fix this problem.

cell_size = 1000, stroke_width = 20, round lineJoin trianglify-2 0 0-canvas-wide-after

And, especially with option 'stroke_color' proposed by @EpicKris in #91, amazing images like mosaic-pattern or porcelain-open can be made.

cell_size = 1000, stroke_width = 20, stroke_color = '#333333' trianglify-2 0 0-canvas-wide

cell_size = 50, stroke_width = 2, stroke_color = '#333333' trianglify-2 0 0-canvas-round

qrohlf commented 5 years ago

Nice mitigation, this looks great with the stroke_color option.

SmolSoftBoi commented 5 years ago

I'm so happy to finally see stroke colour! I've actually been using these patterns with a stroke colour for my business branding, they look great on our product labels!

Allidylls commented 5 years ago

Your PR is NOT merged currently. It's pointed out that "This branch is out-of-date with the base branch", and you should "Merge the latest changes from master into this branch." fisrt.

SmolSoftBoi commented 5 years ago

Thanks for reminding me of this!