Upload
others
View
17
Download
1
Embed Size (px)
Citation preview
Lecture 3: Line Segment Intersection, Circumcenters
More Slides Now
Mini Assignment 1 Part 1 Due SundaySubmit README
Part 2 Changed to 2D!
Refresh Page
Piazza
http://www.piazza.com/duke/spring2016/compsci29004/home
Ditching Daily BQOTD
Line Segment Intersection
Triangle Circumcenter
JSON / Visual Debugging
Let’s do lines first……
Want: a + s u = b + t v
Want: a + s u = b + t v
This means
(1) ax + sux = bx + t vx
(2) ay + suy = by + t vy
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
(1) sux - tvx = bx - ax
(2) suy - tvy = by - ay
What happens if lines parallel?
a + s(b-a) = b + t(d-c)
Need
0 <= t <= 1
0 <= s <= 1
What if vertical line?
What if very close to vertical line?
Line Segment Intersection
Triangle Circumcenter
JSON / Visual Debugging
p + R(1, 0)cos(theta) + R(0,1)sin(theta)
How many degrees of freedom?
Draw a triangle whose circumcenter is outside of the triangle
Triangulation such that every circumcenter is empty
Triangulation such that every circumcenter is empty
Brute Force Algorithm??
Brute Force Algorithm??
Line Segment Intersection
Triangle Circumcenter
JSON / Visual Debugging