1. What is your favorite homework?
我最喜歡的作業是 HW06-4: Storing mouse data in Arrays
喜歡它的原因不是因為技術,而是我喜歡這種有彩色的點點
而且背景或點點顏色、大小是可以調整的
我曾經用這次的作業做一點小修改,來美化一份企劃書
把背景顏色、點點大小、顏色改成自己想要的
然後在設計點滑鼠左鍵就是把圖像存下來
擷取下來的圖片就可以再用photoshop修改,來美化設計我的企畫書
最後的企劃書成品我也很滿意
經由這次經驗,讓我感覺到processing不僅僅是他的簡單,
還能產生有一些設計效果的應用(動畫、繪圖等等)
更可以結合arduino做一些互動
2. What did you learn in this course?
我學到了一些不一樣的想法
因為平常都是在寫單純的coding
這次運用到array、frameRate的一些方法來達成動畫的效果
以及以前完全沒碰過的麵包板,雖然以前常常聽到
也很高興這次學會了運用麵包板來接一些簡單的接LED、speak out、button
3. What did you change after this course?
我覺得是會更想要去學習一些互動媒體的東西吧
網路上看到很多有關arduino厲害的影片
也會想要自己有空的時候,能夠寫一些有趣的互動應用
2011年1月6日 星期四
2010年12月2日 星期四
HW11
這次小作業弄得比較久, 因為我們的喇叭都不一樣
我的聲音很小,
button有時候好像會接觸不良,
加上這次要接四個button和一個喇叭,
我的麵包版接的好亂~
最後好不容易趕工出來了
led: output
button: input
蜂鳴器: output
聲音音調: 給不同的頻率,就可產生不同音調,每個蜂鳴器都有些不同
標籤:
496512649 怯婷芳,
497512050 蔡欣儒,
HW11
2010年11月28日 星期日
HW10
最近開始真正接觸到arduino板子了
因為學的完全是軟體, 以前從來沒有接觸麵包板、arduino板
所以覺得很新鮮, 以前聽到麵包板還以為很難
這次能藉由這門課真正接觸到麵包版, 才發現其實一點都不難
希望接下來的幾堂課能學到更多有趣的東西!
這次的作業是要小組兩人合作, 設計7個LED亮的方式,
我們討論了一下子, 完成了這個小設計,有五種模式
但是畫質太差了~~用手機拍的
led長: 接到pin
led短: 接到GND
麵包版: 外面兩排橫向連通;中間排直向連通
led長: 接到pin
led短: 接到GND
麵包版: 外面兩排橫向連通;中間排直向連通
標籤:
496512649 怯婷芳,
497512050 蔡欣儒,
HW10
2010年11月20日 星期六
期中考

期中考當天沒有把random和顯示圖片寫出來,
因為在寫跑框框的部分寫了太久
主要遇到的問題是該如何讓框框動
解決方法是:
用一個變數, 1~8, 當做綠色框框跑到的id
每跑到一個id, 就把上一個id框框清空, 再把變數 ++
使用變數++來控制框框為綠色或白色
最後的random, 就在stop的時候, 看目前的變數值為多少,
但變數要記得減一, 才是目前停下來的綠色框框id
贏與輸就直接比較看random數與停下id是否相同就好
標籤:
496512649 怯婷芳,
期中考
2010年10月29日 星期五
HW06
6_2: rotate(), p.209(236)
http://140.136.150.78/IM2010/HW06/b/applet/
6_3: easing, p.239(266)
http://140.136.150.78/IM2010/HW06/c/applet/
6_4: storing mouse data p.306(333)
http://140.136.150.78/IM2010/HW06/d/applet/
這次學會透過陣列座標傳遞來達成移動的效果。
p.160
translate(x, y)
if translate(10,30) , rec(0,5,20,20) 的座標系統會轉成在 (10,35) 的位置開始畫
所有在translate( )後畫的東西做標系統都會改變
如果連續寫translate( ), 座標直會相加
ex:
translate(10,30)
rect(0,5,20,20) --> draw from 10,35
translate(10,30)
rect(0,5,20,20) --> draw from 20,70
p.164
rotate(angle): function rotates the coordinate system so that shapes can be drawn
to the screen at an angle. --> that's why need translate()
Shapes are always rotated around their position relative to the origin (0,0), and positive
numbers rotate them in a clockwise direction.
rotate和translate一樣,連續寫的話也會累積,0.0 to 2π.
ex:
rotate(PI/2)
rotate(-PI/8)
translate(width/2, height/2); --> 位移座標系統
rotate(PI/8);
rect(-25, -25, 50, 50); --> 畫在中央
with for:
translate(66, 33); // Set initial offset
for (int i = 0; i < 18; i++)
{ // 18 repetitions
strokeWeight(i); // Increase stroke weight
rotate(PI/12); // Accumulate the rotation
line(0, 0, 55, 0);
}
p.252
if ((keyPressed == true) && (key == 'A'))
If you want to check for both uppercase and lowercase letters, you have to extend the
relational expression with a logical OR, the || relational operator.
--> if ((keyPressed == true) && ((key == 'a') || (key == 'A')))
key code: Alt, Control, Shift, Backspace, Tab, Enter, Return, Escape, Delete,ALT, CONTROL, SHIFT, UP, DOWN, LEFT, RIGHT
用之前要先if (key == CODED)
ex:
if (key == CODED)
{
if (keyCode == UP) { }
}
p.258
mouseMoved() : block is run at the end of each frame when the mouse moves and no button is pressed.
mouseDragged() block does the same when the mouse button is pressed
p. 266
Easing, also called interpolation, is a technique for moving between two points.
As the shape approaches the target position, the distance moved each frame decreases.
The easing variable sets the fraction of the distance between the circle’s current
position and the position of the mouse that the circle moves each frame.
between 0.0 and 1.0,
The value of this variable changes how quickly the circle will reach the target.
An easing value of 0.5 means the circle will move half the distance each frame and an
easing value of 0.01 means the circle will move one hundredth of the distance each
frame.
http://140.136.150.78/IM2010/HW06/b/applet/
6_3: easing, p.239(266)
http://140.136.150.78/IM2010/HW06/c/applet/
6_4: storing mouse data p.306(333)
http://140.136.150.78/IM2010/HW06/d/applet/
這次學會透過陣列座標傳遞來達成移動的效果。
p.160
translate(x, y)
if translate(10,30) , rec(0,5,20,20) 的座標系統會轉成在 (10,35) 的位置開始畫
所有在translate( )後畫的東西做標系統都會改變
如果連續寫translate( ), 座標直會相加
ex:
translate(10,30)
rect(0,5,20,20) --> draw from 10,35
translate(10,30)
rect(0,5,20,20) --> draw from 20,70
p.164
rotate(angle): function rotates the coordinate system so that shapes can be drawn
to the screen at an angle. --> that's why need translate()
Shapes are always rotated around their position relative to the origin (0,0), and positive
numbers rotate them in a clockwise direction.
rotate和translate一樣,連續寫的話也會累積,0.0 to 2π.
ex:
rotate(PI/2)
rotate(-PI/8)
translate(width/2, height/2); --> 位移座標系統
rotate(PI/8);
rect(-25, -25, 50, 50); --> 畫在中央
with for:
translate(66, 33); // Set initial offset
for (int i = 0; i < 18; i++)
{ // 18 repetitions
strokeWeight(i); // Increase stroke weight
rotate(PI/12); // Accumulate the rotation
line(0, 0, 55, 0);
}
p.252
if ((keyPressed == true) && (key == 'A'))
If you want to check for both uppercase and lowercase letters, you have to extend the
relational expression with a logical OR, the || relational operator.
--> if ((keyPressed == true) && ((key == 'a') || (key == 'A')))
key code: Alt, Control, Shift, Backspace, Tab, Enter, Return, Escape, Delete,ALT, CONTROL, SHIFT, UP, DOWN, LEFT, RIGHT
用之前要先if (key == CODED)
ex:
if (key == CODED)
{
if (keyCode == UP) { }
}
p.258
mouseMoved() : block is run at the end of each frame when the mouse moves and no button is pressed.
mouseDragged() block does the same when the mouse button is pressed
p. 266
Easing, also called interpolation, is a technique for moving between two points.
As the shape approaches the target position, the distance moved each frame decreases.
The easing variable sets the fraction of the distance between the circle’s current
position and the position of the mouse that the circle moves each frame.
between 0.0 and 1.0,
The value of this variable changes how quickly the circle will reach the target.
An easing value of 0.5 means the circle will move half the distance each frame and an
easing value of 0.01 means the circle will move one hundredth of the distance each
frame.
標籤:
496512649 怯婷芳,
HW06
2010年10月28日 星期四
2010年10月14日 星期四
HW05
Image match
http://140.136.150.78/IM2010/HW05/applet/
依此方法即可達到image match的功能 p.225
int front = int(random(1, 10)); // Select the front card
int back = int(random(1, 10)); // Select the back card
PImage imgFront = loadImage(front + "f.jpg");
PImage imgBack = loadImage(back + "b.jpg");
image(imgFront, 0, 0);
image(imgBack, 60, 0);
我畫的front
我畫的back
http://140.136.150.78/IM2010/HW05/applet/
依此方法即可達到image match的功能 p.225
int front = int(random(1, 10)); // Select the front card
int back = int(random(1, 10)); // Select the back card
PImage imgFront = loadImage(front + "f.jpg");
PImage imgBack = loadImage(back + "b.jpg");
image(imgFront, 0, 0);
image(imgBack, 60, 0);
我畫的front
我畫的back
標籤:
496512649 怯婷芳,
HW05
2010年10月7日 星期四
2010年10月1日 星期五
HW03
3-1
接著上次最後一個作業, 改成中間內兩個圓圈會隨者滑鼠座標移動。
mouseX、mouseY 代表滑鼠目前的座標
ellipse(x+(mouseX-400)/12, y+(mouseY-400)/12, w2, h2) 除越多表移動越慢,因加的越少
3-2
一個簡易操作的小畫家, 可選擇五種顏色,畫筆大小,擦掉,清除,存檔
繪畫線條的效果 --> 結合 frameRate(), mouseX, mouseY, pmouseX, pmouseY, line(x1,y1,x2,y2)
frameRate() 把頻率調快、pmouseX代表滑鼠在前一個位置的座標
滑鼠點擊 --> mousePressed == true
點滑鼠左鍵 --> mouseButton == LEFT
寫文字 --> textSize(18)、text("string", x, y, weight, height)
文字顏色一樣用 fill()
一開始的讓圈圈隨滑鼠移動,
雖然是一個很簡單的function,
但是為了畫圓的座標想了好久
第二個小作業就相對有趣多了,
實做出了一個簡易版的小畫家, 很好玩
標籤:
496512649 怯婷芳,
HW03
2010年9月23日 星期四
HW02
2-1.
畫100個矩形, 其大小、顏色、和位置都是random
使用for迴圈來run 100次
填滿顏色用 fill (R, G, B, Alpha ) --> p.154 random( high )、random( low, high )、random( 255 )
矩形 rect (x, y, width, height ) --> random(x, y, random( w ), random( h ) )
http://140.136.150.78/IM2010/HW02/a/applet/
The code inside a draw() block runs in a loop until the the stop button is pressed or the window is closed.
Each time the draw() function finishes, it draws a new frame to the display window and then starts running the block again from the first line.
By default, frames are drawn to the screen at 60 frames per second (fps),each second.
float y = 0.0;
void draw()
y = y + 0.5;
}
The background of the display window does not refresh automatically, so lines will simply accumulate.
drawing function, Utilize noLoop() to make a program run its draw() only one time.
void setup()
noStroke();
smooth();
noLoop();
}
void draw()
eye(20, 50);
}
ellipse(x, y, 60, 60);
fill(0);
ellipse(x+10, y, 30, 30);
fill(255);
ellipse(x+16, y-5, 6, 6);
}
畫100個矩形, 其大小、顏色、和位置都是random
使用for迴圈來run 100次
填滿顏色用 fill (R, G, B, Alpha ) --> p.154 random( high )、random( low, high )、random( 255 )
矩形 rect (x, y, width, height ) --> random(x, y, random( w ), random( h ) )
http://140.136.150.78/IM2010/HW02/a/applet/
2-2. 將第一個作業改成每秒產生1000個矩形 p. 203
每秒產生,需用到 setup()、draw()、frameRate()
在空白區塊可作宣告變數
setup() 只執行一次
draw() 重複執行,其重複頻率由frameRate()控制,frameRate(n)表每秒跑n次
2-3. 改寫 p.92的圖形
會用到nest loop,改變 x, y來產生多個圖形變化
line( x1, y1, x2, y2 ),欲改變 line的顏色,需要使用stroke(R,G,B)
smooth()
strokeWeight() 線條粗細
2-4. 畫一張size(800, 600),共4*3=12個 大小200*200 圓
使用nest for loop來畫出12個圓
這次一口氣做了四個小作業
一開始就要畫random隨機產生不同顏色和大小,沒想到processing的作法這麼直觀
直接在畫矩形和顏色的function直接使用random就好
後面使用的setup()和draw()的概念也很清晰,並可控制頻率
這次學到了很多東西
p.200
Each time the draw() function finishes, it draws a new frame to the display window and then starts running the block again from the first line.
By default, frames are drawn to the screen at 60 frames per second (fps),each second.
float y = 0.0;
void draw()
{ frameRate(30);
line(0, y, 100, y);y = y + 0.5;
}
The background of the display window does not refresh automatically, so lines will simply accumulate.
drawing function, Utilize noLoop() to make a program run its draw() only one time.
void setup()
{
size(100, 100);noStroke();
smooth();
noLoop();
}
void draw()
{
eye(65, 44);eye(20, 50);
}
void eye(int x, int y)
{
fill(255);ellipse(x, y, 60, 60);
fill(0);
ellipse(x+10, y, 30, 30);
fill(255);
ellipse(x+16, y-5, 6, 6);
}
標籤:
496512649 怯婷芳,
HW02
2010年9月16日 星期四
HW01
小畫家:
processing:
一開始找圖的時候看到好多幾何圖形,
因為一開始不知道如何實作,
所以選了一張比較簡單的圖形。
但是化小畫家的時候發現這張圖有漸層,就不知道怎麼畫。
所以就都把他畫成紅色的。
關於processing,這次是第一次接觸。
沒有想像中的困難,只要知道function怎麼用就好了。
標籤:
496512649 怯婷芳,
HW01
訂閱:
文章 (Atom)






