Skip to content

Instantly share code, notes, and snippets.

@georgesb
Last active May 3, 2020 19:41
Show Gist options
  • Save georgesb/a3d99b7f8e375cfe69ace2c9f27ea185 to your computer and use it in GitHub Desktop.
Save georgesb/a3d99b7f8e375cfe69ace2c9f27ea185 to your computer and use it in GitHub Desktop.
Simple Shapes
<!doctype html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/p5@0.10.2/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/gh/georgesb/lib/drawGrid.js"></script>
<script src="script.js"></script>
</head>
<body>
</body>
</html>
function setup(){
createCanvas(650,450);
drawGrid();
}
function draw() {
fill('white');
stroke('black');
circle(100, 100, 50);
rect(50, 200, 100, 100);
triangle(200, 250, 300, 100, 400, 250);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment