-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
238 lines (209 loc) · 7.68 KB
/
index.html
File metadata and controls
238 lines (209 loc) · 7.68 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="processing.css">
<script src="processing.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.0/processing.min.js"></script>
<title>Processing: Resultats</title>
</head>
<body>
<div class="bande_noire_haut">
<h1>Rendu de travail</h1>
</div>
<div class="bande_noire_milieu">
<div class="exercice">
<div class="texte">
<h3>Exercice 1</h3>
<p>size(400, 400); <br>
line(400,400,0,0);<br>
line(0,400,400,0);<br>
line(160,320,240,320);<br>
line(160,80,240,80);<br>
line(240,200,320,200);<br>
line(80,200,160,200);</p>
</div>
<script type="application/processing">
size(400, 400);
line(400,400,0,0);
line(0,400,400,0);
line(160,320,240,320);
line(160,80,240,80);
line(240,200,320,200);
line(80,200,160,200);
</script>
<canvas> </canvas>
</div>
<div class="exercice">
<div class="texte">
<h3>Exercice 2</h3>
<p>size(400, 400); <br>
size(400, 400); <br>
<br>
void setup() <br>
{ frameRate (1);}<br>
<br>
void draw()<br>
{ background(random(400),[...],[...]);<br>
line(random(400),[...],[...],[...]);}</p>
</div>
<script type="application/processing">
size(400, 400);
void setup() {
frameRate (1);
}
void draw() {
background(random(400),random(400),random(400));
line(random(400),random(400),random(400),random(400));
}
</script>
<canvas> </canvas>
</div>
<div class="exercice">
<div class="texte">
<h3>Exercice 3</h3>
<p>
size(400, 400); <br>
void setup(){<br>
frameRate(4); }<br>
<br>
void draw()<br>
{stroke(255,255,255);<br>
strokeWeight(10);<br>
background(0,0,0); <br>
point(random(400),random(400));<br>
stroke(255,0,0);<br>
line(200,200,random(400),[...]); }<br>
</p>
</div>
<script type="application/processing">
size(400, 400);
void setup(){
frameRate(4); }
void draw()
{stroke(255,255,255);
strokeWeight(10);
background(0,0,0);
point(random(400),random(400));
stroke(255,0,0);
line(200,200,random(400),random(400)); }
</script>
<canvas> </canvas>
</div>
<div class="exercice">
<div class="texte">
<h3>Exercice 4</h3>
<p>
float x = 50; <br>
void setup() <br>
{ size(400, 400); }<br>
<br>
void draw() <br>
{background(#C0E1EA); <br>
stroke(#FFBC03); <br>
fill(#B6FF00); <br>
ellipse(x, 20, 40, 40);<br>
x = x + 1; }<br>
<br>
void reset() <br>
{ background(black);<br>
x = 50; }
</p>
</div>
<script type="application/processing">
float x = 50;
void setup()
{ size(400, 400); }
void draw()
{background(#C0E1EA);
stroke(#FFBC03);
fill(#B6FF00);
ellipse(x, 20, 40, 40);
x = x + 1; }
void reset()
{ background(black);
x = 50; }
</script>
<canvas> </canvas>
</div>
<div class="exercice">
<div class="texte">
<h3>Exercice 5</h3><p class="overflow">
float r = 1; <br>
float circle_size = 40;<br>
<br>
void setup() <br>
{ size(400, 400); <br>
background(0, 0, 0); <br>
smooth(); <br>
noStroke();} <br>
<br>
void draw()<br>
{ fill(255); <br>
rotate(r); <br>
float circle_size = random(10, 10); <br>
ellipse(10 + r, 10, circle_size, circle_size); <br>
r = r + 1; <br>
println(r); }
</p>
</div>
<script type="application/processing">
float r = 1;
float circle_size = 40;
void setup() {
size(400, 400);
background(0, 0, 0);
smooth();
noStroke();
}
void draw() {
fill(255);
rotate(r);
float circle_size = random(10, 10);
ellipse(10 + r, 10, circle_size, circle_size);
r = r + 1;
println(r);
}
</script>
<canvas> </canvas>
</div>
<h2>Commandes utilisées</h2>
<div class="liste exerice">
<div class="nom_commande" onmouseover="afficheraide('point()')" onmouseout="cacheraide('point()')">point(x,y) <br>
<div class="popup" id="point()_aide">Crée un point de coordonnées (x,y)</div></div>
<div class="nom_commande" onmouseover="afficheraide('ligne()')" onmouseout="cacheraide('ligne()')">lign(x,y,x2,y2)<br>
<div class="popup" id="ligne()_aide">Fait une ligne de (x,y) à (x2,y2)</div></div>
<div class="nom_commande" onmouseover="afficheraide('float_r_X')" onmouseout="cacheraide('float_r_X')">float r = X <br>
<div class="popup" id="float_r_X_aide">Creer une variable de nom r et de valeur X </div></div>
<div class="nom_commande" onmouseover="afficheraide('void_setup')" onmouseout="cacheraide('void_setup')">void setup() { } <br>
<div class="popup" id="void_setup_aide">Fonction pour preparer le dessin</div></div>
<div class="nom_commande" onmouseover="afficheraide('size(x,y)')" onmouseout="cacheraide('size(x,y)')">size(X,Y) <br>
<div class="popup" id="size(x,y)_aide">Change la taille de l'ecran</div></div>
<div class="nom_commande" onmouseover="afficheraide('background(x)')" onmouseout="cacheraide('background(x)')">background(X) <br>
<div class="popup" id="background(x)_aide">Change la couleur de l'ecran (r,g,b)</div></div>
<div class="nom_commande" onmouseover="afficheraide('smooth()')" onmouseout="cacheraide('smooth()')">smooth() <br>
<div class="popup" id="smooth()_aide">Definit la lisseur des traits</div></div>
<div class="nom_commande" onmouseover="afficheraide('nostroke')" onmouseout="cacheraide('nostroke')">noStroke() <br>
<div class="popup" id="nostroke_aide">Retire la ligne exterieure (outline)</div></div>
<div class="nom_commande" onmouseover="afficheraide('void_draw()')" onmouseout="cacheraide('void_draw()')">void draw() { } <br>
<div class="popup" id="void_draw()_aide">Fonction à executer, dessine</div></div>
<div class="nom_commande" onmouseover="afficheraide('fill()')" onmouseout="cacheraide('fill()')">fill(255) <br>
<div class="popup" id="fill()_aide">Remplit une forme d'une certaine couleur (r,g,b)</div></div>
<div class="nom_commande" onmouseover="afficheraide('rotate()')" onmouseout="cacheraide('rotate()')">rotate(r) <br>
<div class="popup" id="rotate()_aide">Fait une rotation de r degres</div></div>
<div class="nom_commande" onmouseover="afficheraide('random()')" onmouseout="cacheraide('random()')">float circle_size = random(X,Y) <br>
<div class="popup" id="random()_aide">Cree un array avec 2 valeurs crees aleatoirement</div></div>
<div class="nom_commande" onmouseover="afficheraide('ellipse()')" onmouseout="cacheraide('ellipse()')">ellipse(X + r, 10, circle_size, circle_size) <br>
<div class="popup" id="ellipse()_aide">Cree un cercle de rayon circle_size et avec les coordonnees de centre (10 + r, 10)</div></div>
<div class="nom_commande" onmouseover="afficheraide('r = r + X')" onmouseout="cacheraide('r = r + X')">r = r + X <br>
<div class="popup" id="r = r + X_aide">Augmente la valeur de r par X</div></div>
<div class="nom_commande" onmouseover="afficheraide('println()')" onmouseout="cacheraide('println()')">println(r)<br>
<div class="popup" id="println()_aide">Output la variable r</div></div>
</div>
</div>
<div class="bande_noire_bas">Ce site a été fait par Arnaud#8583</div>
<div class="bande_noire_bas_2">
<a href="javascript:scrollTo({top: 0, left: 0, behavior: 'smooth'})">Back to top</a>
<div class="ligne"> </div>
</div>
</body>
</html>