坐标转换 计算机图形学

什么是转型? (What is Transformation?)

Transformation refers to the mathematical operations or rules that are applied on a graphical image consisting of the number of lines, circles, and ellipses to change its size, shape, or orientation. It can also reposition the image on the screen.

转换是指应用于图形图像的数学运算或规则,这些图形由线,圆和椭圆的数量组成,以更改其大小,形状或方向。 它还可以将图像重新放置在屏幕上。

Transformations play a very crucial role in computer graphics.

转换在计算机图形学中起着至关重要的作用。

转换类型 (Types of Transformations)

There are various types of transformations in computer graphics through which an image can be processed, edited ad altered. Some basic and most commonly used types of these transformations are:

计算机图形学中有各种类型的转换,可以通过这些转换来处理图像,编辑和更改图像。 这些转换的一些基本且最常用的类型是:

  1. Translation

    翻译

  2. Rotation

    回转

  3. Scaling

    缩放比例

  4. Reflection

    反射

  5. Shearing

    剪力

翻译 (Translation)

Translation refers to a technique in which a point is shift from one place to another, whose distance is known.

翻译是指一种技术,在该技术中,一个点从一个位置移动到另一个位置,该位置的距离是已知的。

Consider a point A(x1, y1) be shifted to another point B (x2, y2). Now we only know the shifting distance tx along x-axis and ty along y-axis.

考虑将点A(x 1 ,y 1 )移到另一个点B(x 2 ,y 2 )。 现在我们只知道沿x轴和叔ÿ沿y轴的换档距离t X。

Now, the new coordinates (x2, y2) can be calculated as:

现在,新的坐标(x 2 ,y 2 )可以计算为:

x2 = x1 + tx

x 2 = x 1 + t x

y2 = y1 + ty

y 2 = y 1 + t y

For example:

例如:

Suppose we want to shift a point with coordinates at A(30,100) and distance along x-axis is 10 units and 20 units along y-axis.

假设我们要移动一个坐标为A(30,100)的点,并且沿x轴的距离为10个单位,沿y轴的距离为20个单位。

Using translation:

使用翻译:

Here tx = 10 ;

这里t x = 10;

and ty = 20

y = 20

New coordinates A (x2, y2):

新坐标A ' (x 2 ,y 2 ):

x2 = 30 + 10 = 130

x 2 = 30 + 10 = 130

y2 = 100 + 20 = 120

y 2 = 100 + 20 = 120

The point will be shifted to A (130, 120 ).

该点将移至A ' (130,120)。

回转 (Rotation)

Rotation refers to mathematical operation in which the graphical object is rotated about an angle (θ) to the axis.

旋转是指数学操作,其中图形对象相对于轴旋转角度(θ)。

Rotation is of two types: anti-clockwise and clockwise rotation.

旋转有两种类型:逆时针旋转和顺时针旋转。

Suppose we want to rotate a point with coordinates A (x1, y1) clockwise through an angle θ about the origin

假设我们要绕着原点将坐标A(x 1 ,y 1 )的点顺时针旋转角度θ

Then the new coordinates A (x2, y2):

然后,新坐标A ' (x 2 ,y 2 ):

x2 = x1 cosθ + y1 sinθ

×2 = X 1 +COSθY 1SINθ

y2 = x1 sinθ - y1 cosθ

Y 2 = X 1SINθ - Y 1个 COSθ

缩放比例 (Scaling)

Scaling refers to a mathematical rule applied to change the size of the image.

缩放是指用于更改图像大小的数学规则。

If the value of scaling factors is negative, the size is decreased and when the value is positive, the size of the image is increased.

如果缩放因子的值为负,则减小大小,而当值为正时,增大图像的大小。

Suppose the point with coordinates A (x1, y1) is to be scaled by a factor sx along the x-axis and sy along the y-axis.

假设坐标为A(x 1, y 1 )的沿x轴缩放系数s x,沿y轴缩放y。

Hence the new coordinates after scaling will be:

因此,缩放后的新坐标将为:

x2 = x1 x sx

x 2 = x 1 xs x

y2 = y1 x sy

y 2 = y 1 xs y

Translation, rotation and scaling are termed as basic translations.

平移,旋转和缩放称为基本平移。

其他转变 (Other Transformations)

The other two transformation techniques are as follows,

其他两种转换技术如下:

反射 (Reflection)

Reflection refers to the mirror image of the original graphical object. It is an 180o rotation operation.

反射是指原始图形对象的镜像。 这是一个180 o的旋转操作。

Reflection can be done about following ways:

可以通过以下方式进行反思:

  • x-axis

    X轴

  • y-axis

    y轴

  • the origin and

    起源和

  • A plane perpendicular to the origin

    垂直于原点的平面

剪力 (Shearing)

Shearing is a transformation in which the shape of the object is slanted about the axis.

剪切是一种变换,其中对象的形状围绕轴倾斜。

In y-shearing:

在y剪切中:

The new-coordinates will be:

新的坐标将是:

x' = x

X' = x

y' = y + sy x

' = y + s y x

In x-shearing:

在x剪切中:

The new-coordinates will be:

新的坐标将是:

x' = x + sx y

x ' = x + s x y

y' = y

y'= y

翻译自: https://www.includehelp.com/computer-graphics/types-of-transformations.aspx

坐标转换 计算机图形学

坐标转换 计算机图形学_计算机图形学的转换类型相关推荐

  1. 计算机软件统考,计算机统考_计算机与软件_考研论坛(kaoyan.com)

    一.选择题((1)-(30)每小题1分,(31)-(55)每小题2分,共80分) 下列各题 A) .B).C).D)四个选项中,只有一个选项是正确的,请将正确选项涂写在答题 卡相应位置上,答在试卷上不 ...

  2. 新疆银行招聘计算机,新疆2017年银行招聘考试计算机学_计算机基础试题(19页)-原创力文档...

    .专业 .专注 . 新疆 2017 年银行招聘考试计算机学 :计算机基础试题 本卷共分为 1 大题 50 小题 ,作答时间为 180 分钟 ,总分 100 分 , 60 分及格 . 一 . 单项选择题 ...

  3. mysql 工具图形学_[计算机图形学]贝塞尔曲线

    一. 贝塞尔曲线 简介摘抄自某度百科: 贝塞尔曲线(Bézier curve),又称贝兹曲线或贝济埃曲线,是应用于二维图形应用程序的数学曲线. 一般的矢量图形软件通过它来精确画出曲线,贝兹曲线由线段与 ...

  4. python计算机图形学_计算机图形学—— 隐藏线和隐藏面的消除(消隐算法)

    一.概述 由于投影变换失去了深度信息,往往导致图形的二义性.要消除二义性,就必须在绘制时消除被遮挡的不可见的线或面,习惯上称作消除隐藏线和隐藏面(或可见线判定.可见面判定),或简称为消隐.经过消隐得到 ...

  5. 计算机操作系统_计算机理论(操作系统概念及常见操作系统类型)

    操作系统,对于我们来说是一个经常会听到的名词,如我们日常使用的Window系统等.但是,对于操作系统的概念,大部分人都是一知半解的.本节我们主要简单介绍下操作系统的定义,以及常见的操作系统的类型. 现 ...

  6. 禁止更改计算机名_计算机改名、加域脚本集合

    windows计算机改名.改密码.设置ip.加域脚本集合 今天和大家分享一下,如何将前面的改名加域整合在一起,根据选择执行对应的命令. 新建txt文档,输入一下代码,另存为"自动加域脚本.b ...

  7. 大一计算机论文_计算机二级基础,60集全套视频教程+500习题,送给你参考下

    计算机二级考试检测的不仅是我们的智力,更重要的是判断力.专注力.控制力与承受力.大一就要尽力将计算机二级一次性通过,这样后面的路会更平坦.虽然青春不只路一条,是不急于见分晓,但是,走在前面的吃苦,走在 ...

  8. 计算机体系结构_计算机体系结构知识笔记

    计算机体系结构结构:计算机的概念结构.功能和性能特性,它从一个更高的层次对计算机的结构特征等宏观特征进行研究. 1.计算机体系结构分类 2.CISC和RISC 指令体系结构(ISA):一个处理器支持的 ...

  9. sql server management studio 修改计算机名_计算机毕业设计之SpringBoot+ES搜房网

    一.核心技术 1.ElasticSearch+MySQL+Kafka实现站内搜索引擎 2.ElasticSearch+百度地图实现地图找房功能 3.基础核心框架=SpringBoot 4.数据库的常青 ...

最新文章

  1. 【异步爬虫】【aiohttp】不需要手动指定aiohttp中的encoding编码
  2. 树莓派安装screen保证SSH断开 任务不中断
  3. 网页客服机器人_易聊AI客服机器人强大线索获取能力助力企业稳操胜券
  4. Jzoj4891 摆书
  5. lynda ux_如何建立内部UX团队
  6. 牛客14350 苦逼的单身狗
  7. (作者:无名`)svn提交代码到本地仓库
  8. VC下使用Proc连接Oracle数据库
  9. 菜鸟学IT之python3关于列表,元组,字典,集合浅认识!
  10. java给文件添加水印_Java在PDF中添加水印(文本/图片水印)
  11. esxi时区设置 +8_ESXI安装OpenWRT amp; LEDE软路由部署指南(附镜像下载)
  12. 【尚锐科技课堂】安全健康位置云平台系统
  13. 我们真的搞懂这些排序算法了吗?(一)
  14. 骑士人才系统替换短信接口
  15. 浅谈敏捷思想-06.精益创业
  16. 概率统计14——几何分布
  17. 数据集:Udacity Self-Driving 目标检测数据集
  18. 一个小Demo带你理解安卓事件分发
  19. unity 打砖块—休闲小游戏,摸鱼必备(完整代码)
  20. 如何对测试团队进行管理?我从5个方面总结了一下

热门文章

  1. python中升级pip报错_linux系统下pip升级报错的解决方法
  2. spark-sql建表语句限制_第三篇|Spark SQL编程指南
  3. 学水利的想转行计算机,为什么说千万别学水利水电工程?附水利八大院排名2020年(最新)...
  4. C# 查询一张表的数据用于补充另外一张表的数据 MySQL数据库
  5. JDBC【介绍JDBC、使用JDBC连接数据库、简单的工具类】
  6. 如何使用github搭建个人博客
  7. 提高CSS文件可维护性的五种方法
  8. 页面刷新 vuex 数据重新被初始化
  9. 使用JS实现文字搬运工
  10. 织梦dede 5.7系统基本参数无法修改保存,提示Token mismatch!