2012年10月11日 星期四

HW04

HW03_1:     
Extend the result of HW02-3. Each cell in the above picture can be considered as an eye. Write a processing program to let these eyes can trace the mouse of your computer, i.e., the locations of ellipse are determined by mouseX, and mouseY which are two keywords of Processing recording the X-coordinate and Y-coordinate of your mouse.
The goal of this homework is to develop a processing program which can interact with your mouse.*Go to Page 206 in the PDF file and learn the elementary functions of mouse in Processing.


 HW03_2 , 04_1:     
Extend the result of HW03-2 such that you can display texts on the simple electronic drawing board and save the content of the simple electronic drawing board to a JPEG file.
*Go to Page 111 in the PDF file and learn the functions of texts in Processing.
*Go to Page 368 in the PDF file and learn the save function of images in Processing.


畫了個海綿疹子寶寶?

實作小畫家簡易功能:

mouseButton ==LEFT
滑鼠左鍵點擊事件;

X  <= mouseX <= Y  
stroke(0,0,0);
判斷範圍讓滑鼠指標移到該區域後可以讓畫筆顏色變換;

save("line.jpg");
存檔;

text("TEXT", X , Y);
文字;

心得:

以前我們都是使用者用軟體,能自己開發也非常的有趣!!

這次能自己做出簡易的小畫家,當然要做出完整的功能還是要自己去研究研究pdf檔,再加入自己的創意,一定會更棒。

比較可惜的是上課老師切畫面比較頻繁,會打斷我們思緒,能讓我們先去搜索pdf檔,自己找出該用、能用到的語法,印象也會比較深刻。






沒有留言:

張貼留言