104 views

Skip to first unread message

May 12, 2014, 12:43:01 AM5/12/14

to

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

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

May 12, 2014, 10:27:33 PM5/12/14

to

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}]]

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}]]

May 12, 2014, 10:26:11 PM5/12/14

to

Using John Browne's Grassmann algebra application and with the three points

at Cartesian coordinates {ax, ay, az}, {bx, by, bz}, and {cx, cy, cz} I

calculated the center of the circle at:

{x -> -(4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 - bz^2) (-by cx +

ay (-bx + cx) + ax (by - cy) + bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 - bx^2 -

by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))))/(-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz + ay (-bz + cz)))),

y -> (-2 (ax^2 + ay^2 + az^2 - bx^2 - by^2 - bz^2) (bz - cz) +

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2) + (4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 -

bz^2) (-by cx + ay (-bx + cx) + ax (by - cy) +

bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 -

bx^2 - by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)))))/(-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx -

bx cy + ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz +

ay (-bz + cz)))))/(4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz))),

z -> (-az^2 by + by cx^2 + az^2 cy - bx^2 cy - by^2 cy - bz^2 cy +

by cy^2 + ax^2 (-by + cy) + ay^2 (-by + cy) + by cz^2 +

ay (bx^2 + by^2 + bz^2 - cx^2 - cy^2 - cz^2))/(2 (-bz cy +

az (-by + cy) + ay (bz - cz) + by cz)) + ((-by cx +

ay (-bx + cx) + ax (by - cy) +

bx cy) (4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 -

bz^2) (-by cx + ay (-bx + cx) + ax (by - cy) +

bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 - bx^2 -

by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)))))/((az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx -

bx cy + ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz +

ay (-bz + cz)))))}

I have a notebook on it but it uses the GrassmannCalculus and Presentations

Applications. Presentations has Circle3D and Disk3D primitives. The notebook

also calculates and displays random cases.

David Park

djm...@comcast.net

http://home.comcast.net/~djmpark/index.html

at Cartesian coordinates {ax, ay, az}, {bx, by, bz}, and {cx, cy, cz} I

calculated the center of the circle at:

{x -> -(4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 - bz^2) (-by cx +

ay (-bx + cx) + ax (by - cy) + bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 - bx^2 -

by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))))/(-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz + ay (-bz + cz)))),

y -> (-2 (ax^2 + ay^2 + az^2 - bx^2 - by^2 - bz^2) (bz - cz) +

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2) + (4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 -

bz^2) (-by cx + ay (-bx + cx) + ax (by - cy) +

bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 -

bx^2 - by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)))))/(-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx -

bx cy + ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz +

ay (-bz + cz)))))/(4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz))),

z -> (-az^2 by + by cx^2 + az^2 cy - bx^2 cy - by^2 cy - bz^2 cy +

by cy^2 + ax^2 (-by + cy) + ay^2 (-by + cy) + by cz^2 +

ay (bx^2 + by^2 + bz^2 - cx^2 - cy^2 - cz^2))/(2 (-bz cy +

az (-by + cy) + ay (bz - cz) + by cz)) + ((-by cx +

ay (-bx + cx) + ax (by - cy) +

bx cy) (4 (az (by - cy) + bz cy - by cz +

ay (-bz +

cz)) (-(ax^2 + ay^2 + az^2 - bx^2 - by^2 -

bz^2) (-by cx + ay (-bx + cx) + ax (by - cy) +

bx cy) -

2 (az - bz) (az by cx - ay bz cx - az bx cy + ax bz cy +

ay bx cz - ax by cz)) - (2 (ax^2 + ay^2 + az^2 - bx^2 -

by^2 - bz^2) (bz - cz) -

2 (az - bz) (bx^2 + by^2 + bz^2 - cx^2 - cy^2 -

cz^2)) (-2 (ay - by) (ay (bx - cx) + by cx - bx cy +

ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)))))/((az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (-4 (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz)) (-2 (ay - by) (ay (bx - cx) + by cx -

bx cy + ax (-by + cy)) -

2 (az - bz) (az (bx - cx) + bz cx - bx cz +

ax (-bz + cz))) +

4 (az (by - cy) + bz cy - by cz +

ay (-bz + cz)) (2 (ax - bx) (-by cx + ay (-bx + cx) +

ax (by - cy) + bx cy) +

2 (az - bz) (az (by - cy) + bz cy - by cz +

ay (-bz + cz)))))}

I have a notebook on it but it uses the GrassmannCalculus and Presentations

Applications. Presentations has Circle3D and Disk3D primitives. The notebook

also calculates and displays random cases.

David Park

djm...@comcast.net

http://home.comcast.net/~djmpark/index.html

May 14, 2014, 5:25:57 AM5/14/14

to

Is the Grassmann Calculus notebook to which you refer currently included with your Grassmann Algebra package? If not, how can one obtain it?

[David: Please reply privately as well as to this group. Thanks]

Murray Eisenberg mur...@math.umass.edu

Mathematics & Statistics Dept.

Lederle Graduate Research Tower phone 240 246-7240 (H)

University of Massachusetts

710 North Pleasant Street

Amherst, MA 01003-9305

[David: Please reply privately as well as to this group. Thanks]

Mathematics & Statistics Dept.

Lederle Graduate Research Tower phone 240 246-7240 (H)

University of Massachusetts

710 North Pleasant Street

Amherst, MA 01003-9305

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu