---
title: "Drawing mandalas with JavaScript and canvas"
summary: Rewriting a PHP script from 2008 in JavaScript.
summary_image: /images/mandala.png
tags: [javascript]
---
I was looking through my old blog posts when I came across [Drawing mandalas
with PHP for my
Papa](/blog/drawing-mandalas-with-php-for-my-papa)
from back in 2008.
Having just played with the HTML5 canvas tag as part of my
[Winamp2-js project](/projects/winamp2-js/),
I immediatly thought: "This would be easy to do using Javascript and
Canvas".
So I took a stab at it. You can play with it below. The slider allows you to
select how many points you want:
Check out the ~30 lines of code on
[JSFiddle](http://jsfiddle.net/captbaritone/8vwjn4cx/42/) or
[GitHub](https://raw.githubusercontent.com/captbaritone/jordaneldredge.com/master/_posts/2015-01-02-drawing-mandalas-with-javascript-and-canvas.md)