Geometry and Mathematics for Computer Graphics 4 1

































![Quadrics Sphere Ellipsoid, Paraboloid, Hyperboloid, [Torus, ]. . . Geometry and Mathematics for Computer Quadrics Sphere Ellipsoid, Paraboloid, Hyperboloid, [Torus, ]. . . Geometry and Mathematics for Computer](https://slidetodoc.com/presentation_image_h/bfb0434e9b99a5cba90eb260caa77df8/image-34.jpg)

















- Slides: 51
Geometry and Mathematics for Computer Graphics 4 1 4 3 2 1 3 2 4 1 3 2
Contents o Spaces o Coordinate-reference Frames o Points and Lines o Parametric Representation o Polygon Topologies o Higher Order Geometry o Vectors o Matrices Geometry and Mathematics for Computer Graphics
Vector Spaces o A nonempty set V of vectors o Vectors have magnitude and direction. o Addition + Scalar Multiplication · · · u+v = v+u V u+0 = u cu V , (c is scalar) c(u+v) = cu+cv c(du) = (cd)u · (u+v)+w = u+(v+w) · u+(-u) = 0 Directed Line Segments · (c+d)u = cu+du · 1 u = u … but, have no position ! Identical Vectors Geometry and Mathematics for Computer Graphics
Affine Spaces e 2 Introducing the concepts of “points”, which represents “the location” e 3 e 1 e 2 e 1 e 3 Contain the necessary elements for building geometric models Points와 그에 종속된 Vector들로 표현 Basis vectors located at the origin P Truncated plane (No Origin) : Vector Space Geometry and Mathematics for Computer Graphics P 기준의 새 좌표계 설정 : Affine Space
Euclidean Spaces o Affine spaces have no concepts of how far apart two points are, or of what the length of a vector is o To Support a measure of distance between points, such as, . . Inner Product! Geometry and Mathematics for Computer Graphics
General Transformation For general non-singular linear transformations T, 사각형과 Euclidean, Affine, Projective transformation에 의한 변형 예 Geometry and Mathematics for Computer Graphics
Coordinate Reference Frames o Coordinate Reference Frames v Cartesian coordinate system x, y, z좌표축사용, 전형적 좌표계 v Non-Cartesian coordinate system – 특수한 경우의 object표현에 사용. – Polar, Spherical, Cylindrical 좌표계등 Geometry and Mathematics for Computer Graphics
2 D Coordinate System Y X Geometry and Mathematics for Computer Graphics
Polar Coordinates v 가장 많이 쓰이는 non-Cartesian System r v Elliptical coordinates, hyperbolic, parabolic plane coordinates등 원 이외에 symmetry를 가진 다른 2차 곡 선들로도 좌표계 표현 가능. Geometry and Mathematics for Computer Graphics
Why Polar Coordinates? 예) 원의 표현 y y d d x x dx dx 균등하게 분포되지 않은 점들 Cartesian Coordinates Geometry and Mathematics for Computer Graphics 연속된 점들 사이에 일정간격유지 Polar Coordinates
3 D Cartesian Frames Three Dimensional Point Geometry and Mathematics for Computer Graphics
3 D Cartesian Frames v 오른손 좌표계 - 대부분의 Graphics Package에서 표준 v 왼손 좌표계 - 관찰자로부터 얼마만큼 떨어져 있는지 나타내기에 편리함 - Video Monitor의 좌표계 Geometry and Mathematics for Computer Graphics
3 D Non. Cartesian System q Cylindrical coordinates q Spherical coordinates z axis z z axis P( , , z) x axis y axis Geometry and Mathematics for Computer Graphics x axis P(r, , ) r y axis
Geometry vs. Topology Geometry : Where Things are (e. g. , coordinates) Topology : How things are connected 4 1 4 3 2 1 3 2 Geometry and Mathematics for Computer Graphics 4 1 3 2
Geometry : Points v 가장 기본적인 Output Primitive v 0차원으로 크기와 길이 측정 불가 v 순서쌍(x, y)나 vector형식으로 표기 v Raster Scan display 의 한 Pixel차지 v 2 D or 3 D Geometry and Mathematics for Computer Graphics
Geometry : Lines o Defined as a list of points(Poly. Line) o Rasterization v Stairstep effect(jaggies) Geometry and Mathematics for Computer Graphics
Line Drawing Algorithm o Accomplished by calculating intermediate positions along the line path between two specified endpoint positions Bresenham’s Line Algorithm Geometry and Mathematics for Computer Graphics
Why “y=mx” is not good for Graphics Applications o Defects in Nonparametric representation v Explicit function의 경우 1. Can only represent infinite lines, not finite line segments 2. Cannot represent vertical lines(m= ) 3. Can only 2 D lines, not 3 D v Implicit function의 경우 y Redundant representation Ex) 원호의 표현 : Geometry and Mathematics for Computer Graphics x
Parametric Line Equation P 2 p p = P 1 + t * ( P 2 - P 1 ) P 1 x = X 1 + t * ( X 2 - X 1 ) y = Y 1 + t * ( Y 2 -Y 1 ) z = Z 1 + t * ( Z 2 - Z 1 ) Geometry and Mathematics for Computer Graphics 0. 0 t 1. 0
Parametric Line Equation Can Also be thought of as a blending function. . . P 2 P 1 x = ( 1 - t ) * X 1 + t * X 2 y = ( 1 - t ) * Y 1 + t * Y 2 z = ( 1 - t ) * Z 1 + t * Z 2 Geometry and Mathematics for Computer Graphics 0. 0 t 1. 0
Linear Blending You can linearly blend any two quantities with : q = Q 1 + t * ( Q 2 - Q 1 ) Or, if you’d prefer : q = ( 1 - t ) * Q 1 + t * Q 2 Color, Shape, Location, Angle, Scale factors, …. Geometry and Mathematics for Computer Graphics
Line Topologies Line Strip Lines Line Loop Geometry and Mathematics for Computer Graphics
Line patterns : Stipples Geometry and Mathematics for Computer Graphics
Polygons • Planar • Defined as a closed sequence of points • 2 D or 3 D Geometry and Mathematics for Computer Graphics
Sidebar : What is “Planar? ” If the point P is above on the plane, then : below Geometry and Mathematics for Computer Graphics
Some Special Polygon Topologies Triangle Triangular Strip Triangular Fan Quadrilateral Strip Geometry and Mathematics for Computer Graphics
Polygon Patterns : Stipples Geometry and Mathematics for Computer Graphics
Polygon Patterns : Color Interpolation Geometry and Mathematics for Computer Graphics
Polygon Patterns : Texture Mapping Geometry and Mathematics for Computer Graphics
Convex vs. Concave Convex Geometry and Mathematics for Computer Graphics Concave
Higher Order Geometry When we draw a line, we do not need to specify all pixel points along the line - we just give the endpoints and let the equation determine the interior points Can we do the same with other curve and surface types? Geometry and Mathematics for Computer Graphics
Conics Circle Ellipse Parabola, Hyperbolar, . . . Geometry and Mathematics for Computer Graphics
It is often handy to think of the independent parameter as consistently varying form 0. 0 to 1. 0 Geometry and Mathematics for Computer Graphics
Quadrics Sphere Ellipsoid, Paraboloid, Hyperboloid, [Torus, ]. . . Geometry and Mathematics for Computer Graphics
Arbitrary Curves How do we control what goes on in here? Geometry and Mathematics for Computer Graphics
Cubic Curves We could just fill these 12 constants with random numbers, but there must be a better way Geometry and Mathematics for Computer Graphics
Hermite, or Coons, Cubic Curve Specify the two end points and two end slopes - solve for A~L Geometry and Mathematics for Computer Graphics
Bézier Cubic Curves Specify the two end points and two “control points” solve for A~L Geometry and Mathematics for Computer Graphics
Bi. Cubic Surfaces Geometry and Mathematics for Computer Graphics
Bézier Bi. Cubic Surfaces Geometry and Mathematics for Computer Graphics
Bézier Bi. Cubic Surfaces Geometry and Mathematics for Computer Graphics
Points and Vectors o Point : 좌표계의 한 점을 차지 , 위치표시 o Vector : 두 position간의 차로 정의 v Magnitude와 Direction으로도 표기 P 2 y 1 V P 1 x 2 Geometry and Mathematics for Computer Graphics
Vectors (계속) o 3차원에서의 Vector z x o Vector Addition and Scalar Multiplication Geometry and Mathematics for Computer Graphics V y
Scalar Product S Dot Product, Inner Product라고도 함 V 2 |V 2|cos V 1 For Cartesian reference frame, Some Properties Commutative Distributive Geometry and Mathematics for Computer Graphics
Scalar Product (계속) (x 2, y 2) (x 1, y 1, z 1) V 2 (x 2, y 2, z 2) (x 0, y 0) V 1 (x 1, y 1) Edge사이의 사잇각 Geometry and Mathematics for Computer Graphics (x 0, y 0, z 0) Polygon의 면적
Vector Product V 1 V 2 ※ ux, uy, uz를 각 축의 단위 vector라 하면, V 1 Properties Anti. Commutative Not Assotiative Distributive Geometry and Mathematics for Computer Graphics
Vector Product (계속) Shading, Reflection Model Geometry and Mathematics for Computer Graphics 평면사이의 위치관계
Matrices o Definition v A rectangular array of quantities o Scalar multiplication and Matrix Addition Geometry and Mathematics for Computer Graphics
Matrix Multiplication o Definition j-th column i-th row × l m o Properties Not Commutative Assotiative Distributive Scalar multiplication Geometry and Mathematics for Computer Graphics m = (i, j) l n n
Determinant of Matrix o For n 2, the Determinant of n n matrix A is, and for a 2 by 2 matrix, Ex) ※ if A is a triangular matrix, det A is the product of the entries on the main diagonal of A Geometry and Mathematics for Computer Graphics
Properties of Determinants o Row Operations Let A, B be a square matrix 1) A의 한 행의 실수배가 다른 row에 더해져 B를 만들었다면, det. B = det. A 2) A의 두 행이 교환되어 B를 생성했다면, det. B = -det. A 3) A의 한 행이 k배된 것이 B라면, det. B = k det. A Ex) o Column Operations Geometry and Mathematics for Computer Graphics