Shinyoung: Unterschied zwischen den Versionen
Aus exmediawiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
--------- | |||
--------- | |||
<big><big>'''12.05'''</big></big><br> | <big><big>'''12.05'''</big></big><br> | ||
<br> | <br> | ||
| Zeile 8: | Zeile 10: | ||
'''Drawing a book cover using rules :''' | '''Drawing a book cover using rules :''' | ||
[[Datei:Foto1.jpg|mini| | [[Datei:Foto1.jpg|mini|zentriert|gerahmt]]<br> | ||
<br> | <br> | ||
<br> | <br> | ||
--------- | |||
--------- | |||
<big><big>'''19.05 homework'''</big></big> | <big><big>'''19.05 homework'''</big></big> | ||
<br> | <br> | ||
'''Drawings :''' | '''Drawings :''' | ||
[[Datei:Foto2.jpg|mini| | [[Datei:Foto2.jpg|mini|zentriert|gerahmt]]<br> | ||
<br> | <br> | ||
| Zeile 21: | Zeile 25: | ||
https://editor.p5js.org/shinyoung.rhyu/full/5MOgdiwjF | https://editor.p5js.org/shinyoung.rhyu/full/5MOgdiwjF | ||
--------- | |||
--------- | |||
<big><big>'''26.05 homework'''</big></big> | <big><big>'''26.05 homework'''</big></big> | ||
<br> | |||
'''loop code:''' | |||
https://editor.p5js.org/shinyoung.rhyu/full/gdngY43px | |||
<br> | <br> | ||
'''homework:''' | '''homework:''' | ||
[[Datei:Foto3.jpg|mini|links]] | [[Datei:Foto3.jpg|mini|zentriert|gerahmt]] | ||
--------- | |||
--------- | |||
<big><big>'''26.05 Seminar'''</big></big> | |||
<br> | |||
Here is the Code! | |||
<br> | |||
https://editor.p5js.org/shinyoung.rhyu/full/gdngY43px | |||
--------- | |||
//var otherWay = 0; | |||
function setup() { | |||
createCanvas(600, 600); | |||
//noLoop(); | |||
frameRate(2); | |||
noFill(); | |||
} | |||
function draw() { | |||
background(220); | |||
let LimitA = 4; | |||
let LimitB = 4; | |||
for(let a = 0; a < LimitA; a= a+1){ | |||
for(let b = 0; b < LimitB; b= b+1){ | |||
drawSquare(a*0.25*width , b*0.25*height , height*0.25 , height*0.25 , a+b*LimitA); | |||
// 맨 마지막의 a+b*LimitA 는 a와 b가 0으로부터 시작하기 때문에, 두 수를 더한 다음 곱해야 우리가 원하는 4*4 = 16 개의 숫자가 생성됨 | |||
//A와 B를 1보다 크다고 조건문을 작성하면 두 수를 곱하는 것으로도 충분해지지만, 이 경우 컨버스의 0 자리가 없어지기 때문에 전체 모양이 오른쪽으로 이동하게 되고, 4의 배수들은 화면에 보이지 않게 된다. | |||
} | |||
} | |||
} | |||
function drawSquare(_X, _Y, _tileWidth, _tileHeight, _num){ | |||
let tileWidth = _tileWidth; | |||
let tileHeight = _tileHeight; | |||
let minRectwidth = 10; | |||
let minRectHeight = 15; | |||
let amountOFSquares = 20; | |||
let X = tileWidth / 2 + _X | |||
let Y = tileHeight /2 + _Y | |||
let num = _num; | |||
rectMode(CENTER); | |||
noFill(); | |||
for (let i = 0; i <amountOFSquares; i++) { //i가 10을 넘지 않음, i++는 i가 점진적으로 1씩 더해지는 구조, 이것이 도달하여 10을 넘을 경우 다시 뒤로 돌아가는 조건문 | |||
let rectWidth = random(minRectwidth, tileWidth); | |||
let rectheight = random(minRectHeight, tileHeight); | |||
rect(X, Y, rectWidth, rectheight) | |||
} | |||
fill(255,0,0); | |||
text(num,X, Y ); | |||
} | |||
--------- | |||
--------- | |||
<big><big>'''16.06 Seminar'''</big></big> | |||
<br> | |||
https://editor.p5js.org/shinyoung.rhyu/sketches/5MOgdiwjF | |||
<br> | |||
<br> | |||
--------- | |||
--------- | |||
<big><big>'''16.06'''</big></big><br> | |||
<br> | |||
<br> | |||
[[Datei:Screenshot 2025-07-21 at 16.11.36.png|mini|zentriert|gerahmt]] | |||
--------- | |||
--------- | |||
<big><big>'''23.06'''</big></big><br> | |||
<br> | |||
<br> | |||
[[Datei:Screenshot 2025-07-21 at 16.12.15|mini|zentriert|gerahmt|]] | |||
--------- | |||
--------- | |||
<big><big>'''30.06 Stamp'''</big></big><br> | |||
<br> | |||
<br> | |||
[[Datei:Screenshot 2025-07-21 at 16.13.19.png|mini|zentriert|gerahmt]] | |||
[[Datei:Screenshot 2025-07-21 at 16.13.30.png|mini|zentriert|gerahmt|links]] | |||
Aktuelle Version vom 21. Juli 2025, 15:17 Uhr
12.05
Create a repeating infinite number of squares :
https://editor.p5js.org/shinyoung.rhyu/full/FDZkUXra8p
Drawing a book cover using rules :

19.05 homework
Drawings :

Code examples based on drawings : https://editor.p5js.org/shinyoung.rhyu/full/5MOgdiwjF
26.05 homework
loop code:
https://editor.p5js.org/shinyoung.rhyu/full/gdngY43px
homework:

26.05 Seminar
Here is the Code!
https://editor.p5js.org/shinyoung.rhyu/full/gdngY43px
//var otherWay = 0;
function setup() {
createCanvas(600, 600); //noLoop(); frameRate(2); noFill();
}
function draw() {
background(220);
let LimitA = 4;
let LimitB = 4;
for(let a = 0; a < LimitA; a= a+1){
for(let b = 0; b < LimitB; b= b+1){
drawSquare(a*0.25*width , b*0.25*height , height*0.25 , height*0.25 , a+b*LimitA);
// 맨 마지막의 a+b*LimitA 는 a와 b가 0으로부터 시작하기 때문에, 두 수를 더한 다음 곱해야 우리가 원하는 4*4 = 16 개의 숫자가 생성됨 //A와 B를 1보다 크다고 조건문을 작성하면 두 수를 곱하는 것으로도 충분해지지만, 이 경우 컨버스의 0 자리가 없어지기 때문에 전체 모양이 오른쪽으로 이동하게 되고, 4의 배수들은 화면에 보이지 않게 된다. }
}
}
function drawSquare(_X, _Y, _tileWidth, _tileHeight, _num){
let tileWidth = _tileWidth;
let tileHeight = _tileHeight;
let minRectwidth = 10;
let minRectHeight = 15;
let amountOFSquares = 20;
let X = tileWidth / 2 + _X
let Y = tileHeight /2 + _Y
let num = _num;
rectMode(CENTER);
noFill();
for (let i = 0; i <amountOFSquares; i++) { //i가 10을 넘지 않음, i++는 i가 점진적으로 1씩 더해지는 구조, 이것이 도달하여 10을 넘을 경우 다시 뒤로 돌아가는 조건문
let rectWidth = random(minRectwidth, tileWidth);
let rectheight = random(minRectHeight, tileHeight);
rect(X, Y, rectWidth, rectheight)
}
fill(255,0,0);
text(num,X, Y );
}
16.06 Seminar
https://editor.p5js.org/shinyoung.rhyu/sketches/5MOgdiwjF
16.06

23.06
30.06 Stamp

