PDA

View Full Version : Sphere Center of four point

 claudiof02-19-2009, 06:28 PMI have 4 particles randomly. I wantto get a point that distance are all same with these each of four point . by another way to describe : I have 4 points.And I need a sphere center coordinates that these 4 points are on these sphere surface.(thus each these 4 point to center point distance are all same) is there a fast way to do this ? or I have to code hundreds of codes
BigRoyNL
02-20-2009, 08:17 AM
If you have four points generated randomly there's a chance (even bigger chance in 2d) that it's impossible to draw a 'circle'/'sphere' through all these points.. Like when the points are in 'one' line. Or when three points are in one line..

This is important to remember and understand.

Dontnoun
02-20-2009, 08:24 AM
if three point of them, position in one line, you can not get result in theory ,
I would rather do it like this
create a sphere,
create four point on sphere surface,then rand them position on surface

claudiof
02-20-2009, 12:38 PM
and my problem starts here.
because there is no sphere.
there is 4 points (randomly) waits me to built a sphere by using all of them.
(a point as a sphere center that each distance of these 4 points must be same)

tbaypaul
02-20-2009, 04:13 PM
got my solution via this page....sorry unable to share. But all you have to do is form the cofactor matrices and solve for their determinant.......

http://local.wasp.uwa.edu.au/~pbourke/geometry/spherefrom4/

claudiof
02-20-2009, 09:51 PM