2016年11月3日 星期四

Week 08 Sean's note 60408027E


  • LeapMotion Setup





  • LeapMotion App Store




    • LeapMotion Visualizer

    • LeapMotion for Processing Liberary

    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }
    void draw(){
      background(255);
      for (Hand hand : leap.getHands()){
        hand.draw();
      }
    }

    • LeapMotion Finger
    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }
    void draw(){
      background(255);
      for (Hand hand : leap.getHands()){
        //hand.draw();
        for (Finger finger : hand.getFingers()){
          finger.draw();
        }
      }
    }

    • hand grab coin
    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }
    float coinX=320, coinY=0, coinVX=0, coinVY=3;
    int score=0;
    void draw(){
      background(255);
      coinY += coinVY;
      fill(255,255,0); ellipse(coinX, coinY, 60, 60);
      if(coinY>480){
        coinY=0;
        coinX=random(640);
      }
      for (Hand hand : leap.getHands()){
        //hand.draw();
        PVector pos = hand.getPosition();
        //println(pos); 
        fill(220,0,0); ellipse(pos.x, pos.y, 100,100);
        if ( dist(pos.x, pos.y, coinX, coinY) < 100 ){
          score += 10;
          coinY=0;
          coinX=random(640);
        }
      }
      fill(255,0,0); 
      textSize(30);
      text("Score:" + score, 400, 100);
    }



    • 彈力球

    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }
    float coinX=320, coinY=0, coinVX=0, coinVY=3;
    int score=0;
    void draw(){
      background(255);
      coinY += coinVY;
      coinX += coinVX;
      if(coinX<0 || coinX>640) coinVX = -coinVX;
      if(coinY<0 || coinY>480) coinVY = -coinVY;
      fill(255,255,0); ellipse(coinX, coinY, 60, 60);
      for (Hand hand : leap.getHands()){
        //hand.draw();
        PVector pos = hand.getPosition();
        //println(pos);
        fill(220,0,0); ellipse(pos.x, pos.y, 100,100);
        if ( dist(pos.x, pos.y, coinX, coinY) < 100 ){
          score += 10;
          PVector dir = new PVector (coinX - pos.x, coinY - pos.y)'
          dir.normalize(); // 無函式無法執行
          dir.mult(3);
          coinVX = dir.x;
          coinVY = dir.y;
        }
      }
      fill(255,0,0);
      textSize(30);
      text("Score:" + score, 400, 100);
    }




    Week 08 均均❤上課筆記

    2016/11/03  教學軟體設計
    1.  leap motion : https://www.leapmotion.com/setup



    Leap Motion 

    熊熊接金幣


    60508013E_林子婷,Week08

    105/11/03

    1. LeapMotion setup(PC/Mac)
       https://www.leapmotion.com/setup
    1)LeapMotion APP store
    2) Play

    *processing /德國

    *模仿


    *finger






    2.  接金幣

     


    week08_20161103_豐佳燕上課筆記


    1.下載與安裝LeapMotion (PC/MAC)


    1.1 LeapMotion App Store

    Leapmotion開箱

    Leap Motion官方網站:https://www.leapmotion.com
    (1)所有內容物,Leap Motion本體,兩條USB線長短各一,以及說明書。
    (2)撕開貼紙才能使用
    (3)接上電腦,如果有通電,前方會有綠色的LED指示燈會亮起來。
    (4)連上www.leapmotion.com/setup下載驅動程式





    1.2 Play





    Visualizer





    按下H鍵




    1.3 Development/ Designer

    (1)安裝 leapmotion






    範例檔執行結果




    10行程式


    Finger程式






    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    void setup() {
      size(640, 480);
      leap = new LeapMotion(this);
    }
    float coinX=320, coinY=0, coinVX=0, coinVY=3;
    int score=0;
    void draw() {
      background(255);
      coinY +=coinVY;
      fill(255, 255, 0); 
      ellipse(coinX, coinY, 60, 60);
      if (coinY>480) {
        coinY=0;
        coinX=random(640);
      }
      for (Hand hand : leap.getHands ()) {
        //hand.draw();
        
          PVector pos=hand.getPosition();
          println(pos);
          fill(255, 0, 0); 
          ellipse(pos.x, pos.y, 100, 100);
          if (dist(pos.x, pos.y, coinX, coinY)<100) {
            score+=10;
            coinY=0;
            coinX=random(640);
          }
        }
        fill(0, 255, 0);
        textSize(50);
        text("Score:" + score, 400, 100);
      }












    心得:
    今天上課實際體驗了leapmotion,謝謝育慈老師提供設備,謝謝葉老師指導我們從探索到寫出程式。我也想一套leapmotion讓小學生體驗,但程式的撰寫是否只能用Processing?

















    Week08 張曉瑀上課筆記

    20161103

    今日體驗:Leap motion

    實際操作影片





    今日程式:processing+leapmotion

    step1:添加leap motion到library
    開啟範本執行















    step2: import 撰寫者的程式















    step3: 只抓finger的動作














    step4: 寫一個接金幣遊戲














    程式碼:
    import de.voidplus.leapmotion.*;  
    LeapMotion leap;
    void setup(){
      size(800,500,P3D);                       //設定場景 *加入~P3D(leapMotion)
      leap=new LeapMotion(this);
    }
    float coinX=240, coinY=0, coinVX=0, coinVY=3;    //設定浮點數 讓金幣隨機掉下
    int score=0;                                                   // 設置分數機制
    void draw(){
      background(255);                                  //設定背景
      coinY += coinVY;                                   // 設定金幣掉下
      fill(255,0,0); ellipse(coinX, coinY, 60,60);
      if(coinY>480) {
      coinY=0;
      coinX=random(640);
      }
      for(Hand hand : leap.getHands()){           //利用leapMotion感應手位置
       //hand.draw();
       PVector pos = hand.getPosition();
       //println(pos);
       fill(255,0,0); ellipse(pos.x, pos.y, 100,100);
       if(dist(pos.x, pos.y, coinX, coinY)<100){
         score += 10;                                            
         coinY=0;
         coinX=random(640);
       }
      }
      fill(0,255,0);
      textSize(40);
      text("Score:" + score, 500,100);
    }

    Week 08 ლ(゚д゚ლ) 張書豪 60408029E 大豪豪der上課筆記

    2016/11/03  教學軟體設計

    本日心得:

    今天老師透過林育慈老師,讓我們有機會可以接觸到一個很酷炫的東西 - leap motion,
    老師借足了台數,讓我們每個人都可以有一台可以操作體驗,一開始時老師開啟網頁,給我們看了許多影片,看了影片中的東西! 原來與體感有關,可以感測手指的操控,這個東西只有我在玩體感遊戲中有體驗過而已,沒想到今天能在課堂中體驗並且能實作出來,覺得葉老師每次上課都能給予學生不同的驚喜,跟健X出奇蛋很像~ 每次都給予不一樣的玩具,接著安裝後,體驗裡面的APP,一開始是一個房間裡面有許多機器人的身體與頭部,沒想到可以直接用手指操控,抓取機器人的頭部,放在她的身體上,機器人就活過來了! 另一個體驗是在河岸上用手指拿起漂亮的蓮花,而老師也結合小遊戲的方式,接金幣,讓我們實作程式,我覺得老師真的很狂,總是能讓程式的程式碼行數節省再節省,雖然老師口中總是說寫的不夠精簡,但是我相信老師是直接在腦中就想出的程式,當下還要再精簡更是難上加難了~~ 從老師的實作當中,馬上體驗程式與 leap motion 的結合,很不一樣的體驗,謝謝育慈老師以及葉老師讓我們有機會體驗。 :)


     ● leap motion:

    Leap Motion, Inc.(英語:Leap Motion, Inc.)是一家製造和銷售電腦硬體感應裝置的公司。
    類似於滑鼠,其裝置支援利用手掌和手指動作來進行輸入,但無需手部接觸或者輕觸。
    它使用高階的動作感應專利技術進行人機互動。
    源於在利用鍵盤和滑鼠進行3D建模時的挫折中得到的靈感,Leap Motion 宣稱虛擬建模應該與在真實世界中鑄泥塑一樣簡單。


    https://www.youtube.com/watch?v=h9Sw20pJOrk





    1.  leap motion : https://www.leapmotion.com/setup

    實作:

    仿造 德國作者開發得 程式  先import

    import de.voidplus.leapmotion.*;
    LeapMotion leap;

    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }

    void draw(){
      background(255);
      for(Hand hand :leap.getHands()){
        hand.draw();
      }
    }





    實作二:
    import de.voidplus.leapmotion.*;
    LeapMotion leap;

    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }

    void draw(){
      background(255);
      for (Hand hand : leap.getHands()){
      for(Finger finger :hand.getFingers()){
        finger.draw();
      }
      }
    }


    實作三:
    接金幣

    import de.voidplus.leapmotion.*;
    LeapMotion leap;
    int score= 0;
    void setup(){
      size(640,480);
      leap = new LeapMotion(this);
    }
    float coinX = 320 ,coinY = 0, coinVX = 0,coinVY = 3;
    void draw(){
      background(255);
      coinY += coinVY;
      fill(255,255,0); ellipse(coinX,coinY,60,60);
      if (coinY>480)
      {
        coinY =0;
        coinX = random(640);
      }
      for (Hand hand : leap.getHands()){
       // hand.draw();
        PVector pos = hand.getPosition();
        //println(pos);
        fill(255,0,0); ellipse(pos.x,pos.y,100,100);
        if (dist(pos.x,pos.y,coinX,coinY)<100)
        {
          score += 10;
          coinY =0;
          coinX = random(640);
        }
      }
      fill (0,255,9);
      textSize(50);
      text("score:"+score,400,100);
    }



    20161027_Week07


    • Web cam
    • Camera Calibration 攝影機校正
    • Augmented reality (AR)

    2000: Magic book augmented reality
              Augmented Reality (AR) Solar System Magic Book
           
    • The invisible train siggraph







    • ARToolKit (marker 正方形的黑白方塊)






    • Processing: Open front camera




    • 程式碼網站:https://github.com/
    • Paper screen AR

              https://github.com/poqudrof/PapAR
              https://github.com/poqudrof/PapARt

    • Process explorer: 顯示電腦內正在使用的所有軟體,以便檢視與操控。若有疑似病毒的軟體,也可以通過 Process explorer 把它刪掉。
              https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx


    • Leap motion
              https://www.leapmotion.com/








    • Holoportation





    • Teleport


    • Tangible holographic plasma




    • Magic leap