Skip to content

Instantly share code, notes, and snippets.

@aurelianonava
Forked from jdguzman230/index.html
Created October 5, 2017 18:05
Show Gist options
  • Save aurelianonava/09ad80b7b4a9cc8f2874e2273a1b40e6 to your computer and use it in GitHub Desktop.
Save aurelianonava/09ad80b7b4a9cc8f2874e2273a1b40e6 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta name="random();" content="Using random(); with point();">
<script data-require="p5.js@*" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script>
<Title>Using random();</Title>
<script src="script.js"></script>
</head>
<body>
Working on issue # 17 with random() number generator. </br>
<html>
var i = 0;
function setup() {
createCanvas (480, 400);
}
function draw() {
background(200);
// fill(random(100, 255));
// ellipse(random(0, width), random(0, height), random(0, 100), random(0, 100));
for(var i = 0; i < 200; i++)
strokeWeight(random(0,50));
point (random(0, width), random(0,height));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment