Chapter 10. Trigonometric and Geometric Functions
In this chapter
Calculating Point and Line Intersections
Calculating Slope
Calculating Point and Arc Intersections
Next Steps
Chapter 9,"Object Bounds Checking," showed the necessity of accurately selecting graphic objects created by the editor and the frailty of using solely the bounds of the object for making the determination of selection. This chapter reviews the mathematics required for a more precise selection algorithm.
Chapter 9 discussed the objects of the editor as being point-array–based or as being an arc. We first consider the intersection of a point and a line.
Calculating Point and Line Intersections
Objects created by our editor that are defined as an array of points can be ...
Get X Window Programming from Scratch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.