Presentation is loading. Please wait.

Presentation is loading. Please wait.

AMS 345/CSE 355 Computational Geometry

Similar presentations


Presentation on theme: "AMS 345/CSE 355 Computational Geometry"— Presentation transcript:

1 AMS 345/CSE 355 Computational Geometry
Lecture: Geometric Primitives Joe Mitchell Code/figures from [O’Rourke]: Computational Geometry in C: Chap 1

2 Cross Products c b a

3 Cross Products Example: ab × ac = [2,1] × [2,2] = (2*2-2*1) = 1
ab × ad = [2,1] × [0,-1] = (2*(-1)-0*1) = -2 c=(2,2) b=(2,1) a d=(0,-1)

4 Determinant Form

5 Area of Convex Polygon

6 Area of Simple Polygon

7 Point Type

8 Vertex Structure

9 NEW and ADD

10

11 b c a

12 Proper Segment Intersection
Fact: ab and cd properly intersect if and only if (1) points a and b are on opposite sides of line cd, AND (2) c and d are on opposite sides of line ab

13

14 Improper Segment Intersection

15 Between b c a b c a

16 Segment Intersection

17 Diagonalie Test if segment ab, joining vertices a and b, forms a “diagonalie” = an interior or exterior diagonal for P. Check: does the segment ab avoid intersecting all edges of P, except those that share endpoints with ab? a a b a b b

18 InCone

19 InCone b a0 a1 a b a a1 a0

20 Diagonal

21 Additional Primitives
ConvexVertex(a,P) – returns T iff a is a convex vertex of P RaySegIntersectProp RayRayIntersectProp RaySegIntersect, RayRayIntersect SegSegShareEndptOnly SegSegT-Intersect PointInTriangle SegInPolygon Etc, etc

22 From Practice Midterm

23 From Practice Midterm


Download ppt "AMS 345/CSE 355 Computational Geometry"

Similar presentations


Ads by Google