def intersectChordCircle(C, P, chord_length):
'''
Accepts center of circle, a point on the circle, and chord length.
Returns a list of two points on the circle at chord_length distance away from original point
'''
C = dPnt(C)
P = dPnt(P)
d = chord_length
r = distance(C, P)
# point on circle given chordlength & starting point=2*asin(d/2r)
d_div_2r = d / (2.0 * r)
angle = 2 * asin(d_div_2r)
P = []
P.append(polar(C, r, angle))
P.append(polar(C, r, - angle))
return P
#def tangentOnCircleFromPoint(C, r, P):
评论列表
文章目录