tangent_points_to_circle_xy
- compas.geometry.tangent_points_to_circle_xy(circle, point)[source]
Calculates the tangent points on a circle in the XY plane.
- Parameters:
- circle[plane, float]
Plane and radius of the circle.
- point[float, float] or [float, float, float] |
compas.geometry.Point
XY(Z) coordinates of a point in the xy plane.
- Returns:
- tuple[[float, float, 0.0], [float, float, 0.0]]
the tangent points on the circle.
Examples
>>> from compas.tolerance import TOL >>> circle = ((0, 0, 0), (0, 0, 1)), 1.0 >>> point = (2, 4, 0) >>> t1, t2 = tangent_points_to_circle_xy(circle, point) >>> TOL.is_allclose(t1, [-0.772, 0.636, 0.000], atol=1e-3) True >>> TOL.is_allclose(t2, [0.972, -0.236, 0.000], atol=1e-3) True