{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

RelativeResourceManager

# RelativeResourceManager - 1D04 Lab 2 Part 2 page 1 Consider...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1D04 Lab 2 Part 2 page 1 Consider two line segments as shown in the figure: We want to find out whether the two line segments intersect or not. If they do intersect, we need to find the point of intersection, (r, s). Modeling the lines by the usual equation y = mx + c leads to a large number of special cases. (What are they?) Once we discover this, one way to proceed (a good way), is to see if a different formulation is better. An alternative formulation is: x = x 1 + α t y = y 1 + β t and we restrict t such that 0 ≤ t ≤ 1, so that t = 0 ⇒ x = x 1 , y = y 1 , and t = 1 ⇒ x = x 2 , y = y 2 We can use this formulation as follows. 1D04 Lab 2 Part 2 page 2 We have two lines, so also set x = u 1 + φ z y = v 1 + θ z and we restrict z such that 0 ≤ z ≤ 1, so that z = 0 ⇒ x = u 1 , y = v 1 , and z = 1 ⇒ x = u 2 , y = v 2 Then α = x 2- x 1 β = y 2- y 1 φ = u 2- u 1 θ = v 2- v 1 So, x = x 1 + (x 2- x 1 ) t y = y 1 + (y 2- y 1 ) t and x = u 1 + (u 2- u 1 ) z y = v 1 + (v 2...
View Full Document

{[ snackBarMessage ]}

### Page1 / 10

RelativeResourceManager - 1D04 Lab 2 Part 2 page 1 Consider...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online