-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.html
More file actions
55 lines (45 loc) · 1.03 KB
/
loop.html
File metadata and controls
55 lines (45 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/p5.js"></script>
<script>
function setup() {
createCanvas(windowWidth,windowHeight);
fill('#D7DBDD ');
stroke('red');
}
function draw() {
background('#EBF5FB');
/* step1:
line(20,40,80,80);
line(80,40,140,80);
line(140,40,200,80);
line(200,40,260,80);
line(260,40,320,80);
line(320,40,380,80);
*/
/* step2:
for(var i =20; i < 400 ;i+= 40){
//line(i = x,40 =y,i+60 = w,80 =h);
line(i,40,i+60,80);
}
*/
/*
for(var y =20; y <= height; y += 20 ){
for(var x =20; x <= width; x += 20){
ellipse(x,y,10,10);
line(x,y,width/2,height/2);
}
}
*/
for( var y =10; y <= height;y+=40){
for( var x =10; x <= width; x+=40){
triangle(x,y,x-5,y+20,x+10,y);
line(x,y,width/2,height/2);
}
}
}
</script>
</head>
<body>
</body>
</html>