Upgrade to Pro — share decks privately, control downloads, hide ads and more …

day3

Taeyoon Choi
August 24, 2016
300

 day3

Taeyoon Choi

August 24, 2016
Tweet

Transcript

  1. ׹

  2. for (var i= 0; i < 10; i = i

    + 1) { } i의 값은 0이다. i는 10보다 작다. 그렇다면 i에 1을 더한다 그동안 이 지시문을 실행한 다
  3. var द੘, ՘, ࣘب; var x = द੘; function setup()

    { createCanvas(windowWidth, windowHeight); background(255); } function draw() { ਤ஖(100, 800, 10); } function ਤ஖(द੘, ՘, ࣘب) { background(255); stroke(100); strokeWeight(4); line(द੘, 200, ՘, 200); strokeWeight(30); point(द੘, 200); point(՘, 200); 위치 호출 위치 함수
  4. var द੘, ՘, ࣘب; var x = द੘; function setup()

    { createCanvas(windowWidth, windowHeight); background(255); } function draw() { ਤ஖(100, 800, 10); } function ਤ஖(द੘, ՘, ࣘب) { background(255); stroke(100); strokeWeight(4); line(द੘, 200, ՘, 200); strokeWeight(30); point(द੘, 200); point(՘, 200); noStroke(); fill(255, 0, 0); ellipse(x, 200, 20, 20); if (x < ՘) { x = x + ࣘب; } else { x = द੘; } } 변수 선언 위치 지정 원 그리기 조건문