Skip to content

Instantly share code, notes, and snippets.

View bmershon's full-sized avatar

Brooks Mershon bmershon

View GitHub Profile
@bmershon
bmershon / .block
Last active December 6, 2016 04:55
Sequence Q III
height: 2000
border: no
license: MIT
@bmershon
bmershon / .block
Last active September 18, 2016 03:15
Equidecomposition II
license: gpl-3.0
height: 500
border: no
@bmershon
bmershon / .block
Last active August 20, 2016 20:57
Equidecomposition
license: gpl-3.0
height: 500
border: no
@bmershon
bmershon / .block
Last active July 22, 2016 03:54
Hofstadter's Chaotic Q Sequence II
border: yes
license: gpl-3.0
height: 5500
width: 1400
scrolling: yes
@bmershon
bmershon / .block
Last active March 22, 2017 12:26
Hofstadter's Chaotic Q Sequence
border: no
license: gpl-3.0
height: 2000
@bmershon
bmershon / .block
Last active September 27, 2023 10:12
Hofstadter's G Sequence
border: no
height: 960
license: gpl-3.0
@bmershon
bmershon / .block
Last active August 10, 2016 06:03
Sutherland-Hodgman Clipping II
license: gpl-3.0
border: yes
@bmershon
bmershon / .block
Last active May 7, 2016 15:37
Triangle to Square II
license: gpl-3.0
border: yes
@bmershon
bmershon / README.md
Last active July 8, 2016 00:18
Sutherland-Hodgman Clipping

The Sutherland-Hodgman clipping algorithm is used here to compute the intersection of two Delaunay triangulations with one another. Sutherland-Hodgman implementation by Joy Patel.

This algorithm can be used to intersect the decomposition of one triangle with a decomposition coming from another triangle of equal area.

For a decomposition of two triangles of equal area that uses Sutherland-Hodgman clipping, see this example.

See d3-equidecompose.

@bmershon
bmershon / README.md
Last active May 5, 2016 21:08
Triangle to Square

Any polygon can be decomposed into a finite (though possibly large) number of polygons that can be rearranged through rotations and translations to form another polygon of equal area. This is known as equidecomposition.

The first step in one well-known algorithm for accomplishing this involves decomposing a triangle into a square.

In order to decompose a triangle into another triangle of equal area, it is necessary to intersect collections of polygons contained in a square common to both triangles.

See d3-equidecompose.