26
Lecture 3: Line Segment Intersection, Circumcenters

Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

  • Upload
    others

  • View
    17

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Lecture 3: Line Segment Intersection, Circumcenters

Page 2: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

More Slides Now

Mini Assignment 1 Part 1 Due SundaySubmit README

Part 2 Changed to 2D!

Refresh Page

Page 3: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Piazza

http://www.piazza.com/duke/spring2016/compsci29004/home

Ditching Daily BQOTD

Page 4: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Line Segment Intersection

Triangle Circumcenter

JSON / Visual Debugging

Page 5: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Let’s do lines first……

Page 6: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie
Page 7: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Want: a + s u = b + t v

Page 8: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Want: a + s u = b + t v

This means

(1) ax + sux = bx + t vx

(2) ay + suy = by + t vy

Page 9: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Want: a + s u = b + t v

This means

(1) ax + sux = bx + t vx

(2) ay + suy = by + t vy

Put variables on left side together

(1) sux - tvx = bx - ax

(2) suy - tvy = by - ay

Page 10: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

(1) sux - tvx = bx - ax

(2) suy - tvy = by - ay

What happens if lines parallel?

Page 11: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

a + s(b-a) = b + t(d-c)

Need

0 <= t <= 1

0 <= s <= 1

Page 12: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie
Page 13: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie
Page 14: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

What if vertical line?

What if very close to vertical line?

Page 15: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Line Segment Intersection

Triangle Circumcenter

JSON / Visual Debugging

Page 16: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

p + R(1, 0)cos(theta) + R(0,1)sin(theta)

Page 17: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

How many degrees of freedom?

Page 18: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie
Page 19: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie
Page 20: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Draw a triangle whose circumcenter is outside of the triangle

Page 21: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Triangulation such that every circumcenter is empty

Page 22: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Triangulation such that every circumcenter is empty

Page 23: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Brute Force Algorithm??

Page 24: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Brute Force Algorithm??

Page 25: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie

Line Segment Intersection

Triangle Circumcenter

JSON / Visual Debugging

Page 26: Lecture 3: Line Segment Intersection, Circumcenters...Line Segment Intersection Triangle Circumcenter JSON / Visual Debugging t(d-c) c(0.5, o, 0) Title COMPSCI/MATH 290-04 Author ctralie