MathGroup Archive 2014

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

Search the Archive

Re: Cirlce in 3D?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132727] Re: Cirlce in 3D?
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Mon, 12 May 2014 22:27:14 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

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?