日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

计算机图形学图形旋转_计算机图形学翻译

發布時間:2025/3/11 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 计算机图形学图形旋转_计算机图形学翻译 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

計算機圖形學圖形旋轉

計算機圖形學| 翻譯 (Computer Graphics | Translations)

Transformation techniques mean to modify the current shape or object in a particular manner. Changing of an object after creation, in terms of position or even size is known as translation. Here, we will be studying about how 2D translation is performed in computer graphics.

轉換技術意味著以特定方式修改當前形狀或對象。 創建后根據位置甚至大小更改對象的過程稱為平移。 在這里,我們將研究如何在計算機圖形學中執行2D翻譯。

2D翻譯 (2D Translation)

The translation is the movement in a straight line of an object from one position to another.

平移是對象從一個位置到另一位置沿直線的移動。

The movement of objects without deforming the shape of the object is Translation. Here the object is shifted from one position to another position and from one co-ordinate location to another.

在不變形對象形狀的情況下移動對象就是平移。 在這里,對象從一個位置移動到另一位置,并從一個坐標位置移動到另一位置。

The translating polygon i.e. all vertex of the polygon is converted to a new position. Similarly, curved objects are translated. To change the position of the circle or ellipse its center coordinates are transformed, then the object is drawn using the new co-ordinates.

平移多邊形(即多邊形的所有頂點)將轉換到新位置。 同樣,彎曲的對象也可以平移。 要更改圓形或橢圓形的位置,請變換其中心坐標,然后使用新的坐標繪制對象。

Translation of point:

點的翻譯:

To translate a point from coordinate position (x, y) to another (x, y), we add algebraically the translation distances Tx & Ty to the original co-ordinates.

為了將一個點從坐標位置(x,y)轉換到另一個(x,y) ,我們將代數轉換距離TxTy代入原始坐標。

Translation equation:

翻譯等式:

x1 = x + Txy1 = y + Ty (The translation pair (Tx, Ty) is called as shift vector)

Example:

例:

In the following image you can see that after applying translation, point C gets shifted to C'.

在下圖中,您可以看到在應用平移之后,點C移至C'

Example:

例:

Given a square with coordinate points A (0, 3), B (3, 3), C (3, 0), D (0, 0). Apply the translation with distance 1 towards X axis and 1 towards Y axis. We have to find the new co-ordinates of the square.

給定一個具有坐標點A(0,3),B(3,3),C(3,0),D(0,0)的正方形。 將平移應用到X軸,距離1到Y軸。 我們必須找到正方形的新坐標。

Solution:? Given-

解決方案:給定-

Old co-ordinates of the square = A (0, 3), B (3, 3), C (3, 0), D (0, 0)

正方形的舊坐標= A(0,3),B(3,3),C(3,0),D(0,0)

Translation vector = (Tx, Ty) = (1, 1)

翻譯向量=(Tx,Ty)=(1,1)

對于坐標A(0,3) (For Coordinates A (0, 3))

?Let the new coordinates of corner A = (Xnew, Ynew).

設角A的新坐標=(X new ,Y new )。

Applying the translation equations, we have-

應用平移方程式,我們有-

  • Xnew= Xold?+ Tx?= 0 + 1 = 1

    X = X + T x = 0 + 1 = 1

  • Ynew= Yold?+ Ty?= 3 + 1 = 4

    Y = Y + T y = 3 +1 = 4

Thus, New coordinates of corner A = (1, 4).

因此,角A的新坐標=(1,4)。

For Coordinates B (3, 3)

對于坐標B(3,3)

Let the new coordinates of corner B = (Xnew, Ynew).

令角B的新坐標=(X new ,Y new )。

Applying the translation equations, we have-

應用平移方程式,我們有-

  • Xnew= Xold?+ Tx?= 3 + 1 = 4

    X = X + T x = 3 +1 = 4

  • Ynew= Yold?+ Ty?= 3 + 1 = 4

    Y = Y + T y = 3 +1 = 4

Thus, New coordinates of corner B = (4, 4).

因此,角B的新坐標=(4,4)。

For Coordinates C (3, 0)

對于坐標C(3,0)

Let the new coordinates of corner C = (Xnew, Ynew).

令角的新坐標C =(X new ,Y new )。

Applying the translation equations, we have-

應用平移方程式,我們有-

  • Xnew= Xold?+ Tx?= 3 + 1 = 4

    X = X + T x = 3 +1 = 4

  • Ynew= Yold?+ Ty?= 0 + 1 = 1

    Y = Y + T y = 0 + 1 = 1

Thus, New coordinates of corner C = (4, 1).

因此,角C的新坐標=(4,1)。

For Coordinates D (0, 0)

對于坐標D(0,0)

Let the new coordinates of corner D = (Xnew, Ynew).

令角的新坐標D =(X new ,Y new )。

Applying the translation equations, we have-

應用平移方程式,我們有-

  • Xnew= Xold?+ Tx?= 0 + 1 = 1

    X = X + T x = 0 + 1 = 1

  • Ynew= Yold?+ Ty?= 0 + 1 = 1

    Y = Y + T y = 0 + 1 = 1

Thus, New coordinates of corner D = (1, 1).

因此,角D的新坐標=(1,1)。

翻譯自: https://www.includehelp.com/computer-graphics/translations.aspx

計算機圖形學圖形旋轉

總結

以上是生活随笔為你收集整理的计算机图形学图形旋转_计算机图形学翻译的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。