qrohlf / trianglify

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

Triangles overlap? #76

Closed pwichmann closed 7 years ago

pwichmann commented 7 years ago

First of all, thank you for a truly amazing library!

I found that in my results the corners of the triangles overlap. Is there a way to prevent that from happening?

image

qrohlf commented 7 years ago

Try either decreasing the stroke_width value, or increasing your canvas size and cell size. The default stroke width is set up for display at typical screen resolution, and overdraws in order to prevent antialiasing artifacts that occur with coincident lines in SVG.

pwichmann commented 7 years ago

Lightning fast reaction, many thanks!

My canvas size is small:

I have now set the parameters to: stroke_width: 1.1 cell_size: value between 20 and 80

Does that sound reasonable? Is there any rule of thumb I could apply to sanity check my settings?

Many thanks!

qrohlf commented 7 years ago

That seems reasonable. In order to have truly zero overlap between triangle vertices you would need to set the stroke width to zero, but this may lead to antialiasing artifacts. The best way to find out is to experiment, since the severity of these artifacts will depend on your color scheme and rendering method.

On Fri, Jun 30, 2017 at 2:21 PM pwichmann notifications@github.com wrote:

Lightning fast reaction, many thanks!

My canvas size is small:

  • width: 300
  • height: 200

I have now set the parameters to: stroke_width: 1.1 cell_size: value between 20 and 80

Does that sound reasonable? Is there any rule of thumb I could apply to sanity check my settings?

Many thanks!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/qrohlf/trianglify/issues/76#issuecomment-312375689, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVMNdv7gvGFxexuLXFhqI94tKANKESgks5sJWbpgaJpZM4OLBL3 .