DIP - Programmierung Teil 2 Übung1: Unterschied zwischen den Versionen

Aus DDSWiki
Wechseln zu: Navigation, Suche
(Interessante Funktionen für diese Aufgabe)
Zeile 14: Zeile 14:
  
 
<iframe key="p5js" path="flotorious/sketches/uBvA1Mv3T" w="1000" h="800"></iframe>
 
<iframe key="p5js" path="flotorious/sketches/uBvA1Mv3T" w="1000" h="800"></iframe>
 
<pre>
 
function setup() {
 
  createCanvas(400, 400);
 
  background(200);
 
  circle(200, 200, 200);
 
  circle(150, 175, 50);
 
  circle(250, 175, 50);
 
  line(160, 250, 240, 250);
 
}
 
</pre>
 
 
 
<pre>
 
function setup() {
 
  createCanvas(400, 400);
 
}
 
function draw() {
 
  background(220);
 
  circle(200, 200, 300);
 
  line (120, 250, 280, 250);
 
  circle (150, 140, 30);
 
  circle (250, 140, 30);
 
}
 
</pre>
 
 
== Happy Version ==
 
[[image: happy4.png|400px]]
 
 
<pre>
 
function setup() {
 
  createCanvas(400, 400);
 
}
 
function draw() {
 
  background(220);
 
  circle(200, 200, 300);
 
  line (120, 250, 280, 250);
 
  circle (150, 140, 30);
 
  circle (250, 140, 30);
 
 
  line(90, 220, 120, 250);
 
  line(310, 220, 280, 250);
 
}
 
</pre>
 

Version vom 29. Oktober 2023, 20:54 Uhr

Smile1.png

Aufgabe

  • Generiere dieses Gesicht (oben) in p5js!

Interessante Funktionen für diese Aufgabe

Gemeinsam erarbeitete Lösung