Can I make my own snowflake app?

Yes. Try one cut in the online snowflake maker and look at how the shape repeats around the center. You can use the same idea to build a small browser app that draws a snowflake from a single branch.

Build a working snowflake generator

Copy this example into a plain-text file called snowflake.html and open it in a browser. Move the slider to change the number of arms. Each arm turns through one full circle divided by the number you chose.

<!doctype html>
<html lang="en"><meta charset="utf-8"><title>My snowflake app</title>
<label>Arms <input id="arms" type="range" min="4" max="12" value="6"></label>
<canvas id="flake" width="300" height="300" style="display:block"></canvas>
<script>
const canvas = document.querySelector('#flake');
const count = document.querySelector('#arms');
const ctx = canvas.getContext('2d');
function draw() {
  ctx.setTransform(1, 0, 0, 1, 150, 150);
  ctx.clearRect(-150, -150, 300, 300);
  ctx.strokeStyle = '#17689b';
  ctx.lineWidth = 5;
  ctx.lineCap = 'round';
  const total = Number(count.value);
  for (let i = 0; i < total; i++) {
    ctx.save();
    ctx.rotate(i * 2 * Math.PI / total);
    ctx.beginPath();
    ctx.moveTo(0, 0);
    ctx.lineTo(0, -115);
    for (const side of [-1, 1]) {
      ctx.moveTo(0, -62);
      ctx.lineTo(side * 26, -88);
    }
    ctx.stroke();
    ctx.restore();
  }
}
count.addEventListener('input', draw);
draw();
</script></html>

Make it your own

Change 26 to 40 to widen the little side branches. Change the stroke color and compare a four-arm design with an eight-arm design. Both use exactly the same branch.

Add paper cutting to your website

If your goal is a class page where visitors can cut virtual paper, open the full maker and expand the embed section below the tool. Copy its iframe code into an HTML block on your website. This gives visitors the cutting board, undo and preview controls.

All snowflake activities

Guide topics

Also called Build a browser snowflake generator.

Tags · Snowflake design · Online snowflake making