Syntax
[x,y]=tangente(x0,y0,x1,y1,R)
Input Parameter
x0 : | | x of circle center |
y0 : | | y of x of circle center |
x1 : | | x of interest point |
y1 : | | x of interest point |
R : | | Radius of circle |
Output Parameter
x : | | of a circle touch |
y : | | of a circle touch |
Copyright 2010-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
Algorithm (Workflow)
This function, named tangente
, is designed to calculate the point of tangency on a circle given a circle's center, a point of interest, and the circle's radius. The function is part of the SG-Library and was created by Tim Lueth.
Input Parameters
- x0: The x-coordinate of the circle's center.
- y0: The y-coordinate of the circle's center.
- x1: The x-coordinate of the point of interest.
- y1: The y-coordinate of the point of interest.
- R: The radius of the circle.
Output Results
- x: The x-coordinate of the point where the tangent touches the circle.
- y: The y-coordinate of the point where the tangent touches the circle.
Algorithm Steps
- Calculate the difference in x-coordinates between the point of interest and the circle's center:
dx = x1 - x0
.
- Calculate the difference in y-coordinates between the point of interest and the circle's center:
dy = y1 - y0
.
- Compute a constant
C
using the formula: C = R*R + x0*dx + y0*dy
.
- Calculate the x-coordinate of the tangent point using:
x = x0 + [R; 0; 0]
.
- Set the y-coordinate of the tangent point to the y-coordinate of the circle's center:
y = y0
.
The function appears to be incomplete or incorrectly implemented, as the calculation for the tangent point is not fully defined. The output x
is calculated using a vector addition that seems incorrect, and y
is simply set to y0
, which does not reflect a proper tangent calculation.
Algorithm explaination created using ChatGPT on 2025-08-18 22:14. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21