作品名稱:超人力霸王
2015年1月6日 星期二
2015年1月5日 星期一
week17
第19週1/19(一)上午10:00-12:00期末作品展示注意事項
1. 期末作品展示, 大家把成品帶過來介紹展示, 同時大家一起票選成績
2. 期末作品影片 1-2分鐘, 拍攝剪輯好貼在 Blog裡面
2014年12月29日 星期一
week15
1. 口頭上複習之前學過的內容
1.1. Arduino 的 Output (LED, Motor, Servo)
1.2. Arduino 的 Input (Button PULL_UP, 可變電阻, 光敏電阻)
1.3. Arduino 的 Serial COM (communication) 與電腦連接通訊
2. 期中考前教過的內容 Processing 繪圖/互動
1.1. Arduino 的 Output (LED, Motor, Servo)
1.2. Arduino 的 Input (Button PULL_UP, 可變電阻, 光敏電阻)
1.3. Arduino 的 Serial COM (communication) 與電腦連接通訊
2. 期中考前教過的內容 Processing 繪圖/互動
2014年12月15日 星期一
WEEK14
/*
Analog Input
Demonstrates analog input by reading an analog sensor on analog pin 0 and
turning on and off a light emitting diode(LED) connected to digital pin 13.
The amount of time the LED will be on and off depends on
the value obtained by analogRead().
The circuit:
* Potentiometer attached to analog input 0
* center pin of the potentiometer to the analog pin
* one side pin (either one) to ground
* the other side pin to +5V
* LED anode (long leg) attached to digital output 13
* LED cathode (short leg) attached to ground
* Note: because most Arduinos have a built-in LED attached
to pin 13 on the board, the LED is optional.
Created by David Cuartielles
modified 30 Aug 2011
By Tom Igoe
This example code is in the public domain.
http://arduino.cc/en/Tutorial/AnalogInput
*/
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for <sensorValue> milliseconds:
delay(sensorValue);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for <sensorValue> milliseconds:
delay(sensorValue);
}
Analog Input
Demonstrates analog input by reading an analog sensor on analog pin 0 and
turning on and off a light emitting diode(LED) connected to digital pin 13.
The amount of time the LED will be on and off depends on
the value obtained by analogRead().
The circuit:
* Potentiometer attached to analog input 0
* center pin of the potentiometer to the analog pin
* one side pin (either one) to ground
* the other side pin to +5V
* LED anode (long leg) attached to digital output 13
* LED cathode (short leg) attached to ground
* Note: because most Arduinos have a built-in LED attached
to pin 13 on the board, the LED is optional.
Created by David Cuartielles
modified 30 Aug 2011
By Tom Igoe
This example code is in the public domain.
http://arduino.cc/en/Tutorial/AnalogInput
*/
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for <sensorValue> milliseconds:
delay(sensorValue);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for <sensorValue> milliseconds:
delay(sensorValue);
}
2014年12月1日 星期一
week12
/*
Button
Turns on and off a light emitting diode(LED) connected to digital
pin 13, when pressing a pushbutton attached to pin 2.
The circuit:
* LED attached from pin 13 to ground
* pushbutton attached to pin 2 from +5V
* 10K resistor attached to pin 2 from ground
* Note: on most Arduinos there is already an LED on the board
attached to pin 13.
created 2005
by DojoDave <http://www.0j0.org>
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Button
*/
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
2014年11月24日 星期一
week11
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
int led2 = 15;
int led3 = 17;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(100);
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
delay(100);
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
delay(100);
}
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
int led2 = 15;
int led3 = 17;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(100);
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
delay(100);
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
delay(100);
}
雙師心得-愛迪斯科技胡啟彥先生
今天小葉老師邀請的業師是愛迪斯科技的胡啟彥先生,這次也是一樣是位有為青年,非常年輕就有非凡成就。
跟上次內容很像,關於互動技術、3D虛擬科技,但這次胡啟彥先生提到更多的技術,例如:Ubiquitous Computing, Augment Vision, Cloud Computing, Electronic
Digital, Total Immersion…等。
接下來胡啟彥先生播放了很多影片─
首先是預售屋的影片讓我覺得現代技術很強大,可以如你在現場看屋一樣,看不同的角度、轉動都可以做到。
客製化傢俱利用虛實投影來讓客人選擇想要的樣子,這個真的很方便,而且胡啟彥先生說IKEA以後可能會利用這個技術,這樣以後去IKEA就不會買錯東西或不知該買什麼。很相似的作品還有車子模擬,可以利用藝術作品,再藉由投影技術讓車子更真實。
雖然這兩次業師介紹的技術很相像,但卻了解得更深入,不光是Unity還有Kinect,也比上次多了更多想去但卻無法去而很懊悔的心情,覺得自己錯過這麼多好玩的活動很難過,但幸好老師邀請了兩位業師來,就算無法體驗到也有親眼見識到,不無小補傷心的心情,希望老師可以繼續邀請更多的業師來跟我們分享更多資訊,讓我們增廣見聞。
2014年11月13日 星期四
雙師心得-叁式曾煒傑先生
還沒開始前,老師先跟我們介紹曾煒傑的公司「叁式」及歷程,光聽介紹就覺得很厲害,對於他的夢想及時建立和勇往直前的決心,我很羨慕也很佩服,尤其在看到曾煒傑先生是位只比我們大幾歲的年輕人的時候。
曾煒傑先生播放了許多關於他們公司做過的案子的影片─
首先是第七感官的影片,真的很驚艷!現代舞配上背景的變化,讓人更了解舞者想表達的意境,每一個波動、線條都深深牽動著舞者和觀眾的情緒,非常印象深刻。
跟雲林縣政府合作的變臉活動,看起來真的很好玩,很適合大朋友小朋友或情侶一起同樂的活動,能跟傳統產業結合我覺得是非常令人讚賞的。
與NIKE的活動,我真的超級想參加的!!!!!因為本來就有在看NBA而且有喜歡的籃球球星,真的非常想體驗那個活動,那時候要是早點知道就好了,非常想要那個贈品!!!
乾隆潮,結合觀看者穿的衣服與花瓶的技術還有我覺得非常厲害的時空隧道,只要路過大家都會打招呼,真的是讓人看了嘖嘖稱奇,相信去體驗過的人一定會覺得值回票價。
還有白蘭氏雞精,關於跟夢想結合的這個創意,我覺得很棒而且很窩心,人因夢想而偉大,勇敢說出自己夢想是一件最棒的事情,而叁式幫大家做到了。
講了以上幾個叁式做過的案子,發覺互動技術真的很強大,不只表演藝術、展覽,還有商業性的品牌行銷等等之類的類型都可以與之合作結合,如此多種不同的類型,每個都讓我眼界大開,未來我還可以看到更多更屌更厲害的互動技術的進步,對此,我感到雀躍不已。
希望老師可以再找更多的業師來跟我們分享經驗或作品,真的很喜歡這次雙師的體驗,覺得獲益良多。
2014年10月27日 星期一
期中作品
01160600 鄭怡珊 01160944 張郡庭
遊戲介紹及玩法:
這就是打殭屍遊戲,我們把他可愛話變成屁桃被種下去盆栽裡面,並且也加難了原本的遊戲的按鍵,盆栽由左至右分別為數字1,2,3,4,5,按下按鍵屁桃就可以種下去盆栽,屁桃有五種不同類型,越玩到後面會看到不同的角色。
程式碼:
import ddf.minim.*;
Minim m;
AudioPlayer player;
int []bz=new int[1000];
PImage imgKobitos;
PImage imgAKobitos;
PImage imgBKobitos;
PImage imgCKobitos;
PImage imgDKobitos;
PImage imgEKobitos;
PImage imgFKobitos;
PImage imgGKobitos;
PImage imgPot;
PImage imgBG;
void setup() {
size(1000, 600);
imgKobitos=loadImage("kobitos.png");
imgAKobitos=loadImage("Akobitos.png");
imgBKobitos=loadImage("Bkobitos.png");
imgCKobitos=loadImage("Ckobitos.png");
imgDKobitos=loadImage("Dkobitos.png");
imgEKobitos=loadImage("Ekobitos.png");
imgFKobitos=loadImage("Fkobitos.png");
imgGKobitos=loadImage("Gkobitos.png");
imgPot=loadImage("pot.png");
imgBG=loadImage("bg.jpg");
for (int i=0;i<1000;i++) {
bz[i]=int(random(5));
}
m = new Minim(this);
player = m.loadFile("test123.mp3");
player.play();
}
int now=0;
int a;
int total=0;
int countDown=150;
int countDown2=3600;
void draw() {
background(imgBG);
int a=0;
if (a==0) {
if (countDown>0) {
background(0);
countDown--;
textSize(100);
text(countDown/30, 450, 300);
return;
}
a++;
}
if (a==1) {
if (countDown2>0) {
countDown2--;
textSize(50);
text("TIME:"+countDown2/60, 20, 40);
for (int i=now;i<now+5;i++) {
if (now<=50)image(imgKobitos, bz[i]*200, 350-(i-now)*100);
else if (now>50 && now<=100)image(imgAKobitos, bz[i]*200, 350-(i-now)*100);
else if (now>100 && now<=150) image(imgBKobitos, bz[i]*200, 350-(i-now)*100);
else if (now>150 && now<=200)image(imgCKobitos, bz[i]*210, 310-(i-now)*130);
else if (now>200 && now<=250)image(imgDKobitos, bz[i]*210, 320-(i-now)*100);
else if (now>250 && now<=300)image(imgEKobitos, bz[i]*210, 310-(i-now)*130);
else if (now>300 && now<=350)image(imgFKobitos, bz[i]*210, 310-(i-now)*120);
else if (now>350)image(imgGKobitos, bz[i]*210, 330-(i-now)*130);
}
image(imgPot, 20, 465);
image(imgPot, 220, 465);
image(imgPot, 420, 465);
image(imgPot, 620, 465);
image(imgPot, 820, 465);
}
a++;
}
if (a==2) {
if (countDown2/60==0)text("score:"+total, 400, 350);
}
}
void keyPressed() {
if (key==bz[now]+'1')
{
if (total<50)a=1;
if (total==50)a=2;
if (countDown2/60==0)a=0;
now++;
total=total+a;
}
}
2014年10月6日 星期一
Week04
我想做類似 打殭屍 的遊戲
------------------------------------------------------------------------------------------------------------------
void setup(){
size(600,400);
}
void draw(){
translate(mouseX,mouseY);
fill(#FF6464);
ellipse(0,0,80,180);
rotate(PI/4);
fill(#FF6464);
ellipse(0,0,80,180);
rotate(PI/4);
fill(#FF6464);
ellipse(0,0,80,180);
rotate(PI/4);
fill(#FF6464);
ellipse(0,0,80,180);
rotate(PI/4);
fill(#FF7c17);
ellipse(0,0,80,80);
rotate(PI/4);
}
------------------------------------------------------------------------------------------------------------------
void setup(){
size(600,400);
}
void draw(){
translate(mouseX,mouseY);
rotate(0.01*frameCount);
for(int i=0;i<20;i++){
fill(#FF6464); ellipse(0,0,18,180);
rotate(PI/20);
}
fill(#FF7C17); ellipse(0,0,80,80);
}
------------------------------------------------------------------------------------------------------------------
void setup(){
size(600,400);
colorMode(HSB,600,400,400);
}
void draw(){
fill(mouseX,mouseY,400);
translate(mouseX,mouseY);
rotate(0.01*frameCount);
for(int i=0;i<4;i++){
ellipse(0,0,80,180);
rotate(PI/4);
}
fill(#FF7C17); ellipse(0,0,80,80);
}
2014年9月29日 星期一
Week03
PImage img=loadImage("http://kobitos.com/kobitos/mainSp/04.png");
image(img, 0,0,400,400);
------------------------------------------------------------------------------------------------------------------
圖跟著滑鼠移動
PImage img;
void setup(){
size(800,800);
img=loadImage("peach.png");
imageMode(CENTER);
}
void draw(){
background(0); //背景顏色
image(img,mouseX,mouseY,200,200); //跟著滑鼠動的圖片大小
}
PS:先接圖片去背
將processing另存新檔(檔名第一個字不能為數字)
將去背好的圖片拉進程式
------------------------------------------------------------------------------------------------------------------
加入背景圖
PImage img,imgBG;
float eggX=750,eggY=550,eggVX,eggVY,flying=0;
void setup(){
size(1200,800);
img=loadImage("peach.png");
imgBG = loadImage("bg.jpg");
imgBG.resize(1200,800);
imageMode(CENTER);
}
void draw(){
background(imgBG);
image(img,mouseX,mouseY,200,200);
if(flying>0){
ellipse(eggX,eggY,50,50);
eggX+=eggVX;
eggY+=eggVY;
flying--;
}
}
void mousePressed(){
eggX=750;eggY=550;flying=30;
eggVX=(mouseX-eggX)/30;
eggVY=(mouseY-eggY)/30;
}
PS:背景圖片也要拉進程式裡
------------------------------------------------------------------------------------------------------------------
加入音樂
import ddf.minim.*;
Minim minim;
AudioPlayer player;
PImage img,imgBG;
float eggX=750,eggY=550,eggVX,eggVY,flying=0;
void setup(){
size(1200,800,P3D);
img=loadImage("peach.png");
imgBG = loadImage("bg.jpg");
imgBG.resize(1200,800);
imageMode(CENTER);
minim = new Minim(this);
player = minim.loadFile("marcus_kellis_theme.mp3");
}
void draw(){
background(imgBG);
image(img,mouseX,mouseY,200,200);
if(flying>0){
ellipse(eggX,eggY,50,50);
eggX+=eggVX;
eggY+=eggVY;
flying--;
}
}
void mousePressed(){
player.play();
eggX=750;eggY=550;flying=30;
eggVX=(mouseX-eggX)/30;
eggVY=(mouseY-eggY)/30;
}
2014年9月22日 星期一
Week02
加入coursera
----------------------------------------------------------------------------------------------------------------
TODO:簡易小畫家
size(800,600); //視窗大小
}
void draw(){
background(#FAFC96); //背景顏色
rect(mouseX,mouseY,100,100); //方格大小
}
----------------------------------------------------------------------------------------------------------------
void setup(){
size(800,600);
background(#FAFC96);
}
void draw(){
line(mouseX,mouseY,pmouseX,pmouseY);
}
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
void setup(){
size(800,600);
background(#FAFC96);
}
void draw(){
if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY);
}
----------------------------------------------------------------------------------------------------------------
void setup(){
size(800,600);
background(#FAFC96);
fill(255,0,0); rect(0,0,100,100);
fill(0,255,0); rect(0,100,100,100);
fill(0,0,255); rect(0,200,100,100);
fill(0); rect(0,300,100,100);
}
void draw(){
if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY);
}
void mousePressed(){
if(mouseX<100 && mouseY<100) stroke(255,0,0);
else if(mouseX<100 && mouseY<200) stroke(0,255,0);
else if(mouseX<100 && mouseY<300) stroke(0,0,255);
else if(mouseX<100 && mouseY<400) stroke(0);
}
----------------------------------------------------------------------------------------------------------------
void setup(){
size(800,600);
background(#FAFC96);
rect(700,0,100,100); ellipse(750,50,5,5);
rect(700,100,100,100); ellipse(750,150,10,10);
rect(700,200,100,100); ellipse(750,250,15,15);
fill(255,0,0); rect(0,0,100,100);
fill(0,255,0); rect(0,100,100,100);
fill(0,0,255); rect(0,200,100,100);
fill(0); rect(0,300,100,100);
}
void draw(){
if(mousePressed && mouseX>100 && mouseX<700) line(mouseX,mouseY,pmouseX,pmouseY);
}
void mousePressed(){
if(mouseX<100 && mouseY<100) stroke(255,0,0);
else if(mouseX<100 && mouseY<200) stroke(0,255,0);
else if(mouseX<100 && mouseY<300) stroke(0,0,255);
else if(mouseX<100 && mouseY<400) stroke(0);
else if(mouseX>700 && mouseY<100) strokeWeight(5);
else if(mouseX>700 && mouseY<200) strokeWeight(10);
else if(mouseX>700 && mouseY<300) strokeWeight(15);
}
訂閱:
文章 (Atom)


























