Skip to content

Instantly share code, notes, and snippets.

@konrup
konrup / Fractal_Tree.js
Created July 22, 2017 13:17
Draws a fractal tree on the canvas
function drawTree() {
var s = 5;
var n = 15;
var t = 30;
var cnvs = document.createElement("canvas");
var ctx = cnvs.getContext("2d");
document.body.appendChild(cnvs);
cnvs.height = 130 * s;
cnvs.width = 100 * s;