天天看點

空間坐标轉換

空間坐标轉換[Transformation of Coordinate Spaces]

    • 文章出處
    • 坐标空間的定義
    • 四種空間類型
    • 生詞表
    • 參考

文章出處

點選此處查閱MSDN文章

坐标空間的定義

A coordinate space is a planar space based on the Cartesian coordinate system. This system provides a means of specifying the location of each point on a plane. It requires two axes that are perpendicular and equal in length. The following illustration shows a coordinate space.

坐标空間是基于笛卡爾坐标系統的平面空間.坐标空間提供了一套定義平面空間中每一個點位置的方法.這種定義平面空間的方法要求兩個坐标軸互相垂直,并且兩個坐标軸的長度一緻(并不一定機關長度一緻).下面的圖示展示了坐标空間的一個類型.

illustration of a coordinate space, showing the origin, both axes, and the max and min values of each axis.

下圖坐标空間圖示,标注了原點((0,0)點),兩個坐标軸:X軸,Y軸.由于X-Y軸的最大值和最小值都一樣,是以兩個坐标軸的長度都是一樣的.

空間坐标轉換

四種空間類型

The system supports four coordinate spaces, as described in the following table.

(這句話和上圖沒有關系——譯者注)坐标空間(WINDOWS使用笛卡爾坐标系自定義的一種幾何空間)有四種類型,四種符合笛卡爾坐标系的坐标空間在下表一一例舉.

Coordinate space Description 中文解釋
world Used optionally as the starting coordinate space for graphics transformations. It allows scaling, translation, rotation, shearing, and reflection. World space measures 2^32 units high by 2^32 units wide. 可以任意選擇圖形轉換的坐标空間起始點世界坐标可以放大縮小(比如:坐标機關長度),轉換(比如:從X-Y坐标轉換成極坐标),旋轉(這種形式比較少見,比如把X-Y軸順時針旋轉π/6),剪切(比如:隻留X-Y坐标的第一象限),求逆(把X-Y坐标軸方向改變,WIN32中就有相應的API).世界(坐标)空間(是對現實世界的反映),無論橫坐标還是縱坐标,(坐标)空間可細分或放大2^32 倍機關長度.
page page Used either as the next space after world space or as the starting space for graphics transformations. It sets the mapping mode. Page space also measures 2^32 units high by 2^32 units wide. 頁面坐标空間可以看成一個後繼的世界坐标空間(頁面坐标空間個數與世界坐标空間個為數一比一)也可以看作世界坐标空間經過圖形變幻(圖形變幻是指分割,縮放,轉換,旋轉,剪切,求逆等操作将頁面坐标空間個數與世界坐标空間個數比不為一比一).世界坐标空間分與頁面坐标空間使用映射模式轉換.頁面(坐标)空間(是對媒體容量的考查),無論橫坐标還是縱坐标,(坐标)空間可細分或放大232 倍機關長度(媒體也是現實世界的一部分).
device Used as the next space after page space. It only allows translation, which ensures the origin of the device space maps to the proper location in physical device space. Device space measures 2^27 units high by 2^27 units wide. 裝置坐标空間(頁面空間在顯示卡中邏輯存儲格式)基于頁面坐标空間。裝置坐标空間隻允許轉換.頁面坐标空間到裝置坐标空間的轉換需要衡量裝置載荷容量(顯存大小)以對應合适的實體裝置空間.
physical device The final (output) space for graphics transformations. It usually refers to the client area of the application window; however, it can also include the entire desktop, a complete window (including the frame, title bar, and menu bar), or a page of printer or plotter paper, depending on the function that obtained the handle to the device context. Physical device dimensions vary according to the dimensions set by the display, printer, or plotter technology. 實體裝置坐标空間.圖形轉換最終結果所在的坐标空間(進行計算機程式設計的坐标空間).實體裝置坐标空間通常應用于視窗應用程式的客戶區(客戶區一般不包括标題欄,也不包括上、下、左、右四個頁邊空白).實體裝置坐标空間也可将範圍擴大緻整個桌面(視窗),整個視窗視窗(包括圖畫架構,标題欄,菜單欄)(一般來說應用程式的圖畫架構包括客戶區和上,下,左,右四個頁邊空白.應用程式的标題欄在應用程式架構之上,應用程式的菜單欄在标題欄之下,應用程式架構之上.而視窗視窗(僅包框桌面視窗和桌面視窗下面的菜單欄).實體裝置坐标空間也适用于列印機和掃描器.隻要适用于實體裝置坐标空間的視窗在(程式設計時)都依賴裝置上下文的句柄.諸如顯示器,列印機,掃描器等電子儀器等實體裝置的機關範圍改變依據已經設定機關範圍.

生詞表

序号 單詞 音标 詞性 中文解釋
1. coordinate adj. [數]坐标
2. planar [ˈpleɪnər] adj. 平面的;
3. a means of phr. 一種手段
4. plane n. 平面
5. axis n. 将圖平面一分為二的線,軸,數軸,坐标軸
6. perpendicular adj. 垂直的; 成直角的; 垂直式的
7. shear [ʃɪər] vi. 剪切,修剪,穿越
8. either as … or phr. 可以當作……也可以當作
9. origin n. 起源,源頭.引申為二進制存儲的偏移起始位
10. plotter [ˈplɒtər] n. (計算機)繪圖儀,描繪器,陰謀家; 秘密策劃者
11. vary v. (大小、形狀等)相異,不同,改變,變更

參考

  1. 百度翻譯
  2. 360翻譯
  3. iCIBA詞霸

繼續閱讀