<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
               "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
  <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../../../comsci/css/s011.css"/>
<link rel='SHORTCUT ICON' href='../../../comsci/images/FrameHome.ico' />
<style type="text/css">
</style>
<title> Centroid, Circumcenter, Orthocenter Generalized
 </title>
</head>
<body>

<div class="message_right">
  <a href="http://validator.w3.org/check/referer">
    <img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid
	XHTML 1.1!" height="31" width="88" />
  </a>

  <a href="http://jigsaw.w3.org/css-validator/">
    <img style="width:88px;height:31px"
       src="http://jigsaw.w3.org/css-validator/images/vcss" 
       alt="Valid CSS!" />
  </a>
  <br/>
  Created 2005-04-18 &nbsp; Modified 
<!--UPDATE_DATE_MODIFIED-->
<!--UPDATE_DATE_BEGIN-->
2007-01-01
<br/>
<a href="mailto:chelton.evans@yahoo.com">Chelton Evans</a>
<!--UPDATE_DATE_END-->
</div>


<h1> 
<a href="geom.html"> <img alt="proj" src="../../../comsci/images/compgeom.png" /></a>
Centroid, Circumcenter, Orthocenter Generalized
<a href="../../../../index.html">
<img alt="home" src="../../../comsci/images/Frame.gif" /> </a>
</h1>

<p>
<a href="#Intro">Intro</a><br/>
<a href="#Centers_Inside_and_Outside_the_Triangle">Centers Inside and Outside the Triangle</a><br/>
<a href="#The_Circumcenter_Generalized"> The Circumcenter Generalized </a> <br/>
<a href="#The_Inner_Circle"> The Inner Circle</a><br/>
<a href="../../../misc/proj/primshpcenters/doc.html">C++ Primitive Shape Centers</a> <br/>
<a href="#Sphere_Through_Four_Points">
  Sphere Through Four Points</a><br/>
<a href="#Tetrahedron_Centers">Tetrahedron Centers</a><br/>

</p>

<div class="float25">
<a id="Intro"> </a>
<h2>Intro</h2>

<p>
These are classical things about triangles centers - well
 that is when they are within the triangle.  If we relax the
 condition that the centers need not reside in the triangle
 then they generalize from triangles to tetrahedrons.
</p>

</div>

<div class="float25">
<p>There appears to be four kinds of centers : the centroid, circumcenter, 
 orthocenter and inner circle center.  The average(centroid) and the 
 bisector(inner circle) are always inside the triangle, in the other two
 this may not be the case.

</p>
</div>

<div class="spacer" />

<div class="float25">
<a id="Centers_Inside_and_Outside_the_Triangle"></a>
<h2>Centers Inside and Outside the Triangle</h2>

<img src="diagg02702.png" alt="diagg02702.png" />

</div>

<div class="float25">

<p>
Here you can see things are going wrong. While the average or centroid
 is within the triangle the other centers are not.  However they are all
 meeting at a unique point!
</p>


<img src="diagg02701.png" alt="diagg02701.png" />


</div>

<div class="spacer" />

<div class="float25">
<a id="The_Circumcenter_Generalized"> </a>
<h2> The Circumcenter Generalized </h2>

<p>The circumcenter is defined as the point where the other
 vertexes are of equal distance away.  So in 2D its the center
 of a circle, where the circle goes through three points.
 In 3D its the center of a sphere which goes through four points.
</p>


<p>
An easy way to calculate this is in 2D is with vectors. 
Make two lines
 at right angles and in same plane as the triangle, find their
 intersection where the lines go through the midpoints.
 The vectors work in 3D with the same reasoning and using
 crossproducts to get perpendicular vectors.
</p>

<p>
 To show
 that this is unique look at the equations. Since there are as 
 many equations as unknowns there is always one and only one 
 unique solution.
</p>

<p class="equ">
Unknown variables 
<math xmlns="&mathml;">
  <mi>r</mi>
</math>, 
<math xmlns="&mathml;">
  <mi>x</mi>
</math>,<math xmlns="&mathml;">
  <mi>y</mi>
</math>
<br/>
<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>a</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mo>(</mo>
  <mi>a</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>=</mo>
  <mi>r</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  
</math>
<br/>


<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>b</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mo>(</mo>
  <mi>b</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>=</mo>
  <mi>r</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  
</math>
<br/>


<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>c</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mo>(</mo>
  <mi>c</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>x</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>=</mo>
  <mi>r</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  
</math>
<br/>
for the points <br/>
<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>x</mi>
  <mo>,</mo>
  <mi>y</mi>
  <mo>)</mo>
</math>,
 
<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>a</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>,</mo>
  <mi>a</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>)</mo>
</math>,

<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>b</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>,</mo>
  <mi>b</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>)</mo>
</math>,

<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>c</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>,</mo>
  <mi>c</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>)</mo>
</math>

</p>

</div>

<div class="float25">
<a id="Sphere_Through_Four_Points"></a>
<h2>Sphere Through Four Points</h2>

<p> In 3D the situation is similar with a sphere through the 
 four points of the tetrahedron.
</p>

<p>
I was having difficulty solving this situation when finally a
 really simple idea occurred (after much garbage). Translate
 all the points so that one of them is at the origin.
 Solve the system and translate the solution back.
</p>

<p class="equ">
Unknown variables 
<math xmlns="&mathml;">
  <mi>r</mi>
</math>, 
<math xmlns="&mathml;">
  <mi>a</mi>
</math>,
<math xmlns="&mathml;">
  <mi>b</mi>
</math>,
<math xmlns="&mathml;">
  <mi>c</mi>
</math>
<br/>
<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>x</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>a</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mo>(</mo>
  <mi>y</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>b</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mo>(</mo>
  <mi>z</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>c</mi>
  <mo>)</mo>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>=</mo>
  <mi>r</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
</math>
<br/>
 &nbsp; &nbsp;

<math xmlns="&mathml;">
  <mi>i</mi>
  <mo>=</mo>
  <mi>0</mi>
  <mo>,</mo>
  <mi>1</mi>
  <mo>,</mo>
  <mi>2</mi>
  <mo>,</mo>
  <mi>3</mi>
</math>

</p>

<p>Translate points by X<sub>0</sub>.</p>

<p class="equ">

<math xmlns="&mathml;">
  <mi>X</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>=</mo>
  <mi>X</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>-</mo>
  <mi>X</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
</math>

<br/>
 &nbsp; &nbsp;

<math xmlns="&mathml;">
  <mi>i</mi>
  <mo>=</mo>
  <mi>1</mi>
  <mo>,</mo>
  <mi>2</mi>
  <mo>,</mo>
  <mi>3</mi>
</math>
</p>

<p>Expand the general equation out and simplify</p>

<p class="equ">
<math xmlns="&mathml;">
  <mi>x</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>-</mo>
  <mi>2</mi>
  <mi>x</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>a</mi>
  <mo>+</mo>
  <mi>a</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>

  <mo>+</mo>
  <mi>y</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>-</mo>
  <mi>2</mi>
  <mi>y</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>b</mi>
  <mo>+</mo>
  <mi>b</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>


  <mo>+</mo>
  <mi>z</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>-</mo>
  <mi>2</mi>
  <mi>z</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>c</mi>
  <mo>+</mo>
  <mi>c</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>

  <mo>=</mo>
  <mi>r</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
</math>

</p>

<p class="equ">
<math xmlns="&mathml;">
  <mfrac>
    <mrow><mi>1</mi></mrow>
    <mrow><mi>2</mi></mrow>
  </mfrac>
  <mo>(</mo>
  <mi>x</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mi>y</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>+</mo>
  <mi>z</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>)</mo>
  <mo>=</mo>
  <mi>x</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>a</mi>
  <mo>+</mo>
  <mi>y</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>b</mi>
  <mo>+</mo>
  <mi>z</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mi>c</mi>

</math>

<br/>
 &nbsp; &nbsp;

<math xmlns="&mathml;">
  <mi>i</mi>
  <mo>=</mo>
  <mi>1</mi>
  <mo>,</mo>
  <mi>2</mi>
  <mo>,</mo>
  <mi>3</mi>
</math>


</p>

<p>Solve this linear system of equations for a, b and c.
 The center is found by translating the solution back.
</p>

<p class="equ">
<math xmlns="&mathml;">
  <mo>(</mo>
  <mi>a</mi>
  <mo>,</mo>
  <mi>b</mi>
  <mo>,</mo>
  <mi>c</mi>
  <mo>)</mo>
  <mo>+</mo>
  <mi>X</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
</math>
</p>


</div>


<div class="spacer" />

<div class="float25">
<a id="The_Inner_Circle"></a>
<h2>The Inner Circle</h2>

<p>
Another measure of a triangles center is the 
 point where the smallest circle inside the
 triangle fits. This was not put in with the others
 because in classical geometry(from my very limited knowledge) 
 it does not go through the famous straight line like the others do.
 However I will at a later date read up on it and the centroids relationships.
</p>

<p>The inner circles center was found by bisecting the angles.
 As you can see these lines meet at a unique point too.
 See <a href="g001.xml#Bisecting_an_Angle_with_Ratios"> Bisecting an Angle with Ratios</a>.
</p>

</div>

<div class="float25">

<img src="diagg02703.png" alt="diagg02703.png" />

</div>


<div class="float25">
<a id="Tetrahedron_Centers"></a>
<h2>Tetrahedron Centers</h2>

<p>Clearly the centroid is a tetrahedron center.</p>

<p>Here are some other possible centers. </p>


<h3>Equilateral Tetrahedron Derived Centers</h3>

<p>Firstly I am defining an equilateral tetrahedron as
 taking a triangle and extruding it into 3D as a tetrahedron,
 the lengths of the new sides are the lengths of the
 opposite sides.
</p>

<img src="diagg02704.png" alt="diagg02704.png" />


<ul>
<li>Construct a line from the equilateral triangles opposite
 vertex to the newely constructed point. Repeat of all tetrahedron's
 triangular faces. Find the point which minimized the distance to these
 four lines. This is similar in spirit to 2D Fermat point.
</li> 

<li>Construct a line from the quilateral's centroid to the opposite
 vertex.  Repeat of all tetrahedron's
 triangular faces. Find the point which minimized the distance to these
 four lines.  This is similar in spirit to 2D Napolean point.
</li>

</ul>


</div>

</body>
</html>




