center3P
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.0, Creation date: 2010-09-10, Last change: 2025-09-14
Center line of a cylinder given by 3 points
Description
[T,r] = center3P(p1,p2,p3) returns a straight line that is the center of alle 3 points, i.e. each point of the line has the same distance to all threes point. The Origin of T is the point with the minimum distance to p1, p2, p3. r is the distance to all points.
Changed Algorithm on 2017-06-25
See Also: center4P
, tangente
, centerVL
, centerPL
, cross4P
Example Illustration
Syntax
[T,r,cp]=center3P(p1,p2,p3)
Input Parameter
p1: | | Point 1 of the circle or cylinder, or Vertex List |
p2: | | Point 2 of the circle or cylinder |
p3: | | Point 3 of the circle or cylinder |
Output Parameter
T: | | Matrix of a cylinder center line |
r: | | Radius of a cylinder |
cp: | | center point = T(1:3,4) |
Examples
center3P([1 0 0],[0 1 0],[0 0 1])
[a,b,c]=center3P([1 0 0],[0 1 0],[0 0 1])
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
Last html export of this page out of FM database by TL: 2025-09-21