arch 655 parametric modeling in design wei yan, ph.d., associate professor college of architecture,...

27
ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms Acknowledgements: most materials in the slides are copies from Prof. Donald House’ The Digital Image, and some other materials are copies from various online resources.

Upload: jonathan-burke

Post on 29-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

ARCH 655

Parametric Modeling in Design

Wei Yan, Ph.D., Associate ProfessorCollege of Architecture, Texas A&M University

Lecture 5 Matrices and Transforms

Acknowledgements: most materials in the slides are copies from Prof. Donald House’ The Digital Image, and some other materials are copies from various online resources.

Page 2: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps or Warps

• General form of an affine map

coefficients aij are constants

A geometric transformation that maps points and parallel lines to points and parallel lines

Page 3: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps or Warps

they can be represented in matrix form

Page 4: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Homogeneous Coordinate System (every point has an identical third coordinate)

Page 5: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps (Transformations)

Page 6: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps (Transformations)

Page 7: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps (Transformations)

Page 8: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine Maps (Transformations)

Page 9: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Recall TRIGONOMETRY Formula:

Page 10: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Composing Affine Warps

Let R be a rotation, S be a scale, and T a translation. Let’s do a rotation, followed by a scale, followed by a translation.

Page 11: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Composing Affine Warps

This is a wonderfully compact and unified way of constructing a largevariety of useful warps in a very intuitive way – i.e. by simple composition of easy to understand operations.

Matrix representation makes it simple for us to write and understand the transforms.

Page 12: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Example

Page 13: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Commutative?

Page 14: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Commutative?

Page 15: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Perspective Warps: Non-Affine Transformations

Provides 3D feeling

Giving depth illusion

Page 16: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Perspective Transformation

• Step1 - matrix multiplication, after which the third coordinate of the resulting point is not 1

Page 17: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Perspective Transformation

• Step 2, we need to restore our points to homogeneous coordinates with w = 1. We divide each vector by its own w coordinate

Page 18: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Example

Page 19: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms
Page 20: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms
Page 21: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms
Page 22: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms
Page 23: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

If P is:1          0          00          1          0a          b          1

Then the vanishing points will be (1/a, 0) and (0, 1/b).

If a=0 and b=0 there will be no vanishing points (the image will be mapped to the same as the original). If one of them is 0, then there will be 1 vanishing point.

Vanishing Points

Page 24: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine v.s. Perspective (Forward map)

Affine: only one step

Page 25: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine v.s. Perspective (Forward map)

Perspective: two steps

Page 26: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Affine v.s. Perspective (Forward map)

Perspective: two steps

Page 27: ARCH 655 Parametric Modeling in Design Wei Yan, Ph.D., Associate Professor College of Architecture, Texas A&M University Lecture 5 Matrices and Transforms

Projective Warps: Affine, Perspective or Composite of the two

Affine and Perspective are unified here: both use the division by w. Affine becomes a special case, where w=1.