• fullscreen
  • sketch_nov17a.pde
  • PImage img;
    PImage img1;
    PImage img2;
    PImage img3;
    PFont f;
    
    void setup() {
      size(360, 500);
      f =  loadFont ("Mangal-Bold-30.vlw");
      textFont(f);
      stroke(255);
      img = loadImage("sun.png");
      img1 = loadImage("ear.png");
      img2 = loadImage("vin.png");
      img3 = loadImage("muq.png");
    }
    
    void draw() {
      background(0);
      fill(0);
      smooth();
      stroke(130,100,100);
      ellipse(180, 180, 800, 800);
      ellipse(180, 180, 550, 550);
      ellipse(180, 180, 320, 320);
      float s = map(second(), 0, 60, 0, TWO_PI) - HALF_PI;
      ellipse(180, 180, 200, 200);
      float m = map(minute(), 0, 60, 0, TWO_PI) - HALF_PI;
      ellipse(180, 180, 130, 130);
      float h = map(hour() % 12, 0, 12, 0, TWO_PI) - HALF_PI;
      image(img, 180, 180, 90,90);
      imageMode(CENTER);
      image(img1,cos(s)*160+180,sin(s)*160+180,40,40);
      image(img2,cos(m)*97+180,sin(m)*97+180,30,30);
      image(img3,cos(h)*65+180,sin(h)*65+180,20,20);
      int s2 = second();
      int m2 = minute();
      int h2 = hour();
      fill(130,100,100);
      String time  = nf( h2, 2)+ " : " + nf( m2, 2) +" : " + nf( s2, 2);
      textAlign(CENTER);
      text(time, 180, 430);
    }
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement


    Seunga Baek

    [201012690] Project 3 Seunga Baek

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Project3.
    시계만들기
    -
    시계가 원을 그리며 도는 것을 보고 태양계가 떠올랐습니다.
    가운데는 태양을 배치하였고, 시는 수성, 분은 금성, 초는 지구로 설정했습니다.
    시계는 정확한 시간을 알려줘야 되는 것이라고 생각해서
    밑부분에 디지털시계도 넣어보았습니다.

    Byeongjun Jeong
    17 Nov 2010
    으아니맙소사 모든 천체가 일렬로 섰어
    이제 마왕이 깨어나 세계를 멸망시킬거야
    Asher Salomon
    7 Dec 2010
    the planets on the inside travel faster
    You need to login/register to comment.