crosscircline

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 4.2, Creation date: 2018-08-06, Last change: 2025-09-14

returns the cross points of a circle and a straight line

Description

The solution was created using the Symbolics toolbox. Therefor, the solutions may not correspond.
syms cx cy w R y0 k y1 x0 k x1
r=solve(cx + cos (w) * R ==y0 + k * y1, cy +sin (w) * R == x0 + k * x1,k,w,'Real',true)


See Also: tangent2circ , cross2circ , PLof3dist , PLchordof2PR , crossz , PLcross2Lines

Example Illustration

 missing image of crosscircline(C,R,p,ez)

Syntax

[P,K,W]=crosscircline(C,R,p,ez)

Input Parameter

C: Center of circle [x y]
R: Radius of circle
p: point on straight line
ez: direction of straight line

Output Parameter

P: List of 2 Points
K: List of 2 K values
W: List of two angle

Examples


testfunctTL('crosscircline([0 0],4,[#1 #2],[.5 1])',[-5 5],[-3 2]);
testfunctTL('crosscircline([0 0],6,[#1 #2],[.5 1])',[-5 5],[-3 2]);
crosscircline([0 0],4,[0 2],[1 1]) % two solutions
crosscircline([0 0],4,[5 5],[1 1]) % two solutions
crosscircline([0 0],4,[4 10],[0 1]) % one Solution
crosscircline([0 0],4,[5 10],[0 1]) % No Solution




Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21