Skip to content

thomashoullier/simplex-circumsphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplex circumsphere

simplex-circumsphere implements the computation of the n-simplex circumsphere.

A writeup may be found on my website [6].

Usage

center-radius vertices => center radius

Compute the center coordinates and radius of the simplex circumsphere given its vertices.

  • vertices: Array of vertices coordinates, eg #(#(1 1) #(5 1) #(1 4))
  • center: Array of coordinates, eg #(3 5/2)
  • radius: Radius of the circumsphere, eg 2.5

Will return nil if the simplex is degenerate.

Dependencies

Test

Launch tests with:

(asdf:test-system "simplex-circumsphere")

I used the nice Geogebra sample by Steve Phelps to generate a test case for a tetrahedron [1].

Further discussion

There is an alternative method for the simplex circumsphere highlighted by Westendorp [3] from a work by Coxeter [5]. It involves the inverse of the matrix used in the Cayley-Menger determinant (which is the volume of a simplex [4]). I believe the method I implemented is more efficient than this alternative method if we start from a set of vertices coordinates (please refer to the writeup [6]).

References

  1. Simplex circumsphere in Geogebra by Steve Phelps
  2. Gautam Manohar: Inspheres and Circumspheres of Simplices
  3. G. Westendorp: A formula for the N-circumsphere of an N-simplex
  4. Wikipedia: Cayley-Menger determinant
  5. H. S. M. Coxeter, “The Circumradius of the General Simplex,” The Mathematical Gazette 15(210), 229–231 (1930). DOI
  6. n-Simplex circumsphere writeup

About

n-simplex circumsphere computation

Topics

Resources

License

Stars

Watchers

Forks