Editing and Transformation

Similar documents
Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Image Warping. Some slides from Steve Seitz

CS F-07 Objects in 2D 1

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

Two Dimensional Viewing

2D and 3D Transformations AUI Course Denbigh Starkey

What and Why Transformations?

Image Warping. Some slides from Steve Seitz

2D Object Definition (1/3)

CS 335 Graphics and Multimedia. Geometric Warping

Scene Graphs & Modeling Transformations COS 426

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll

CS4670: Computer Vision

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

3-Dimensional Viewing

Image Warping (Szeliski Sec 2.1.2)

Graphics and Interaction Transformation geometry and homogeneous coordinates

How is project #1 going?

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

CS Computer Graphics: Transformations & The Synthetic Camera

Matrix Transformations. Affine Transformations

GEOMETRIC TRANSFORMATIONS AND VIEWING

Image warping/morphing

Homogeneous Coordinates

Image Warping CSE399b, Spring 07 Computer Vision

CATIA V5 Parametric Surface Modeling

CS559: Computer Graphics

Reteaching Golden Ratio

CS770/870 Spring 2017 Transformations

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

Last Lecture. Edge Detection. Filtering Pyramid

Generative Shape Design

CSE528 Computer Graphics: Theory, Algorithms, and Applications

A Comprehensive Introduction to SolidWorks 2011

SOLIDWORKS 2016: A Power Guide for Beginners and Intermediate Users

Modeling Transformations

Transformations. Examples of transformations: shear. scaling

Game Engineering: 2D

3D Geometry and Camera Calibration

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Education Curriculum Surface Design Specialist

Modeling Transformations

Warping, Morphing and Mosaics

Modeling Transformations

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Lecture 5 2D Transformation

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

Geometric Transformations

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Modeling Transformations

Double Integrals in Polar Coordinates

CATIA Surface Design

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Modeling Transformations

7/21/2009. Chapters Learning Objectives. Fillet Tool

Structural & Thermal Analysis Using the ANSYS Workbench Release 12.1 Environment

Think About. Unit 5 Lesson 3. Investigation. This Situation. Name: a Where do you think the origin of a coordinate system was placed in creating this

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1]

Plot and connect the points in a coordinate plane to make a polygon. Name the polygon.

Prof. Feng Liu. Winter /05/2019

2D transformations: An introduction to the maths behind computer graphics

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

Computer Graphics 7: Viewing in 3-D

Affine and Projective Transformations

Representing 2D Transformations as Matrices

Chap 7, 2009 Spring Yeong Gil Shin

LAB # 2 3D Modeling, Properties Commands & Attributes

Structural & Thermal Analysis using the ANSYS Workbench Release 11.0 Environment. Kent L. Lawrence

The 3-D Graphics Rendering Pipeline

Modeling Transformations Revisited

2D transformations and homogeneous coordinates

Properties Transformations

Viewing Transformations I Comp 535

Image Metamorphosis By Affine Transformations

3D Computer Vision II. Reminder Projective Geometry, Transformations. Nassir Navab. October 27, 2009

Geometric Modeling. Introduction

9 3 Rotations 9 4 Symmetry

Polynomials. Math 4800/6080 Project Course

Transformations Computer Graphics I Lecture 4

Name: [20 points] Consider the following OpenGL commands:

Computer Graphics: Geometric Transformations

Lecture 8. 3D Geometric Transformation

3D Design with 123D Design

3. Preprocessing of ABAQUS/CAE

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

E V ER-growing global competition forces. Accuracy Analysis and Improvement for Direct Laser Sintering

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

COMPUTER AIDED ARCHITECTURAL GRAPHICS FFD 201/Fall 2013 HAND OUT 1 : INTRODUCTION TO 3D

Math 26: Fall (part 1) The Unit Circle: Cosine and Sine (Evaluating Cosine and Sine, and The Pythagorean Identity)

UNIT 2 2D TRANSFORMATIONS

Graphics Output Primitives

Transcription:

Lecture 5 Editing and Transformation

Modeling Model can be produced b the combination of entities that have been edited. D: circle, arc, line, ellipse 3D: primitive bodies, etrusion and revolved of a profile Before editing fter editing Before editing fter editing (a

Editing: surface and solid Part to be edited Surface Surface Surface Surface Before Editing on surfaces fter B B- B Cutting of Solid modell

Differences: D and 3D editing (X cos θ - Y sinθ, sinθ + Y cosθ (X,Y is Plane θ Center of rotation D: ais (, 3D: plane D: point 3D: ais Z Y Plane XY Plane YZ X θ Center of rotation θ Rotation ais Plane ZX

Editing Tpes of editing Fillet Chamfer Trim Scale Mirror 3D: Boolean Operation Translation Rotation Cop rra Offset Some editing preserves it original shape such length and angle and some don t. D editing is similar to 3D editing. Understanding CS is ver important to find the relationship.

Eample editing Circle Line Spline Y rra D and 3D Surface Z X 3D ine ΔY Z Y X Paksi Z Paksi X Paksi Y

Geometric Transformation Calculates l the new coordinates when transformation is applied to the geometric model. The geometric model can be wireframe, surface and solid. Editing commands are in fact transformations e.g scale, mirror, move.

Editing and transformation: relationship O B (X +ΔX, Y +ΔY C D Scaling points BCD on point O Line is etended from O (X B +ΔX, Y B +ΔY (X, Y ΔY (X C, Y C (X C +ΔX, Y C +ΔY ΔY O O (X B, Y B ΔX ΔX (a (b B B O D C D C (c

Model Representation Before appling the transformation matrices, the geometrical properties of the entities must be represented as matrices in its homogeneous coordinates in D or 3D. Rectangle (, (,(,(,,, n n n n z z z n Cube (,, (,, (,,

Convert to their homogeneous representation (3, (3,3 Y (,, (, (, ( (,, (,,, (,, (,, (,, Z X (,, Z Y (,, (,, (B (C X (,,

ppling transformation matrices [ ] D n n n n z z [ ] D z z z z 3 n n n z z n n n

Translation D Translation [ ] TR Δ Δ 3D Translation [ ] TR Δ Δ Δz Component-wise addition of vectors + d + d z z + dz To move polgons: translate vertices (vectors and redraw lines between them Preserves lengths and angles Does not require reference point

Rotation Rotation D [ ] R cos θ sinθ (X cos θ -Y sinθ, sinθ + Y cosθ (X,Y θ sin θ cosθ Rotation of vectors through an angle cos Ө sin Ө sin Ө + cos Ө Preserves lengths and angles Point of rotation point (, Center of rotation (,

Rotation at other point than origin point L t th t th t f t ti i ( Let sa that the center of rotation is (,. Translation has to be carried before and after rotation Procedure. Convert the (, to (, b appling translation - and -.. ppl the rotation matri 3 Convert the ( to its original point ( b 3. Convert the (, to its original point (, b appling translation and. [ ] R n n n n

3D Rotation cosθ sinθ cosθ sinθ sinθ cosθ R Y sinθ cosθ [ R X ] [ ] is of rotation: [ ] ΤR Z cosθ sinθ sinθ cosθ is of rotation: z is of rotation: If ais of rotation other than specified ais: appl translation before and after 3D rotation is applied

Scaling D and 3D [ ] R O S S B [ Τ ] S S S S Z Scaling points BCD on point O Line is etended from O O O (a D C D O (b B B C D (c C Component-wise scalar multiplication of vectors S S Does not preserve lengths Does not preserve e angles (ecept when scaling is uniform Point of reference for scaling is (, D and (,, 3D Scaling at other than (, or (,,, appl translation before and after appling scaling transformation

Foundation of transformations Similar method can be applied on other transformation such as shear, reflection etc. Important, if the transformation requires point (D, ais (D & 3D and plane (3D at the origin CS. Translation must be applied before and after appling the respective transformation.

ppling transformation composite matrices Do this transformation on screen. Draw rectangle an size. Translate d 6 3. Rotate it b 45. The same rectangle. Rotate it 45 3. Translate d 6 Q: Do both rectangles overlapping each other? Wh?

Composite Transformations Y 6 5 4 3 3 4 5 6 7 8 9 X Translation Rotation Y 6 5 4 3 3 4 5 6 7 8 9 Rotation Translation X

Composite Transformation [ ] [ ][ ][ ] [ ] C 3... n [ ] X [ X ][ ] C Composite Transformation: C bi ti f lti l t f ti Combination of multiple transformations must be in sequence.

X Mapping Mapping finds the relationship between two coordinate sstem a a a a3 [ Τ ] MP a a [ ] Δ a Δ MP a a3 Δ a a 3 Δ a a 3 33 Δz YY P (X,Y Mapping combines the rotation and translation. D mapping: ΔY ΔX X a to a : T R 3D mapping a to a 33 : T R-X, T R-Y and T R-Z

Mapping: eample Write the composite transformation for mirroring square BCD using ais ( 3 slope line through (, is (, 3 D C B

Solution Y Y Y (, X D X C B Y (, X D X C B. Translation. Rotation 3. Mirror 4. Rotation ti 5. Translation (a Translation (b Rotation B B B C C C D Y (, D X D C Y (, D X D C Y D C B (c Mirror B (d Rotation B (, X (e Translation

Solution Matrices [ ] [ ][ ][ ][ ][ ] M [ ] [ ][ ][ ][ ][ ] 3 sin( 3 cos( TR R MR R TR M [ ] [ ] 3 cos( 3 sin(, TR R [ ] [ ], cos(3 sin(3 sin(3 cos(3, R MR [ ] TR

Solution. Mapping. Mirror 3. Mapping B C B C D Y Y D D C Y ΔX (, X D ΔY X C B Y ΔX (, X D ΔY X C B ΔY Y X (, (c Mapping B (a Mapping (b Mirror

Solution Matrices [ M ] [ ][ ][ ] MP MR MP cos( 3 sin( 3 [ ] sin( 3 cos( 3, [ ] cos(6 sin(6 MP MR [ ] MP cos(3 sin(3 sin(3 cos(3 cos(6 sin(6

Discuss the following problem Square (,, B(,, C(, D(, Write down the matrices involved onl without mathematicall solving them to establish the following transformation. X ais ( Y Y - Y -X Y -X -5

pplication of transformation Movement of mechanism Modeling Head Shaft Point composition decomposition ids realism in computer graphic: projection