1 / 30

Computer Graphics SS 2014 Geometric Models - II

Computer Graphics SS 2014 Geometric Models - II. Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung. Object representation. In Computer Graphics we often have to test a polygon mesh against other primitives, e.g., rays Questions that arise are :

Download Presentation

Computer Graphics SS 2014 Geometric Models - II

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. Computer Graphics SS 2014 Geometric Models - II Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung

  2. Objectrepresentation • In Computer Graphics weoftenhavetotest a polygonmeshagainstother primitives, e.g., rays • Questionsthatariseare: • Does a rayintersectthesurface? • Whichtriangledoes a rayintersect? • Underwhich angle does a rayhit a surface?

  3. Objectrepresentation • Ray-triangleintersection • Anypointp in the plane spannedby a trianglecanbeexpressedas p= p0+ 1(p1-p0)+ 2(p2-p0) = (1-1-2)p0 + 1p1 + 2p2 = 0p0 + 1p1 + 2p2 • As pis on theray (startpointpsanddirectiond):ps+ t d = p0 + 1(p1-p0)+ 2(p2-p0) • Requiressolutionof a 3x3 systemof linear equations • Inside/outsidecanbedeterminedfromi(seelater in course)

  4. Objectrepresentation • The angle underwhich a rayhits an objectdepends on the „orientation“ oftheintersectionpoint; This isgivenbythesurface normal – theunitvectorbeingperpendiculartothelocaltangent plane

  5. Objectrepresentation • Tangent plane • The tangent plane at point on a surface is the plane in ℝ3whichisspanned by the tangent vectors of curves on the surface passing through the point

  6. Objectrepresentation • Howtodeterminesurfacenormalsofpolygonmodels • Per-polygon normalscanbecomputeddirectlybytakingintoaccounttheplanarityofpolygonsandorthogonalityof normal vectors • Per-vertex normalscanbecomputeddirectlyfromthesurfacerepresentation (seelaterforimplicit/explicit representations) • Can also becomputed for everyplanarface and averagedatthevertices (assuming a consistentorderingoffacevertices)

  7. Objectrepresentation • In a polygonmodel, normalsarestored per vertex • Storedas additional vertexattributes • Interpolatedduringrenderingasanyother per-vertex attribute

  8. Objectrepresentation • Sometimeswe deal withobjects, i.e. surfaces, whichhave a functionaldescription • Such a descriptioncanbeusedtoconstruct a polygonal representation • Itcan also beuseddirectly in a numberofapplications, e.g. findingintersectionwithrays • The algebraicrepresentationswediscussare • Implicitdescription • Parametricdescription

  9. Continuoussurfaces • Parametricsurfaces • Defined via a mappingfromℝ2(theparameterdomain) toℝ3ie. coordinatesaredescribed via parametricequations 2 • Denotebythe partial derivatives ofxwrtuandv

  10. Parametricsurfaces • Curves for some constant u or v are called u-curves and v-curves, respectively, or just coordinate curves

  11. Parametricsurfaces • Parametricplane

  12. Parametricsurfaces • Parametriccylinder

  13. Parametricsurfaces • Parametricunitsphere Azimuth Zenith

  14. Continuoussurfaces • Parametricsurfaces • The tangent plane at point is the plane in ℝ3whichisspanned by the tangent vectors of curves on the surface passing through the point • span the tangent plane and any tangent vector can be decomposed into a linear combination of • The unit vector normal to the tangent plane is

  15. Continuoussurfaces • Normals of a parametricsurface • Parametric equations of a cylinder: • Normal: n

  16. Continuoussurfaces • Intersecting a raywith a parametricsurface px+ t dx = x(u,v) py + t dy = y(u,v) pz+ t dz = z(u,v) →Yields 3 equations and 3 unknowns – just solveit! → Can becomplicatedfor non-simple x,yandz

  17. Continuoussurfaces • Implicitdescription • Surface describedbythesetofpointsthatlie/don´tlie on thesurface {(x,y,z) ∈ V | f(x,y,z) = 0} V ∈ ℝ3, • Exampleunitsphere: • Cannotcomputesurfacepointsdirectly, but insertingpointcoordinatesyields „distance“ fromsurface

  18. Continuoussurfaces • Implicit surface – a different view • Assumewehave a scalarvalueateverydomainpoint • Implicitsurfacerepresentsthesetof all pointsatwhichthevalueisc (thelevel-setsoriso-contours)

  19. Continuoussurfaces • Implicitdescriptionofquadricsurfaces: Ax2 + By2 + Cz2 + Dxy+ Exz + Fyz + Gx + Hy + Iz + J = 0 Planes, spheres, cylinders, cones, ellipsoids, paraboloids etc. ellipsoid paraboloids hyperboloids

  20. Continuoussurfaces • Ray-quadricsintersection • Substitutingrayequationp(t) = ps + tdintoquadricsequationyields a quadraticequationAqt2 +Bqt+Cqwith solutions

  21. Continuoussurfaces • Ray-quadricsintersection • If the quadratic equation has two real roots, then the ray intersects the surface twice • If it has one real root of multiplicity two then the ray touches the surface once • If it has two complex roots (negative discriminant) then the ray misses the surface • If there are real roots, their signs should be tested, since they are at or behind the origin of the ray

  22. Continuoussurfaces • Normal at a point on an implicitsurface • Forimplicitsurfacesthenormal directionata surfacepointpisgivenbythe (normalized) gradientatthispoint • The gradient of a function (f) gives a vector pointing in the direction in which the function is increasing the most in the vicinity of the point • The gradient is defined as

  23. Continuoussurfaces • For a quadricsurfacethenormalata surfacepointpisgivenby

  24. Continuoussurfaces • Example: sphere The vectorfromthecentertothepoint on thesphere

  25. Objectrepresentation • Summary • Learnedwhat a polygonal representationis • Consistsofpolygons, whichconsistsofverticesandedges • Normals determinetheorientationofsurfacepoints • Normals canbeapproximated on thepolygonmesh • Discussed different surfacerepresentations • Learnedhowtointersect a raywith such objects • Learnedhowtodirectlycomputenormalsfrom such representations

  26. Objectrepresentation • Research topics • Geometrycompression 230MB vs. 10GB

  27. Objectrepresentation • Research topics • Modellingbysubdivision

  28. Objectrepresentation • Research topics • Remeshing

  29. Objectrepresentation • Research topics • Surface (mesh) deformation

  30. Objectrepresentation • Research topics • Modelling with alternative patches

More Related