MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Cirlce in 3D?


c33 returns the center of a circle thru 3 points in 3 dimensions.

c33[{p1_,p2_,p3_}] := With[{q1 = p1-p3, q2 = p2-p3, q3 = p1-p2},
p3 + ((q2.q2)*(q3.q1)*q1 - (q1.q1)*(q3.q2)*q2)/(2 #.# & @ Cross[q1,q2])]

c33 is a closed-form version of c3n, which returns 
the center of a circle thru 3 points in n dimensions.

c3n[{p1_,p2_,p3_}] := Block[{q1 = p1-p3, q2 = p2-p3, c,w1,w2},
c = w1*q1 + w2*q2; p3 + c /. Flatten@Solve[
{c.c == #.#&[q1-c], c.c == #.#&[q2-c]},{w1,w2}]]

----- Ste[hen Gray <stevebg at roadrunner.com> wrote:
> I'm looking for a neat formula to find the center of a circle in 3D 
> through 3 points. I also need a good way to display it, preferably 
> thickened so I can show several and see whether they are linked, etc. To 
> my surprise I did not find anything on the Wolfram sites about these 
> problems. (I have Mathematica 7, if that matters.)



  • Prev by Date: Re: DSolve test
  • Next by Date: Re: DSolve test
  • Previous by thread: Re: Cirlce in 3D?
  • Next by thread: Re: Cirlce in 3D?