Skip to content

Instantly share code, notes, and snippets.

@froeba
Last active November 9, 2018 09:51
Show Gist options
  • Save froeba/0ce2240a69b88e50f030c357075b78c8 to your computer and use it in GitHub Desktop.
Save froeba/0ce2240a69b88e50f030c357075b78c8 to your computer and use it in GitHub Desktop.

Sierpinski Triangle Explorer

The exercise is to create a Sierpinski Triangle Explorer. A single page app written in JavaScript and HTML that draws a Sierpinski Triangle.

The wikipedia page (http://en.wikipedia.org/wiki/Sierpinski_triangle) should provide enough detail on how it’s drawn.

The app should support:

  • zooming in and out
  • panning

As the Sierpinski Triangle is a fractal, zooming in always reveals more detail.

You can choose:

  • How to implement it
  • What it looks like
  • Which libraries to use (if any)
  • Whether to use recursion or iteration, etc.
  • How to deliver it to us

This is a coding test and not a mathematics assessment. You are welcome to use online resources, but please try not to be influenced by an existing solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment