Skip to content

Simple javascript hack to draw a braid word on a canvas.

Notifications You must be signed in to change notification settings

textiles-lab/show-braid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Show Braid

Quick javascript hack to show braids. Braid words are drawn with the rightmost generator in the word at the bottom of the visualization. Positive generators are left-over-right and negative are right-over-left. (Though both of these things could be changed with a few careful edits in Braid_redraw.)

To use, pass a braid in the query string as a number of strands followed by a list of generators:

show-braid.html?4:1,2,1,3,2,1,-3,-2,-3,-1,-2,-3

If you don't specify the strand count it will be automatically inferred:

show-braid.html?1,-5

You can adjust how the braid looks by changing the constants near the top of Braid_redraw.

Example

show-braid.html?4:1,2,1,3,2,1,-3,-2,-3,-1,-2,-3

example braid

License

Public domain.

About

Simple javascript hack to draw a braid word on a canvas.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages