顯示具有 HW06 標籤的文章。 顯示所有文章
顯示具有 HW06 標籤的文章。 顯示所有文章

2011年1月6日 星期四

HW06



心得:這是我目前最喜歡的作業,用這種殘影的效果,做出很吸引人的成品
不過上課交的電風扇感覺有點複雜,而且竟然是去年的期中考題,讓人有點緊張,原來這是期中考的level,不過比期中考更讓人煩惱的是期中project......

HW06



心得: 這次作業蠻酷的,滑鼠移動一下就有亮晶晶的圖案跑出,想把這個程式套用到windows的滑鼠指標上,晚上一定酷,而且應該沒有人自己設計滑鼠程式吧,又多了一份成就感。

HW06

HW06 :

HW06_2 :


http://csie.fju.edu.tw/~ie985240/HW06_2/index.html

HW06_2b :



http://csie.fju.edu.tw/~ie985240/HW06_2b/index.html

HW06_3 :



http://csie.fju.edu.tw/~ie985240/HW06_3/index.html

Hw06_3b :



http://csie.fju.edu.tw/~ie985240/HW06_3b/index.html

HW06_exercise :


http://csie.fju.edu.tw/~ie985240/HW06_exercise/index.html

2011年1月5日 星期三

HW06


http://www.csie.fju.edu.tw/~ie985137/HW6/applet/
心得: 這次從課本裡面COPY程式碼出來改,還蠻簡單的,設成彩色後效果就很不一樣!

HW06

HW06

-------------------------------------------------------------------------------------------------------

心得:

這次的作業學到了很多東西,從電風扇到最後有很多球跟著滑鼠移動,還有淡出淡入的效果感覺都很實用,做出來的效果也很不錯.

2010年12月29日 星期三

HW06

心得
這次把每個圓的顏色用亂數存起,然後隨著滑鼠移動而跟著有不同的圓點跑出來,之前的圓也會隨著時間慢慢消失,感覺同樣的一些CODE加上不同的一些指令又能蹦出新的東西來,真是太好玩了

2010年11月24日 星期三

HW06



● 心得:
這次一次學了一堆東西跟技巧,讓一堆球球跟著滑鼠移動真的很好玩也很有趣,希望之後能學到更多的技巧。


2010年11月20日 星期六

HW06



這次從範例複製程式


跑出來的是灰階的圓圈


老師希望我們改成彩色的


修改了了幾次


發現只要將顏色寫個FOR迴圈再random就可以了

HW06





















心得:其實只要改一改小東西,就可以變化很大,感覺很神奇

2010年11月19日 星期五

HW06


心得:這次上課學了好多東西,有座標的轉換、風扇轉動、還有很多個不同顏色的小圓隨著你滑鼠移動而移動。感覺很有趣很繽紛,也學到了好多東西!

HW06



心得:這次上課學到了轉電風扇、跟屁蟲和滑鼠滑過有球球。感覺起來比之前所學的難度還高,複製了教學文件上的程式範例,照自己的想法修改,但是跑不出想要的成果,也不知道該怎麼修改才對!後來詢問同學和經過老師的講解,再慢慢的消化吸收,總算是寫出來了!

2010年11月11日 星期四

HW06

HW6



心得:這次作了許多東西,雖然最後只需要放這份
但這次也上了座標旋轉與轉換之類的,剛開始總覺得很難懂
但之後做了風扇概念就比較清楚了!
而最後這份看著許多的圓跟著滑鼠動,每個圓都有自己的顏色
且由小到大,看起來很漂亮!

HW06



http://www.csie.fju.edu.tw/~ie975220/HW06/index.html
這次把每個圓的顏色用亂數存起
再讓越後面的圓跑的較慢
滑鼠在動時圓會跟滑鼠動
每個顏色都不同看起來很鮮豔很漂亮
每次都用差不多的指令做出許多不同的小程式
感覺受益良多

HW06


HW06

6-4


這禮拜做的一開始覺得有點困難
後來發現只要使用陣列把位置存起來就能做到想要的效果
而且這個作業做起來很漂亮
很像煙火在天空中




HW06



http://csie.fju.edu.tw/~ie985231/HW06/applet/index.html

心得:這次作業思考了發現加個random進去
之後就能產生這樣的效果。把既有的程式碼
做跟改,再去研究改出來的東西。應該算是
順利完成的作業,昨完好累可是好開心。

2010年11月10日 星期三

HW06

這次的作業做出淡入淡出的效果,並將滑鼠座標存在array中,使所有的圓連接在一起,效果真是令人意想不到的酷炫,期中考過後就要開始玩Arduno板了,希望可以學到更多好玩的東西!

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.

2010年10月28日 星期四

HW06: Image Animating Application

HW06-1:
1.
Images are colored with the tint() function. This function is used the same way as
fill() and stroke(), but it affects only images:

tint() //單一顏色遮罩住圖片,可以做出淡入淡出效果
noTint() //把tint關掉


2.讓圖片移動
就是讓 image(photo, x, y)裡的X和Y做增加或遞減


HW06-2: Coordinate system translation
translate(x, y) //平移系統座標
rotate(angle) //旋轉座標,逕度非角度,會順時鐘旋轉,且角度會一直累積,到2PI會回到原點
會動的電風扇




HW06-3: Easing Motion
創造一個球,跟著滑鼠跑,之後增加跟屁蟲XD

x1 += (mouseX- x1) * easing;  //easing是一個參數,設定跟緊的程度
y1 += (mouseY- y1) * easing;  







HW06-4: Storing mouse data in Arrays
把滑鼠座標存在陣列裡,之後複製前一個球等於下個球的位子

 for (int i = num-1; i > 0; i--)
 {
     x[i] = x[i-1];
     y[i] = y[i-1];
 }




補充: keyPressed //按鍵觸發布林事件


心得:
這次做得東西都和使用者互動有關係,不再是死死的程式,是生動活潑的!
我非常歡這樣的課程,希望能把這些所學應用到專題上。



HW06

網頁DEMO
http://www.csie.fju.edu.tw/~ie965257/hw_6/index.html






















今天學到滑鼠移動就有淡入淺出的效果

還有framerate的用法

感覺好炫麗唷!!

好期待去光華買完材料後實體的互動..