# Tangram generator

**URL:** <https://forum.electromage.com/t/tangram-generator/1545>\
**Category:** Patterns and Code\
**Created:** [September 4, 2021, 4:29pm UTC](https://forum.electromage.com/t/tangram-generator/1545 "2021-09-04T16:29:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scruffynerf](https://forum.electromage.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Scruffynerf](https://forum.electromage.com/u/Scruffynerf)\
**Post date:** [September 4, 2021, 4:29pm UTC](https://forum.electromage.com/t/tangram-generator/1545/1 "2021-09-04T16:29:38Z")

</div>

No code yet, but want to record this so I build it later.

JavaScript tangram generators exist. All of the shapes in a tangram are triangle derived and a simple 3 dots in an L shape is a minimal triangle in LEDs. The solid square example in tangrams if done with the small triangle as 6 LEDs (2 minimal triangles, back to back), fits into just 8x8…so a 16x16 has enough room for most randomized tangrams. So a tangram art generator should be a nice pattern. Different colors distinguish each shape. Alternatively, the minimal triangle is 3 on a side, making the square solution 12x12… Still works, but some larger puzzles/combos won’t fit in 16x16. Middle ground would be 2.5 LEDs in minimal, which works because the smallest tile triangle would have a base of 5 LEDs, and be 3 tall, and the square solution would be 10x10.

[http://wiebke-koepp.de](http://wiebke-koepp.de)

> **[GitHub - Wiebke/TangramGenerator: Tangram-Generator in Javascript](https://github.com/Wiebke/TangramGenerator)**
>
> Tangram-Generator in Javascript. Contribute to Wiebke/TangramGenerator development by creating an account on GitHub.
