center4P
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.0, Creation date: 2010-09-12, Last change: 2025-09-14
Center and diameter of a sphere given by 4 points
Description
[p,r,w] = center4P(p1,p2,p3,p4) returns center p and radius r of a sphere given by 4 surface points. w ist the angle between the two straight lines which are the crossing lines of two intesection planes. If w is about zero or w is about pi, then the result is not a defined point but an straight line, i.d. there are infinity solutions. In this there is a symmetrie between the surface points.
See Also: center3P
, tangente
, centerVL
, centerPL
Example Illustration
Syntax
[px,rx]=center4P(p1,p2,p3,p4)
Input Parameter
p1: | | Point 1 of the sphere |
p2: | | Point 2 of the sphere |
p3: | | Point 3 of the sphere |
p4: | | Point 4 of the sphere |
Output Parameter
px: | | position of the spheres origin |
rx: | | radius of the sphere |
Examples
P=VLnorm(rand(4,3)-0.5)*8; close all; center4P(P(1,:),P(2,:),P(3,:),P(4,:))
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