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

计算机图形学图形旋转

计算机图形学| 翻译 (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 + Tx
y1 = 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'

Translations

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

计算机图形学图形旋转

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543903.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AP 1532E register   Cisco 2504 AP注册WLC

客户的环境是:WLC是 2504 的AP的型号是 1532E的首先要是版本匹配,那么我们就要查一个兼容性列表,请看附件同时,我们要把WLC的版本升级到AIR-CT2500-K9-8-1-111-0.aes 这个版本;同时由于瘦AP 1532E的版本是 Cisco IOS S…

C#中IDisposable 回收非托管资源

C#中IDisposable 更多2014/9/7 来源:C#学习浏览量:4185学习标签: IDisposable本文导读:C#中IDisposable接口的主要用途是释放非托管资源。当不再使用托管对象时,垃圾回收器会自动释放分配给该对象的内存。但无法预测进…

css导航栏_使用CSS的导航栏

css导航栏CSS | 导航栏 (CSS | Navigation Bar) Developing websites is great but developing a user-friendly website is even greater. So how does one design a user-friendly website? What tools to use? Well, there are many tools to mention which are quite hel…

Java代理系列-静态代理

2019独角兽企业重金招聘Python工程师标准>>> 代理模式可以做很多事,像hibernate,spring都使用了代理模式。 spring的aop就是用代理做的。 本系列分为4章,静态代理,动态代理热身,动态代理,cglib代…

ajax的模式_AJAX的完整形式是什么?

ajax的模式AJAX:异步JavaScript和XML (AJAX: Asynchronous JavaScript and XML) AJAX is an abbreviation of Asynchronous JavaScript and XML. It is an organized collection of technologies and not of a single technology. Informing a collection of web De…

JAVA Opencv在图片上添加中文

问题描述: 将图片进行均值、中值、高斯滤波,高斯边缘检测,并在图片上添加中文文字。 一、算法思想 首先经过opencv的一系列操作,例如高斯模糊、均值模糊等操作后、用Imgcodecs.imwrite方法将图片写出到指定的位置。再利用java…

双向tvs和单向tvs_TVS的完整形式是什么?

双向tvs和单向tvsTVS:Thirukkurungudi Vengaram Sundram (TVS: Thirukkurungudi Vengaram Sundram) TVS is an abbreviation of Thirukkurungudi Vengaram Sundram. It is a multinational motorcycle business corporation, which is one of the largest manufactu…

引用头文件报错 .pch引用不了其他的.h文件

2019独角兽企业重金招聘Python工程师标准>>> 一、编绎显示Unknown type name “CGFloat” 错误解决方法 将Compile Sources As 改为 Objective-C 二、如果是extern const引起的。直接加头文件 #import <UIKit/UIKit.h> 最后在 .h文件 #import <UIKit/UIK…

ibm mq的交互命令模式_IBM的完整形式是什么?

ibm mq的交互命令模式IBM&#xff1a;国际商业机器 (IBM: International Business Machines) IBM is an abbreviation of International Business Machines. It is an I.T based multinational and consulting corporation which is also an American trusted brand in the IT …

r软件说明lib文件未指明_软件说明文件

r软件说明lib文件未指明The software primarily consists of Computer Programs and the associated documentation. We all know that the computer program is the baseline of the entire software, but the documentation part is also as important as the programming pa…

dfa与ndfa_DFA和NDFA之间的区别| 目录

dfa与ndfaDFA stands for Deterministic Finite Automata and NDFA stands for Non-Deterministic Finite Automata. DFA代表确定性有限自动机&#xff0c;而NDFA代表非确定性有限自动机。 Read more: Deterministic Finite Automata (DFA) 阅读更多&#xff1a; 确定性有限自…

css圆角三角形3个圆角_CSS中的圆角

css圆角三角形3个圆角CSS | 圆角 (CSS | Rounded Corners) border-radius property is commonly used to convert box elements into circles. We can convert box elements into the circle element by setting the border-radius to half of the length of a square element.…

iti axi dsp_ITI的完整形式是什么?

iti axi dspITI&#xff1a;工业培训学院 (ITI: Industrial Training Institute) ITI is an abbreviation of the Industrial Training Institute. It offers training in engineering and non-engineering technical fields. It is a post-secondary school in India which is…

appweb ejs_具有快速路线的EJS

appweb ejsHI! Welcome to NODE AND EJS TEMPLATE ENGINE SERIES. Today, we will see how we can work with EJS and routes? 嗨&#xff01; 欢迎使用NODE和EJS模板引擎系列 。 今天&#xff0c;我们将看到如何使用EJS和路由&#xff1f; A route is like a sub domain wit…

ups一直响是什么原因_UPS的完整形式是什么?

ups一直响是什么原因UPS&#xff1a;不间断电源 (UPS: Uninterruptible Power Supply) UPS is an abbreviation of Uninterruptible Power Supply. It operates with the support of a battery which is used to supply power in the lack of most important source or when th…

语音asr是什么意思_ASR的完整形式是什么?

语音asr是什么意思ASR&#xff1a;自动语音识别 (ASR: Automated Speech Recognition) ASR stands for Automated Speech Recognition. With the help of this technology, spoken words can be easily converted to written text. What actually it does? It gives access to…

数据库缓冲池_块缓冲| 数据库管理系统

数据库缓冲池When several blocks need to be transferred from disk to main memory and all the block addresses are known, several buffers can be reserved in main memory to speed up the transfer. 当需要将几个块从磁盘传输到主存储器并且所有块地址已知时&#xff0…

递归如何书写?

目录 第一步&#xff1a;首先你分析问题&#xff0c;要有递归的思路&#xff0c;知道要递归什么来解决问题。 第二步&#xff1a;先按照思路&#xff08;第一层&#xff09;写出函数的定义与函数体 第三步&#xff1a;根据函数的定义与函数体进一步确定需要的参数 第四步&a…

python 散点图 分类_Python | 分类图

python 散点图 分类Visualizing different variables is also a part of basic plotting. Such variables can have different classes, for example, numerical or a category. Matplotlib has an important feature of Categorical Plotting. We can plot multiple categoric…

二叉树祖先节点_二叉树的祖先

二叉树祖先节点Problem statement: 问题陈述&#xff1a; Given a Binary Tree and a target key, write a function that prints all the ancestors of the key in the given binary tree. 给定二叉树和目标键&#xff0c;编写一个函数&#xff0c;以打印给定二叉树中键的所有…