Add completed harmonized color brick wall
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src="p5.min.js"></script>
|
||||
<script src="sketch.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
3
CM2030 Graphics Programming/Week 13/13.2.6b Bricks/p5.min.js
vendored
Normal file
3
CM2030 Graphics Programming/Week 13/13.2.6b Bricks/p5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
CM2030 Graphics Programming/Week 13/13.2.6b Bricks/sketch.js
Normal file
24
CM2030 Graphics Programming/Week 13/13.2.6b Bricks/sketch.js
Normal file
@ -0,0 +1,24 @@
|
||||
let color1 = 0;
|
||||
|
||||
function setup() {
|
||||
createCanvas(720, 400);
|
||||
colorMode(HSB);
|
||||
noStroke();
|
||||
//stroke(0);
|
||||
|
||||
let hueStart = 100;
|
||||
let variation = 5;
|
||||
|
||||
let brickW = 72;
|
||||
let brickH = 40;
|
||||
|
||||
for (let x=0; x<width; x+=brickW) {
|
||||
for (let y=0; y<height; y+=brickH) {
|
||||
fill(hueStart + random(-variation, variation), random(80, 100), random(80, 100));
|
||||
rect(x, y, brickW, brickH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
}
|
||||
Reference in New Issue
Block a user