`
bulote
  • 浏览: 1353952 次
文章分类
社区版块
存档分类
最新评论

优秀课件笔记之Geometric Transformations

 
阅读更多

1、本文所以内容来自 著名高校课件和学生笔记(校园里面经常见到有人高价买笔记)
2、任课教师不会提供参考文献,所以只能对作者表示感谢,如果引用了您的作品,可以用回复方式补充参考文献。
3、我不对文章无关问题进行解答,文章内容也比较难,我也很难解答您遇到的问题,如果发现BUG可以用回复方式帮我修正。
4、本课 属于Computer Graphics
,适用于计算机图形学课程,教材为电子工业出版社Computer Graphics(计算机图形学,中文版和英文版)
本课其他部分的导航条见页面底部

Chapter 5 Geometric Transformations

§5.2 Matrix Representations(矩阵表示) and Homogeneous Coordinates(齐次坐标)

2D translation(平移)
2D rotation(旋转)
2D scaling(缩放)
Each basic transformation can be expressed in the matrix form:
Homogeneous Coordinates(齐次坐标)

If we expand the presentation to 3×3 matrices, geometry transformations can be combined in a single matrix.
We expand each 2D coordinate-position representation to a 3D representation
§5.4 2D Composite(复合) Transformations

Using matrix representations, we can set up a sequence of transformations as a composite transformation matrix (复合变换矩阵).

General 2D Pivot-Point(旋转点) Rotation

When a graphics package provides only a rotation function with respect to the coordinate origin, we can generate a 2D rotation about any pivot point by the following operators:
Translate the object so that the pivot point moves to the coordinate origin;
Rotate the object about the coordinate origin;
Translate the object so that the pivot point is returned to the original position.
General 2D Fixed-Point(基准点) Scaling

To generate a 2D scaling about any fixed point
by the following operators:
Translate the object so that the fixed point moves to the coordinate origin;
Scale the object about the coordinate origin;
Translate the object so that the pivot point is returned to the original position.
§5.6 Raster Operations for Geometry TransformMoving a block of pixels from a position to another position is called block transfer(块移动) .
ation

Raster Operations for Rotations with Any Angle

When the rotation angle is NOT the multiple of 90°, we map the destiny pixel to the rotated block.
In overlapped area, we use Interpolation(插值) and Anti-aliasing (反走样) technologies.
Raster Operations for Scale

In scale transformation, we map the destiny pixel to the rotated block.
In overlapped area, we use Interpolation(插值) and Anti-aliasing (反走样) technologies.
§5.9 3D Geometry Transformations

Methods for 3D geometry transformations are extended form 2D methods by including z coordinate.
General 3D Rotation

When the rotation axis is parallel to one of the coordinate axes,
We use Translation-Rotation-Translation composite transformation.
§5.16 Affine Transformations(仿射变换)

An affine transformation is a linear transformation.
Translation, rotation, scaling, reflection, and shear are examples of affine transformations.
Any affine transformation can be expressed as linear composites of the above transformations.
§5.17 OpenGL Geometry Transformation Functions

In the core library of OpenGL, a separate function is available for each of basic transformations.
All transformation are specified in 3D dimensions.
To construct a translation matrix:
glTranslate* (tx, ty, tz); // * can be f(float) or d(double)
Eg. glTranslatef (10.0, 20.0, 30.0);
glTranslated (10.0, 20.0, 30.0);
To construct a rotation matrix:
glRotate* (theta, vx, vy, vz); // theta means the rotate angle, (vx,vy,vz) determines the rotate axis.
Eg. glRotatef (90.0, 0.0, 0.0, 1.0);
glRatatef (180.0, 0.0, 1.0, 0.0);
To construct a Scaling matrix:
glScale* (sx, sy, sz); // scaling factors can NOT be zero
Eg. glRotatef (2.0, 1.0, 1.0);
When a scaling factor is negative(负的), the scaling matrix can also generate reflections.
Eg. glScalef (2.0, 1.0, -1.0);
// scale by a factor of 2 in the X direction,
// and reflect about the XY Plane.

OpenGL Matrix Operations —— to Set the Matrix Mode

To set the model view (建模观察) matrix mode:
glMatrixMode ( GL_MODEVIEW );
This routine designates a 4×4 modeview matrix as the current matrix .
When in MODEVIEW mode, a call to a transformation routines generate a matrix that is multiplied by the current matrix .

OpenGL Matrix Operations —— to Assign the Current Matrix

Assign the identity matrix (单位矩阵) to the current matrix:
glLoadIdentity ( );
Assign other values to the current matrix:
float array[16]= { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } ;
glLoadMatrixf ( array );
Note: the elements of array are arranged in column-major order
Concatenate a specified Matrix with the Current Matrix

Assign a matrix : (the elements of array are arranged in column-major order)
float array[16]= { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } ;
The current matrix is post-multiplied(右乘) by array:
glMultMatrixf ( array );
OpenGL Matrix Stacks

For each of the four matrix modes, OpenGL maintains a matrix stack.
At any time, the top matrix on each stack is called the “current matrix”.
glPushMatrix ( ); // copy the current matrix and
// store that copy in the second stack position
glPopMatrix ( ); // destroy the matrix at the top,
// and the second become the current matrix


分享到:
评论

相关推荐

    GeometricTools头文件和库文件

    已经编译好的GeometricTools(https://www.geometrictools.com/)的库文件和头文件,使用方法参考:https://blog.csdn.net/u011091739/article/details/80817293

    torch-geometric 1.6.1依赖库

    torch-geometric 1.6.1在安装使用过程中,必要的四个安装包,torch-cluster、pytorch-scatter、torch-sparse、pytorch-spline-conv,均为whl文件。

    Geometric Algebra Applications Vol. I

    Geometric Algebra Applications Vol. I: Computer Vision, Graphics and Neurocomputing By 作者: Eduardo Bayro-Corrochano ISBN-10 书号: 3319748289 ISBN-13 书号: 9783319748283 Edition 版本: 1st ed. 2019 ...

    Geometric Algebra Applications Vol. I: Computer Vision, Graphics and Neurocomput

    The goal of the Volume I Geometric Algebra for Computer Vision, Graphics and Neural Computing is to present a unified mathematical treatment of diverse problems in the general domain of artificial ...

    torch-geometric==1.7.2安装

    torch_spline_conv-1.2.1-cp38-cp38-linux_x86_64.whl torch_sparse-0.6.9-cp38-cp38-linux_x86_64.whl torch_scatter-2.0.7-cp38-cp38-linux_x86_64.whl ...然后pip install torch-geometric==1.7.2

    Active geometric shape model

    The active geometric shape model: A new robust deformable shape model and its applications ,原文及matlab代码实现

    torch-geometric几个工具包(本人使用)追光者.zip

    **深度学习工具包 Torch-Geometric详解** Torch-Geometric 是一个基于 PyTorch 的库,专门用于处理图数据的深度学习任务。这个库在图神经网络(GNNs)的研究和应用中扮演着重要角色,使得研究人员和开发者能够轻松...

    Advances in Geometric Modeling.djvu

    Geometric Modeling (GM) plays a significant role in the construction, design and manufacture of various objects. In addition to its critical importance in the traditional fields of automo- bile and ...

    Geometric Tools for Computer Graphics

    **标题**:"Geometric Tools for Computer Graphics"(计算机图形学中的几何工具)。 **描述**:"Geometric Tools for Computer Graphics"(计算机图形学中的几何工具)。 标题和描述都明确指出本书的主题是围绕...

    Subdivision Methods for Geometric Design

    当用NURBS做造型的时候,曲面拼接是复杂的问题,在动画的时候,可能产生撕裂或者褶皱,Subdivision Surface用来...Joe Warren的Subdivision Methods for Geometric Design: A Constructive Approach就是这方面的专著

    torch_geometric 加torch 包

    标题 "torch_geometric 加torch 包" 涉及到的是使用Python中的两个重要库:torch和torch_geometric。这两个库在机器学习,尤其是图神经网络(Graph Neural Networks, GNNs)领域有着广泛的应用。 **torch** 是一个...

    Riemannian Geometry and Geometric Analysis

    该书由著名数学家Jürgen Jost撰写,是Riemannian Geometry and Geometric Analysis领域的权威参考书之一。本书作为第四版,包含了对这一领域的最新进展,并提供了深入浅出的讲解。 #### 书籍基本信息 - **作者**...

    Convoletr_imageprocessing_building_

    Convolution neural networks are inherentlylimited to model geometric transformations due to thefixed geometric structures in their building modules.

    Geometric Modeling in Shape Space【pdf】

    ### Geometric Modeling in Shape Space: An In-depth Overview The paper "Geometric Modeling in Shape Space" is a significant contribution to the field of computer graphics and geometric modeling. ...

    OpenCV With Python by Example

    Build real-world computer vision applications and develop cool demos using OpenCV for Python, About This Book, Learn how to apply complex visual effects to images using geometric transformations and ...

    OpenCV with Python By Example 独家书签修正版 无水印pdf 0分

    Learn how to apply complex visual effects to images using geometric transformations and image filters Extract features from an image and use them to develop advanced applications Build algorithms ...

    Geometric Algebra Applications Computer Vision, Graphics and Neurocomputing

    Geometric Algebra Applications Vol. I: Computer Vision, Graphics and Neurocomputing pdf The goal of the Volume I Geometric Algebra for Computer Vision, Graphics and Neural Computing is to present a ...

    Geometry of transformations

    linear transformation: geometry of transformation.

    Geometric modeling by Mortenson

    国外关于CAD方面最经典的著作。有点贵哦。都出书到第N版本了

Global site tag (gtag.js) - Google Analytics