tangente

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.0, Creation date: 2010-11-20, Last change: 2025-09-14

returns the point for a tangente

Description

used only in exp_2010_11_20

See Also: center3P , center4P

Example Illustration

 missing image of tangente(x0,y0,x1,y1,R)

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

Output Results

Algorithm Steps

  1. Calculate the difference in x-coordinates between the point of interest and the circle's center: dx = x1 - x0.
  2. Calculate the difference in y-coordinates between the point of interest and the circle's center: dy = y1 - y0.
  3. Compute a constant C using the formula: C = R*R + x0*dx + y0*dy.
  4. Calculate the x-coordinate of the tangent point using: x = x0 + [R; 0; 0].
  5. 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