Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.soft-sys.math.mathematica > #16945

Re: Cirlce in 3D?

From Ray Koopman <koopman@sfu.ca>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Cirlce in 3D?
Date 2014-05-13 02:27 +0000
Message-ID <lkrvul$30$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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@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.)

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

Re: Cirlce in 3D? Ray Koopman <koopman@sfu.ca> - 2014-05-13 02:27 +0000

csiph-web