1 / 51

Geometry and Mathematics for Computer Graphics

Explore the fundamentals of geometry and mathematics in computer graphics, including concepts like vector spaces, coordinate reference frames, points and lines, polygon topologies, and more.

dglass
Download Presentation

Geometry and Mathematics for Computer Graphics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4 1 4 4 3 3 2 1 3 1 2 2 Geometry and Mathematics for Computer Graphics

  2. Contents • Spaces • Coordinate-reference Frames • Points and Lines • Parametric Representation • Polygon Topologies • Higher Order Geometry • Vectors • Matrices

  3. Vector Spaces • A nonempty set V of vectors • Vectors have magnitude and direction. • Addition + Scalar Multiplication · u+v = v+u V · (u+v)+w = u+(v+w) · u+0 = u · u+(-u) = 0 · cu V ,(c is scalar) · c(u+v) = cu+cv · (c+d)u = cu+du · c(du) = (cd)u · 1u = u Directed Line Segments … but, have no position ! Identical Vectors

  4. Affine Spaces e2  Introducing the concepts of “points”, which represents “the location” e3  Contain the necessary elements for building geometric models e2 e1 e1 e3  Points와 그에 종속된Vector들로 표현 Basis vectors located at the origin P Truncated plane (No Origin) : Vector Space P 기준의 새 좌표계 설정 : Affine Space

  5. Euclidean Spaces • Affine spaces have no concepts of how far apart two points are, or of what the length of a vector is • To Support a measure of distance between points,such as,..Inner Product!

  6. General Transformation For general non-singular linear transformations T, 사각형과 Euclidean, Affine, Projective transformation에 의한 변형 예

  7. Coordinate Reference Frames • Coordinate Reference Frames • Cartesian coordinate system x,y,z좌표축사용, 전형적 좌표계 • Non-Cartesian coordinate system • 특수한 경우의 object표현에 사용. • Polar, Spherical, Cylindrical 좌표계등

  8. 2D Coordinate System Y X

  9. Polar Coordinates • 가장 많이 쓰이는 non-Cartesian System • Elliptical coordinates, hyperbolic, parabolic plane coordinates등 원 이외에 symmetry를 가진 다른 2차 곡선들로도 좌표계 표현 가능. r 

  10. Why Polar Coordinates? 예) 원의 표현 y y d d x x dx dx 균등하게 분포되지 않은 점들 연속된 점들 사이에 일정간격유지 Polar Coordinates Cartesian Coordinates

  11. 3D Cartesian Frames Three Dimensional Point

  12. 3D Cartesian Frames • 오른손 좌표계 • - 대부분의 Graphics Package에서 표준 • 왼손 좌표계 • - 관찰자로부터 얼마만큼 떨어져 있는지 • 나타내기에 편리함 • - Video Monitor의 좌표계

  13. z axis z z axis P(,,z) P(r,, )  r y axis  y axis   x axis x axis 3D NonCartesian System • Cylindrical coordinates • Spherical coordinates

  14. 4 1 4 4 3 3 2 1 3 1 2 2 Geometry vs. Topology Geometry : Where Things are (e.g., coordinates) Topology : How things are connected

  15. Geometry : Points • 가장 기본적인 Output Primitive • 0차원으로 크기와 길이 측정 불가 • 순서쌍(x,y)나 vector형식으로 표기 • Raster Scan display 의 한 Pixel차지 • 2D or 3D

  16. Geometry : Lines • Defined as a list of points(PolyLine) • Rasterization • Stairstep effect(jaggies)

  17. Line Drawing Algorithm • Accomplished by calculating intermediate positions along the line path between two specified endpoint positions Bresenham’s Line Algorithm

  18. y x Why “y=mx” is not good for Graphics Applications • Defects in Nonparametric representation • Explicit function의 경우 1. Can only represent infinite lines, not finite line segments 2. Cannot represent vertical lines(m=) 3. Can only 2D lines, not 3D • Implicit function의 경우 Redundant representation Ex) 원호의 표현 :

  19. Parametric Line Equation P2 p p = P1 + t * ( P2 - P1 ) P1 x = X1 + t * ( X2 - X1 ) y = Y1 + t * ( Y2 -Y1 ) 0.0  t  1.0 z = Z1 + t * ( Z2 - Z1 )

  20. Parametric Line Equation Can Also be thought of as a blending function... P2 P1 x = ( 1 - t ) * X1 + t * X2 y = ( 1 - t ) * Y1 + t * Y2 0.0  t  1.0 z = ( 1 - t ) * Z1 + t * Z2

  21. Linear Blending You can linearly blend any two quantities with : q = Q1 + t * ( Q2 - Q1 ) Or, if you’d prefer : q = ( 1 - t ) * Q1 + t * Q2 Color, Shape, Location, Angle, Scale factors,….

  22. Line Topologies Line Strip Lines Line Loop

  23. Line patterns : Stipples

  24. Polygons • Planar • Defined as a closed sequence of points • 2D or 3D

  25. Sidebar : What is “Planar?” above If the point P is on the plane, then : below

  26. Some Special Polygon Topologies Triangle Triangular Strip Triangular Fan Quadrilateral Quadrilateral Strip

  27. Polygon Patterns : Stipples

  28. Polygon Patterns :Color Interpolation

  29. Polygon Patterns :Texture Mapping

  30. Convex vs. Concave Convex Concave

  31. 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?

  32. Conics Circle Ellipse Parabola, Hyperbolar, ...

  33. It is often handy to think of the independent parameter as consistently varying form 0.0 to 1.0

  34. Quadrics Sphere Ellipsoid, Paraboloid, Hyperboloid, [Torus,]...

  35. Arbitrary Curves How do we control what goes on in here?

  36. Cubic Curves We could just fill these 12 constants with random numbers, but there must be a better way

  37. Hermite, or Coons, Cubic Curve Specify the two end points and two end slopes - solve for A~L

  38. Bézier Cubic Curves Specify the two end points and two “control points” - solve for A~L

  39. BiCubic Surfaces

  40. Bézier BiCubic Surfaces

  41. Bézier BiCubic Surfaces

  42. P2 y2 V y1 P1 x1 x2 Points and Vectors • Point : 좌표계의 한 점을 차지 ,위치표시 • Vector : 두 position간의 차로 정의 • Magnitude와 Direction으로도 표기

  43. z  V   y x Vectors (계속) • 3차원에서의 Vector • Vector Addition and Scalar Multiplication

  44. V2  V1 |V2|cos Scalar Product • Dot Product, Inner Product라고도 함 For Cartesian reference frame, Some Properties Commutative Distributive

  45. Scalar Product (계속) (x2,y2) (x1,y1,z1) V2 (x2,y2,z2)  (x1,y1) V1 (x0,y0) (x0,y0,z0) Edge사이의 사잇각 Polygon의 면적

  46. V1 V2 V2  V1 Vector Product • ux,uy,uz를 각 축의 단위 vector라 하면, Properties AntiCommutative Not Assotiative Distributive

  47. Vector Product (계속) Shading, Reflection Model 평면사이의 위치관계

  48. Matrices • Definition • A rectangular array of quantities • Scalar multiplication and Matrix Addition

  49. j-th column i-th row m × = (i,j) l l n m n Matrix Multiplication • Definition • Properties Not Commutative Assotiative Distributive Scalar multiplication

  50. Determinant of Matrix • 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

More Related