Abstract
Publisher Summary This chapter presents an algorithm to find the beginning angle and the angle subtended by the arc and the direction in which the arc is drawn. The method described in the chapter involves finding the equation in the form ax + by + c = 0 for each line. The center of the constructed arc, Pc, must lie at a distance r from both lines. The signed distance d1 is determined from I1 to the midpoint of I2 and d2 from I2 to the midpoint of I1. The midpoints are used because, in practice, one point may be common to both lines. The signs of d1 and d 2 determine on which sides of the respective lines the arc center Pc resides. The signed distances are computed in the line-to-point procedure. The line may be extended or clipped at points q1 and q2, so the end points of the line nearest the point of intersection of I1 and I2 can coincide with the end points of the arc.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have