This document discusses various 2D transformations including translation, rotation, scaling, shearing, and their implementations using transformation matrices. Translation moves an object along a straight line and can be represented by a 3x3 matrix. Rotation rotates an object around a center point, with the standard rotation matrix rotating around the origin. Scaling changes the size of an object, which can cause undesirable movement. Shearing skews an object along an axis. The document also covers composing multiple transformations using matrix multiplication and how OpenGL applies transformations through a global model-view matrix.
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
Transformation:
Transformations are a fundamental part of the computer graphics. Transformations are the movement of the object in Cartesian plane.
Types of transformation
Why we use transformation
3D Transformation
3D Translation
3D Rotation
3D Scaling
3D Reflection
3D Shearing
presentation By Daroko blog-where IT learners Apply skills.
This topic an presentation will introduce you to Computer graphics hardware types.
---------------------------------
• Daroko blog (www.professionalbloggertricks.com)
• Presentation by Daroko blog, to see More tutorials more than this one here, Daroko blog has all tutorials related with IT course, simply visit the site by simply Entering the phrase Daroko blog (www.professionalbloggertricks.com) to search engines such as Google or yahoo!, learn some Blogging, affiliate marketing ,and ways of making Money with the computer graphic Applications(it is useless to learn all these tutorials when you can apply them as a student you know),also learn where you can apply all IT skills in a real Business Environment after learning Graphics another computer realate courses.ly
• Be practically real, not just academic reader
Do Not just learn computer graphics an close your computer tab and go away..
APPLY them in real business,
Visit Daroko blog for real IT skills applications,androind, Computer graphics,Networking,Programming,IT jobs Types, IT news and applications,blogging,Builing a website, IT companies and how you can form yours, Technology news and very many More IT related subject.
-simply google:Daroko blog(professionalbloggertricks.com)
Computer graphics - bresenham line drawing algorithmRuchi Maurya
You know that DDA algorithm is an incremental scan conversion method which performs calculations at each step using the results from the preceding step. Here we are going to discover an accurate and efficient raster line generating algorithm, the Bresenham's line-drawing algorithm.
This algorithm was developed by Jack E. Bresenham in 1962 at IBM.
The function given below handles all lines and implements the complete Bresenham's algorithm.
function line(x0, x1, y0, y1)
boolean steep := abs(y1 - y0) > abs(x1 - x0)
if steep then
swap(x0, y0)
swap(x1, y1)
if x0 > x1 then
swap(x0, x1)
swap(y0, y1)
int deltax := x1 - x0
int deltay := abs(y1 - y0)
real error := 0
real deltaerr := deltay / deltax
int y := y0
if y0 < y1 then ystep := 1 else ystep := -1
for x from x0 to x1
if steep then plot(y,x) else plot(x,y)
error := error + deltaerr
if error ? 0.5
y := y + ystep
error := error - 1.0
Commonly a fixed area of the system memory is reserved for the frame buffer,
Video controller can direct access to the frame-buffer
Frame-buffer locations, and the corresponding screen positions, are referenced in Cartesian coordinates.
Some system employ lower-left corner as origin
But most common system employ upper-left corner as origin.
Scan lines are labeled from ymax, at the top of the screen to 0 at the bottom.
Along each scan line, screen pixel positions are labeled from 0 to xmax
Transformation:
Transformations are a fundamental part of the computer graphics. Transformations are the movement of the object in Cartesian plane.
Types of transformation
Why we use transformation
3D Transformation
3D Translation
3D Rotation
3D Scaling
3D Reflection
3D Shearing
presentation By Daroko blog-where IT learners Apply skills.
This topic an presentation will introduce you to Computer graphics hardware types.
---------------------------------
• Daroko blog (www.professionalbloggertricks.com)
• Presentation by Daroko blog, to see More tutorials more than this one here, Daroko blog has all tutorials related with IT course, simply visit the site by simply Entering the phrase Daroko blog (www.professionalbloggertricks.com) to search engines such as Google or yahoo!, learn some Blogging, affiliate marketing ,and ways of making Money with the computer graphic Applications(it is useless to learn all these tutorials when you can apply them as a student you know),also learn where you can apply all IT skills in a real Business Environment after learning Graphics another computer realate courses.ly
• Be practically real, not just academic reader
Do Not just learn computer graphics an close your computer tab and go away..
APPLY them in real business,
Visit Daroko blog for real IT skills applications,androind, Computer graphics,Networking,Programming,IT jobs Types, IT news and applications,blogging,Builing a website, IT companies and how you can form yours, Technology news and very many More IT related subject.
-simply google:Daroko blog(professionalbloggertricks.com)
Computer graphics - bresenham line drawing algorithmRuchi Maurya
You know that DDA algorithm is an incremental scan conversion method which performs calculations at each step using the results from the preceding step. Here we are going to discover an accurate and efficient raster line generating algorithm, the Bresenham's line-drawing algorithm.
This algorithm was developed by Jack E. Bresenham in 1962 at IBM.
The function given below handles all lines and implements the complete Bresenham's algorithm.
function line(x0, x1, y0, y1)
boolean steep := abs(y1 - y0) > abs(x1 - x0)
if steep then
swap(x0, y0)
swap(x1, y1)
if x0 > x1 then
swap(x0, x1)
swap(y0, y1)
int deltax := x1 - x0
int deltay := abs(y1 - y0)
real error := 0
real deltaerr := deltay / deltax
int y := y0
if y0 < y1 then ystep := 1 else ystep := -1
for x from x0 to x1
if steep then plot(y,x) else plot(x,y)
error := error + deltaerr
if error ? 0.5
y := y + ystep
error := error - 1.0
Commonly a fixed area of the system memory is reserved for the frame buffer,
Video controller can direct access to the frame-buffer
Frame-buffer locations, and the corresponding screen positions, are referenced in Cartesian coordinates.
Some system employ lower-left corner as origin
But most common system employ upper-left corner as origin.
Scan lines are labeled from ymax, at the top of the screen to 0 at the bottom.
Along each scan line, screen pixel positions are labeled from 0 to xmax
Notes 2D-Transformation Unit 2 Computer graphicsNANDINI SHARMA
Notes of 2D Transformation including Translation, Rotation, Scaling, Reflection, Shearing with solved problem.
Clipping algorithm like cohen-sutherland-hodgeman, midpoint-subdivision with solved problem.
How to Create 3D Mashups by Integrating GIS, CAD, and BIMSafe Software
Find out how you can easily integrate GIS, CAD, BIM, and other spatial data to create accurate 3D representations using FME. You'll discover how to manipulate 3D data across popular formats like CityGML and SketchUp, as well as transform BIM data to load only the required information into your GIS. You'll also hear how FME enabled one customer to take vintage 2D CAD data and create informative 3D PDFs and 3D AutoCAD DWG files to help in the decommissioning of a nuclear power plant
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
2. 2D Transformation
Given a 2D object, transformation is to
change the object’s
Position (translation)
Size (scaling)
Orientation (rotation)
Shapes (shear)
Apply a sequence of matrix multiplication to
the object vertices
3. Point representation
We can use a column vector (a 2x1 matrix) to
represent a 2D point x
y
A general form of linear transformation can
be written as:
x’ = ax + by + c
OR
y’ = dx + ey + f
X’ a b c x
Y’ = d e f * y
1 0 0 1 1
4. Translation
Re-position a point along a straight line
Given a point (x,y), and the translation
distance (tx,ty)
The new point: (x’, y’)
x’ = x + tx
y’ = y + ty (x,y)
(x’,y’)
OR P’ = P + T where P’ = x’ p = x T = tx
y’ y ty
tx
ty
5. 3x3 2D Translation Matrix
x’ = x + tx
y’ y ty
Use 3 x 1 vector
x’ 1 0 tx x
y’ = 0 1 ty * y
1 0 0 1 1
Note that now it becomes a matrix-vector multiplication
6. Translation
How to translate an object with multiple
vertices?
Translate individual
vertices
8. Rotation
(x,y)
(x’,y’)
q
(x,y) -> Rotate about the origin by q
(x’, y’)
How to compute (x’, y’) ?
f
x = r cos (f) y = r sin (f)
r
x’ = r cos (f + q) y = r sin (f + q)
9. Rotation
(x,y)
(x’,y’)
q
f
r
x = r cos (f) y = r sin (f)
x’ = r cos (f + q) y = r sin (f + q)
x’ = r cos (f + q)
= r cos(f) cos(q) – r sin(f) sin(q)
= x cos(q) – y sin(q)
y’ = r sin (f + q)
= r sin(f) cos(q) + r cos(f)sin(q)
= y cos(q) + x sin(q)
11. 3x3 2D Rotation Matrix
x’ cos(q) -sin(q) x
y’ sin(q) cos(q) y
=
(x,y)
(x’,y’)
q
f
r
x’ cos(q) -sin(q) 0 x
y’ sin(q) cos(q) 0 y
1 0 0 1 1
=
12. Rotation
How to rotate an object with multiple
vertices?
Rotate individual
Vertices
q
13. 2D Scaling
Scale: Alter the size of an object by a scaling factor
(Sx, Sy), i.e.
x’ = x . Sx
y’ = y . Sy
x’ Sx 0 x
y’ 0 Sy y
=
(1,1)
(2,2) Sx = 2, Sy = 2
(2,2)
(4,4)
14. 2D Scaling
(1,1)
(2,2) Sx = 2, Sy = 2
(2,2)
(4,4)
Not only the object size is changed, it also moved!!
Usually this is an undesirable effect
We will discuss later (soon) how to fix it
15. 3x3 2D Scaling Matrix
x’ Sx 0 x
y’ 0 Sy y
=
x’ Sx 0 0 x
y’ = 0 Sy 0 * y
1 0 0 1 1
16. Put it all together
Translation: x’ x tx
y’ y ty
Rotation: x’ cos(q) -sin(q) x
y’ sin(q) cos(q) y
Scaling: x’ Sx 0 x
y’ 0 Sy y
= +
= *
= *
17. Or, 3x3 Matrix representations
Translation:
Rotation:
Scaling:
Why use 3x3 matrices?
x’ 1 0 tx x
y’ = 0 1 ty * y
1 0 0 1 1
x’ cos(q) -sin(q) 0 x
y’ sin(q) cos(q) 0 * y
1 0 0 1 1
=
x’ Sx 0 0 x
y’ = 0 Sy 0 * y
1 0 0 1 1
18. Why use 3x3 matrices?
So that we can perform all transformations
using matrix/vector multiplications
This allows us to pre-multiply all the matrices
together
The point (x,y) needs to be represented as
(x,y,1) -> this is called Homogeneous
coordinates!
19. Shearing
Y coordinates are unaffected, but x cordinates
are translated linearly with y
That is:
y’ = y
x’ = x + y * h
x 1 h 0 x
y = 0 1 0 * y
1 0 0 1 1
20. Shearing in y
x 1 0 0 x
y = g 1 0 * y
1 0 0 1 1
A 2D rotation is three shears
Shearing will not change the area of the object
Any 2D shearing can be done by a rotation, followed
by a scaling, and followed by a rotation
Interesting Facts:
21. Rotation Revisit
The standard rotation matrix is used to
rotate about the origin (0,0)
cos(q) -sin(q) 0
sin(q) cos(q) 0
0 0 1
What if I want to rotate about an
arbitrary center?
22. Arbitrary Rotation Center
To rotate about an arbitrary point P (px,py)
by q:
Translate the object so that P will coincide with
the origin: T(-px, -py)
Rotate the object: R(q)
Translate the object back: T(px,py)
(px,py)
23. Arbitrary Rotation Center
Translate the object so that P will coincide with
the origin: T(-px, -py)
Rotate the object: R(q)
Translate the object back: T(px,py)
Put in matrix form: T(px,py) R(q) T(-px, -py) * P
x’ 1 0 px cos(q) -sin(q) 0 1 0 -px x
y’ = 0 1 py sin(q) cos(q) 0 0 1 -py y
1 0 0 1 0 0 1 0 0 1 1
24. Scaling Revisit
The standard scaling matrix will only
anchor at (0,0)
Sx 0 0
0 Sy 0
0 0 1
What if I want to scale about an arbitrary
pivot point?
25. Arbitrary Scaling Pivot
To scale about an arbitrary pivot point P
(px,py):
Translate the object so that P will coincide with
the origin: T(-px, -py)
Rotate the object: S(sx, sy)
Translate the object back: T(px,py)
(px,py)
26. Affine Transformation
Translation, Scaling, Rotation, Shearing are all affine
transformation
Affine transformation – transformed point P’ (x’,y’) is
a linear combination of the original point P (x,y), i.e.
x’ m11 m12 m13 x
y’ = m21 m22 m23 y
1 0 0 1 1
Any 2D affine transformation can be decomposed
into a rotation, followed by a scaling, followed by a
shearing, and followed by a translation.
Affine matrix = translation x shearing x scaling x rotation
27. Composing Transformation
Composing Transformation – the process of applying
several transformation in succession to form one
overall transformation
If we apply transform a point P using M1 matrix first,
and then transform using M2, and then M3, then we
have:
(M3 x (M2 x (M1 x P ))) = M3 x M2 x M1 x P
M
(pre-multiply)
28. Composing Transformation
Matrix multiplication is associative
M3 x M2 x M1 = (M3 x M2) x M1 = M3 x (M2 x M1)
Transformation products may not be commutative A x B != B
x A
Some cases where A x B = B x A
A B
translation translation
scaling scaling
rotation rotation
uniform scaling rotation
(sx = sy)
29. Transformation order matters!
Example: rotation and translation are not
commutative
Translate (5,0) and then Rotate 60 degree
OR
Rotate 60 degree and then translate (5,0)??
Rotate and then translate !!
30. How OpenGL does it?
OpenGL’s transformation functions are
meant to be used in 3D
No problem for 2D though – just ignore
the z dimension
Translation:
glTranslatef(d)(tx, ty, tz) ->
glTranslatef(d)tx,ty,0) for 2D
31. How OpenGL does it?
Rotation:
glRotatef(d)(angle, vx, vy, vz) ->
glRotatef(d)(angle, 0,0,1) for 2D
x
y
z
(vx, vy, vz) – rotation axis
x
y
You can imagine z is pointing out
of the slide
32. OpenGL Transformation Composition
A global modeling transformation matrix
(GL_MODELVIEW, called it M here)
glMatrixMode(GL_MODELVIEW)
The user is responsible to reset it if necessary
glLoadIdentity()
-> M = 1 0 0
0 1 0
0 0 1
33. OpenGL Transformation Composition
Matrices for performing user-specified
transformations are multiplied to the model view
global matrix
For example,
1 0 1
glTranslated(1,1 0); M = M x 0 1 1
0 0 1
All the vertices P defined within glBegin() will first go
through the transformation (modeling
transformation)
P’ = M x P