2008年11月30日 星期日

Processing 之 考題延伸

第一題: 滑鼠連結橡皮筋

http://163.25.148.118/xms/index.php?reload=1&favoriteMode=1&view=content/show.php%3Fid%3D1466

Processing 之 Recursive

請同學於 PDF檔內 Search Recursive
Run 找到的程式 體驗何謂 Recursive
再將 自己的領悟 做成投影片 講解 何謂 Recursive
延伸 設計 自己的 Recursive 圖形

2008年11月23日 星期日

Processing 之 image 作業題目

有六個按鈕 每個按鈕 分別執行 圖片之
1. 淡入
2. 淡出
3. 飛入
4. 飛出
5. 由小變大
6. 由大變小
六項功能

Processing 之 image 由小變大

PImage img;
int i;

void setup()
{
size(500, 500);
i=10;
img = loadImage("robot.jpg");
frameRate(20);
}

void draw()
{
background(255);
image(img, 50, 50, i, i);
i = i+20;
if (i>400) i=400;
}

Processing 之 image 由大變小 飛入

PImage img;
int i;

void setup()
{
size(500, 500);
i=1000;
img = loadImage("robot.jpg");
frameRate(20);
}

void draw()
{
background(255);
image(img, 150, 150, i, i);
i = i-20;
if (i<200) i=200;
}

Processing 之 image 飛出

PImage img;
int i;

void setup()
{
size(1000, 200);
i=0;
img = loadImage("robot.jpg");
frameRate(20);
}

void draw()
{
background(255);
image(img, i, 0);
i = i+20;
}

Processing 之 image 淡出

PImage img;
int i;

void setup()
{
size(1000, 200);
i=255;
img = loadImage("robot.jpg");
frameRate(2);
}

void draw()
{
tint(i); // Tint gray
image(img, 0, 0);
i = i-20;
if (i<0) i=0;
}

Processing 之 image 延伸


image(
為關鍵字 在PDF檔內 搜尋
找到一個喜歡的相關程式 進行深入研究
再將你的 心得 與 程式解說 記錄在 HWSHOW上

此作業希望訓練同學
1. 閱讀文件的能力
2. 程式的理解能力
3. 文字表達能力

Processing 補充教材 --- image

PDF 檔 search 122 Page 95

Digital photographs are fundamentally different from analog photographs captured on film.
Like computer screens, digital photos are rectangular grids of color.
The dimensions of digital images are measured in units of pixels.
If an image is 320 pixels wide and 240 pixels high, it has 76,800 total pixels.
If an image is 1280 pixels wide and 1024 pixels wide, the total number of pixels is an impressive 1,310,720 (1.3 megapixels).
Every digital image has a color depth.
The color depth refers to the number of bits (p. 669) used to store each pixel.
If the color depth of an image is 1, each pixel can be one of two values, for example, black or white.
If the color depth is 4, each pixel can be one of 16 values.
If the color depth of an image is 8, each pixel can be one of 256 values.
Looking at the same image displayed with different color depths reveals how this affects the image’s appearance:


數位影像基本上與類比影像是不同的
數位影像好比電腦螢幕 它是一個由一個充滿顏色的矩形所組成
數位影像的大小是由像素點來衡量
假如一張影像的寬有320個像素點 高有240個像素點 那麼這張影像共有76,800個像素點
假如一張影像的寬有1280個像素點 高有1024個像素點 那麼這張影像像素點的個數相當驚人 共有1,310,720點(約1.3 mega )
而每一個數位影像有一個色彩深度
其中色彩深度指的是用來儲存每一個像素點所需的bit數
假如一張影像的色彩深度為1 那麼每個像素點有兩個數值可以選 如 黑色或白色
假如色彩深度為4 那麼每個像素點的顏色就有16種選擇
同樣的 假如色彩深度為8 那麼每個像素點有256種的顏色可以選
由上可知 同一張影像因不同的色彩深度會有不同的外觀展現

2008年11月16日 星期日

外科系 多媒體 下半學期 課程規劃

11/17: Movie maker 練習
11/24: Movie maker 實作
12/1: Movie maker成果互評 + GoldWave練習
12/8: GoldWave實作
12/15: GoldWave成果互評 + 網頁練習
12/22: 網頁實作
12/29: 網頁互評 + 期末回顧