World → Device Transformation

Slides:



Advertisements
Similar presentations
Chapter 10 馬可夫鏈 緒言 如果讀者仔細觀察日常生活中所發生的 諸多事件,必然會發現有些事件的未來 發展或演變與該事件現階段的狀況全然 無關,這種事件稱為獨立試行過程 (process of independent trials) ;而另一些 事件則會受到該事件現階段的狀況影響。
Advertisements

1 Chemical and Engineering Thermodynamics Chapter 2 Conservation of mass and energy Sandler.
第七章 抽樣與抽樣分配 蒐集統計資料最常見的方式是抽查。這 牽涉到兩個問題: 抽出的樣本是否具有代表性?是否能反應出母體的特徵?
1 Q10276: Hanoi Tower Troubles Again! 星級 : ★★★ 題組: Online-judge.uva.es PROBLEM SET Volume CII 題號: Q10276: Hanoi Tower Troubles Again! 解題者:薛祖淵 解題日期: 2006.
Section 1.2 Describing Distributions with Numbers 用數字描述分配.
Sketch Up. 基本操作 Zoom 基本指令 Draw a line Draw a circle Make component Tape measure Push/ pull Rotate Orbit Zoom Share model Place model Get current view.
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
1.1 線性方程式系統簡介 1.2 高斯消去法與高斯-喬登消去法 1.3 線性方程式系統的應用(-Skip-)
: Boxes ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11003: Boxes 解題者:蔡欣燁 解題日期: 2007 年 3 月 19 日.
1 Advanced Chemical Engineering Thermodynamics Appendix BK The Generalized van der Waals Partition Function.
Agenda 目標與概述 (purpose) 架構 (structure) 流程 (procedure) 成果 (result)
Lecture 8 Median and Order Statistics. Median and Order Statistics2 Order Statistics 問題敘述 在 n 個元素中,找出其中第 i 小的元素。 i = 1 ,即為找最小值。 i = n ,即為找最大值。 i = 或 ,即為找中位數。
Introduction to Chemical Engineering Thermodynamics
JAVA 程式設計與資料結構 第二章 JAVA 程式基本概念及操作. 第一個程式 /* * 這是第一個程式 (FirstP.java) */ class FirstP{ public static void main(String args[]){ System.out.println("Whatever.
Chapter 2 聯立線性方程式與矩陣 緒言 線性方程式組 (systems of linear equations) 出現 在多數線性模式 (linear model) 中。根據以往解 題的經驗,讀者們也許已發現方程式的解僅與 該方程式的係數有關,求解的過程也僅與係數 的運算有關,只要係數間的相關位置不改變,
Section 2.3 Least-Squares Regression 最小平方迴歸
第一章 信號與系統初論 信號的簡介與DSP的處理方式。 系統特性與穩定性的判定方法。 以MATLAB驗證系統的線性、非時變、因果等特性。
MATLAB 程式設計 第 11 章 多維陣列 多維陣列的定義 在 MATLAB 的資料型態中,向量可視為 一維陣列,矩陣可視二維陣列,對於維 度 (Dimensions) 超過 1 的陣列則均可視 為「多維陣列」 (Multidimesional Arrays , 簡稱 N-D Arrays)
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
: Nails ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 11096:Nails 解題者:蘇育彣 解題日期: 2007 年 3 月 13 日 題意:給定一個正整數 n (0
具備人臉追蹤與辨識功能的一個 智慧型數位監視系統 系統架構 在巡邏模式中 ,攝影機會左右來回巡視,並 利用動態膚色偵測得知是否有移動膚色物體, 若有移動的膚色物體則進入到追蹤模式,反之 則繼續巡視。
: Walking on a Grid ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 10913: Walking on a Grid 解題者:陳盈村 解題日期: 2008 年 5 月 2 日 題意:給定一個 N*N 矩陣,題目要求依照.
BEM 特論 - 第一次討論 指導教授 : 陳正宗 終身特聘教授 指導學長 : 高聖凱、謝祥志、林羿州 學生 : 吳建鋒 日期 :2015/6/16 Fundamental Solution Green’s Function Green’s Theorem.
Matlab 二維、三維圖形篇.
Obstacle Detection and Environment Scanning by Computer Vision Technique Presented by:曹憲中.
1 Introduction to Chemical Engineering Thermodynamics Residual Gibbs free energy of fluids Smith.
Matlab Assignment Due Assignment 兩個 matlab 程式 : Eigenface : Eigenvector 和 eigenvalue 的應用. Fractal : Affine transform( rotation, translation,
Chapter 20 塑模動態觀點:狀態圖 Statechart Diagram. 學習目標  說明狀態圖的目的  定義狀態圖的基本記號  展示狀態圖的建構  定義活動、內部事件及遞延事件的狀態 圖記號.
基準特徵 基準面 基準座標系 基準點 基準線 基準軸 基準特徵顯示之控制. 基準特徵 基準面 基準座標系 基準點 基準線 基準軸 基準特徵顯示之控制.
圖層的操作與管理 圖層的作用就如同一張張透明的賽璐璐片, 你可以將動畫中的每項物件, 放置在不同圖 層中, 圖層交疊就形成完整的畫面。在各圖 層中的物件, 做任何的移動或變化, 都不會 相互干擾, 所以當你編輯一個物件時, 只要 在物件所在的圖層進行操作, 將可大幅降低 製作過程的複雜度與難度。
: War on Weather ★★☆☆☆ 題組: Contest Volumes Archive with Online Judge 題號: 10915: War on Weather 解題者:陳明凱 題意:題目總共會給你 k 個點座標代表殺手衛星的位置, 距離地球表面最少 50 公里以上,並且會給你.
影像處理學習營 練習(三)製作影片 【上】 影像處理學習營 教師 吳清月. 製作影片 學習重點 一. 利用 movie maker 軟體,編輯相片。  加上文字幕,與圖片結合。
: Fast and Easy Data Compressor ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10043: Fast and Easy Data Compressor 解題者:葉貫中 解題日期: 2007 年 3.
: Little Red Riding Hood ★★★☆☆ 題組: Contest Volumes Archive with Online Judge 題號: 11067: Little Red Riding Hood 解題者:陳明凱 解題日期: 2008 年 3 月 14 日 題意:
: Playing War ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11061: Playing War 解題者:陳盈村 解題日期: 2008 年 3 月 14 日 題意:在此遊戲中,有一類玩家一旦開始攻擊, 就會不停攻擊同一對手,直到全滅對方或無法再.
專題討論 Modeling the distribution of enhanced soil shear strength beneath riparian trees of south-eastern Australia 許涵硯
結構學(一) 第七次作業 97/05/15.
Fugacity Coefficient and Fugacity
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
公司加入市場的決定. 定義  平均成本 = 總成本 ÷ 生產數量 = 每一單位產量所耗的成本  平均固定成本 = 總固定成本 ÷ 生產數量  平均變動成本 = 總變動成本 ÷ 生產數量.
The application of boundary element evaluation on a silencer in the presence of a linear temperature gradient Boundary Element Method 期末報告 指導老師:陳正宗終身特聘教授.
資料結構實習-一 參數傳遞.
Feature Motion for Monocular Robot Navigation. 單視覺機器人 – 追蹤 (tracking) 最常見的機器人導航技術 特徵點特性(特別 匹配性 抗破壞性) 特徵點取得(區塊 尺度不變)
4 堆疊與佇列 4.1 前言 四種基本的資料結構 (可儲存資料的容器) 陣列 (Array)、串列(List): 最基本
觀測量的權 權的觀念與計算.
公用品.  該物品的數量不會因一人的消費而受到 影響,它可以同時地被多人享用。 角色分配  兩位同學當我的助手,負責:  其餘各人是投資者,每人擁有 $100 , 可以投資在兩種資產上。  記錄  計算  協助同學討論.
Management Abstracts Retrieval System; MARS 檢索操作.
勞工分工. 定義  分工是指工人專責一項工作或工作 的某一部分。 遊戲規則  今天製造魚。  將全班同學分成八組每組五位同學。  當中四組同學體驗一下勞工分工。  另外四組同學個別自己製造魚。
: Beautiful Numbers ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11472: Beautiful Numbers 解題者:邱經達 解題日期: 2011 年 5 月 5 日 題意: 若一個 N 進位的數用到該.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
函式 Function Part.2 東海大學物理系‧資訊教育 施奇廷. 遞迴( Recursion ) 函式可以「呼叫自己」,這種動作稱為 「遞迴」 此程式的執行結果相當於陷入無窮迴圈, 無法停止(只能按 Ctrl-C ) 這給我們一個暗示:函式的遞迴呼叫可以 達到部分迴圈的效果.
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
1 第七章 植基於可調整式量化表及離散餘 弦轉換之浮水印技術. 2 Outlines 介紹 介紹 灰階浮水印藏入 灰階浮水印藏入 灰階浮水印取回 灰階浮水印取回 實驗結果 實驗結果.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Chapter 2. Recurrence Relations (遞迴關係)
介紹不同坐標系之間的轉換 以LS平差方式求解坐標轉換參數
演算法課程 (Algorithms) 國立聯合大學 資訊管理學系 陳士杰老師 Course 7 貪婪法則 Greedy Approach.
: Help My Brother ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11033: Help My Brother 解題者: 呂明璁 解題日期: 2007 年 5 月 14 日.
連續隨機變數 連續變數:時間、分數、重量、……
指導教授 : 林啟芳 教授 組員 : 邱秉良 林育賢. 何謂 GPS  GPS 即全球定位系統,是一個中距離圓 型軌道衛星導航系統。它可以為地球表面 絕大部分地區( 98% )提供準確的定位、 測速和高精度的時間標準。
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
牽涉兩個變數的 Data Table 汪群超 11/1/98. Z=-X 2 +4X-Y 2 +6Y-7 觀察 Z 值變化的 X 範圍 觀察 Z 值變化的 Y 範圍.
:Problem E.Stone Game ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10165: Problem E.Stone Game 解題者:李濟宇 解題日期: 2006 年 3 月 26 日 題意: Jack 與 Jim.
:Rings and Glue ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10301: Rings and Glue 解題者:施博修 解題日期: 2011 年 5 月 18 日 題意:小約翰有了個大麻煩,他不小心將 rings.
結構學 ( 一 ) 第八次作業 97/05/22. 題目一 題目一 (a) 先決定放鬆哪個束制,成為靜定結構 以支承 C 之水平反力為贅力,則 C 點滾支 承變成自由端,即形成靜定基元結構 C 點滿足變位諧和  Δ CH =0.
: How many 0's? ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11038: How many 0’s? 解題者:楊鵬宇 解題日期: 2007 年 5 月 15 日 題意:寫下題目給的 m 與 n(m
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
1 柱體與錐體 1. 找出柱體與錐體的規則 2. 柱體的命名與特性 3. 柱體的展開圖 4. 錐體的命名與特性 5. 錐體的展開圖
Mathematical fundamentals of 3D computer graphics 1.1 Manipulating three-dimensional structures 1.2 Vectors and computer graphics 1.3 Rays and computer.
Presentation transcript:

World → Device Transformation 第六章 視景圖形座標轉換 World → Device Transformation Viewport World Device

Windows WCS (World Coordinate System) PDCS (Physical Device Coordinate System) NDCS (Normalized Coordinate System) UCS (User Coordinate System) WCS:theoretically infinite Window:a finite region in WCS Viewport:defines the physical location of the display area within the physical raster

Normalization Transformation (N): World Coordinate Normalized Device Coordinates map Workstation Transformation (W): Normalized Device Coordinate Physical Device Coordinate map Viewing Transformation (V): V = W‧N

Coordinate (parameter 0~1) Viewport Window Normalized Device Coordinate (parameter 0~1) Workstation Coordinate World Coordinate

Window – to – Viewport Transformation World Normalization Device

Mapped to viewport area

Point in Window in a viewport and

Window – to – Viewport Transformation Scaling Maintain relative proportion ( 保持比例 ) Window size = Viewport size 如果 ( 大小不變 ) 不變 放大 縮小 Translation 平移

Boundary Conflicts(衝突) 處理方法 1. Wraparound(捲折) 轉折至下方繼續 2. Scissoring(切斷) 在Hardware 上切斷

Boundary Conflicts(cont.) 處理方法 3. Saturation(滲透) 以 為基準 向下擠 4. Clipping(修剪) 以 為基準 切斷

CLIPPING Point Clipping 幾何計算 1. Analytical World 畫素計算 2. Raster World Point Clipping A point is inside the window Visible

Point Clipping (cont.) Both True Inside the Window

Clipping lines Analytical Clipping Check In or Out of 2 end points Both In Both Out One In / One Out Need to Check Parametric Equation Need to Calculate Intersection points

Cohen – Sutherland Algorithm Line Clipping 修剪 Cohen – Sutherland Algorithm 將 Clip rectangle 分為 9 份 將 4-bit code assign 給每一點 (四個邊) Each end point 一條線的2端點, 每一端點給一個Code 0 0 0 0 4 3 2 bit 1 從右至左,視Window 之關係位置給予Code

Cohen – Sutherland Algorithm (cont.) bit 1:left bit 2:right bit 3:below bit 4:above 1001 1000 1010 0001 0000 Window 0010 0101 0100 0110

Cohen – Sutherland Algorithm (cont.) bit 1:sign bit of bit 2:sign bit of bit 3:sign bit of bit 4:sign bit of 6 8 1001 1000 3 1010 9 7 10 1 0000 0001 0010 5 4 2 0101 0110 0100

Logical AND of both codes of end points Line End point bit codes Logic AND Conclusion 1 2 3 4 5 0000 0000 0100 0100 1000 0010 0000 0010 0001 0100 Completely Visible Completely Invisible No Conclusion Partially Visible 0000 0 0100 1 Completely Visible Completely Invisible 判 斷 準 則 Partially Visible No Conclusion

Logical AND of both codes of end points (cont.) Need to check intersection points Line Codes of 2 end points AND Conclusion Completely Invisible Partially 1000 0000 0001 6 7 8 9 10 1001 1000 1000 0000 1001 0000 1001 0001

Partially Visible or No Conclusion (求線與Clipping Windows之交點) 1. Find Intersection Points Line 2. In , Out Intersection Points (1) Left (2) Right

3. Check Parametric Equations (3) Bottom (4) Top 防止延伸線上的交點 3. Check Parametric Equations Line Each Intersection Point 4 Boundary Line (1) Line(線)

If 2 intersection points (2) Boundary (邊界) (3) If (1)、(2)、(3)皆成立 Intersection True If 2 intersection points New Line If 1 intersection point check ( code 0000 ) the point in window for example ( code 0000 ) and 定義 New Line

Cyrus – Beck Technique Algorithm: Clipping a 2-D line against a rectangle or a convex凸 polygon Edge Ei PEi P1 P0 Ni Normal of Edge Ei (邊線法向量)

Cyrus – Beck Technique (cont.) 在 Edge Ei 上任取一點 P Ei 取 3 個向量:(1)PEi to P0 (2)PEi 在 Edge Ei 上 (3)PEi to P1

Cyrus – Beck Technique (cont.) 根據 判斷 在外面 在Edge上 在內部 (Counterclockwise Edge Index) Intersection Point: with Edge Ei 公式推導如下頁

Cyrus – Beck Technique (cont.) 代入 and

Cyrus – Beck Technique (cont.) Line 1 P1 Line 3 PE P1 Line 2 PL P1 PL PL P0 PE P0 PL PE PE P0 交點分類:PE(Potentially Energy) PL(Potentially Leaving)

Cyrus – Beck Technique (cont.) PE PL Choose a ( PE , PL ) pair PE:with tE PL:with tL The intersecting line segment is defined by ( tE , tL )

Calculations for Parametric Line Clipping Clip Edge Ei Normal Ni PEi P0-PEi Left Right Bottom Top

Calculations for Parametric Line Clipping

2 Polygons Clipping Each Line Clipping Polygons 2 Polygons Clipping Each Line before after

Sutherland – Hodgman Algorithm Polygon:a set of ordered vertices Compare a polygon to each boundary Output is a set of vertices defining polygon 依序比較 2 polygons 利用切斷各邊 Original Clip Left Clip Right Clip Bottom Clip Top

Polygon – Polygon Clipping Sutherland – Hodgman Algorithm Polygon clockwise Traverse vertices clockwise S:前一點 P:目前點 S P P S I I P P S S IN→IN Save P IN→OUT Save I OUT→OUT No Save OUT→IN Save I , P

Saved Vertices New Polygon 2 3 1‘ 2‘ 1‘ 2‘ 4 1 3‘ 3‘ 5‘ 4‘ 5‘ 4‘ 6 5

View Volume In 3 – D viewing: Projection(投影) Window is used to define a View Volume. View plane is z = 0 plane Window is defined by on the view plane Only those objects within the view volume are projected and displayed on the view plane. 只有在view volume內的物體才會被投影及顯示

View Volume (cont.) Parallel Projection Perspective Projection Truncated Pyramid Frustum 截斷角錐幾何體

View Volume (cont.)

Parallel Projection near:hither 此處 far:yon plane 彼處 near:front far:back

Perspective Projection Center of Projection

3 - D Window - to – viewport mapping Viewport is a regular parallelepiped(平行六面體) defined innormalized coordinates 3 - D Window - to – viewport mapping 比例 位移

3 - D Window - to - viewport mapping (cont.) y z x View Volume 3 - D viewport

3 - D Window - to - viewport mapping (cont.) View Volume:defined by and 3 - D viewport :defined by and

Clipping against a normalized View Volume Extension of Code of 6 bits right to left(六個面) 000000 back front above below right left 後 前 上 下 右 左 Bit 6 Bit 1

Code of 6 bits right to left (cont.) below bit 4 above bit 5 front bit 6 back Code Code Logical AND of 2 codes 2 end points of a line

Code of 6 bits right to left (cont.) 判斷結果 AND = 0,兩端皆 0 Inside AND = 1,兩端有 1 Outside AND = 0,兩端有 1 , 0 Partially Inside AND = 0,兩端都有 1 No Conclusion Check Intersection Points 6 Intersection Points

Code of 6 bits right to left (cont.) Line 其中 1. Intersection of a line with a ( face plane ) of view volume 2. with front

Line segment does not intersect 2. with front not in (0 ~ 1) (1) If Line segment does not intersect (2) If in (0 ~ 1) (3) If neither nor is in beyond boundary(超出邊界)

3. Check Intersection with 6 ( faces ) planes Side View P2 A P1 P2 B P1 3. Check Intersection with 6 ( faces ) planes

Cyrus - Beck Algorithm 用在 3 - D