02-math2d3d

02-math2d3d - Lecture 2 Useful 2D and 3D Mathematics...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 2 Useful 2D and 3D Mathematics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Reading Hearn Baker (2E)/(3E). 5.1, 5.4, 5.6, 6.1, 6.3, 6.5, Foley van Dam. 5.2, 5.6 Further reading: Hearn Baker. A.1-2, A.5, A.8-9
Background image of page 2
Lecture outline: 1. Coordinate systems 2. Points and Vectors 3. Useful 2D Mathematics for Computer Graphics 4. Useful 3D Mathematics for Computer Graphics 5. 2D and 3D Transformations Useful site: http://mathworld.wolfram.com (Check math. terminology)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Coordinate Systems y x (a) y (b) Screen Cartesian reference systems : (a) coordinate origin at the lower-left screen corner and (b) coordinate origin in the upper-left corner (1) 2D Cartesian Reference Frames
Background image of page 4
(2) Polar Coordinates in the XY plane A coordinate position is specified with a radial distance r from the coordinate origin, and an angular displacement θ from the horizontal. X Y r θ A polar coordinate reference frame, formed with concentric circles and radial lines.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Relationship between Polar and Cartesian coordinates. = + = x y y x r 1 2 2 tan , θ P y x y-axis x-axis Relationship between polar and Cartesian coordinate x = r cos θ , y = r sin θ 0 The inverse transformation from Cartesian to Polar coordinates is: Note: see atan2() in math.h It maps (x,y) to (- π ,+ π ]
Background image of page 6
Definition of angle θ (in radian) : Total angular distance around point P r s = θ π 2 2 = = r r P s r P An angle subtended by a circular arc of length s and r . Definition:
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Right-handed System (3) 3D Cartesian Reference Frames X Y Z
Background image of page 8
Left-handed System In OpenGL (and most graphics people), all 3D reference frames are right handed while DirectX allows programmers to choose.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(4) Cylindrical-coordinate System z Z Y X = = = θρ θ ρ sin cos P( ρ , θ ,z) z axis x axis y axis z ρ θ Cylindrical coordinates: ρ , θ ,z. The surface of constant ρ is a vertical cylinder The surface of constant θ is a vertical plane containing the Z-axis The surface of constant z is a horizontal plane parallel to the Cartesian XY plane Transformation from a cylindrical coordinate specification to a Cartesian reference system
Background image of page 10
(5) Spherical-coordinate System ( or Polar coordinates in 3D space ) P(r, θ , φ ) z axis x axis y axis r θ Spherical coordinates: r, θ , φ . φ φ φθ θ cos sin sin sin cos r z r y r x = = =
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Solid Angle w (unit : steradian) ω r A A solid angle ω subtended by a spherical surface patch of area A with radius r. π 4 4 point a about angle solid Total 2 2 = = r r ω 2 = r A Definition:
Background image of page 12
Points and Vectors 2D Vector = + = = = = x y y x y x V V V V V V V y y x x P P V 1 2 2 1 2 1 2 1 2 tan direction ) , ( ) , ( α y 2 y 1 x 1 x 2 V P 1 P 2 Vector V in xy plane of Cartesian reference frame. Note: see atan2() in math.h It maps ( x , y ) to (- π ,+ π ] Change = “New – Old”
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
V V V V V V and V V V V z z y y x x V z y x z y x = = = + + = = γ β α γβ cos , cos , cos , angles, direction the given with is direction Vector ) , , ( 2 2 2 1 2 1 2 1 2 y z x V γ α β Direction angles α , β, and γ .
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/19/2009 for the course COMP 341 taught by Professor Qu,huamin during the Spring '09 term at HKUST.

Page1 / 67

02-math2d3d - Lecture 2 Useful 2D and 3D Mathematics...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online