Re: Cirlce in 3D?
- To: mathgroup at smc.vnet.net
- Subject: [mg132731] Re: Cirlce in 3D?
- From: Francisco Javier GarcÃa CapitÃn <garciacapitan at gmail.com>
- Date: Thu, 15 May 2014 02:25:38 -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
- References: <10319860.232311.1399870151373.JavaMail.root@m03>
That was my approach: BisectorPlane[{ptA_, ptB_}] := Factor[({x, y, z} - ptA)^2 - ({x, y, z} - ptB)^2] == 0 Circumcenter[{ptA_, ptB_, ptC_}] := {x, y, z} /. Solve[ Map[BisectorPlane, {{ptA, ptB}, {ptB, ptC}, {ptC, ptA}}], {x, y, z}][[1]] ShowGraphic[{ptA_, ptB_, ptC_}] := Module[{ptO, vecu, vecn, vecv, k, n}, n = 100; ptO = Circumcenter[{ptA, ptB, ptC}]; vecn = Cross[ptB - ptA, ptC - ptA]; vecu = ptA - ptO; vecv = Cross[vecu, vecn] Norm[vecu]/Norm[Cross[vecu, vecn]]; instr = { PointSize[0.02], Map[Point, {ptA, ptB, ptC}], Red, Line[Table[ ptO + Cos[2 k \[Pi]/n] vecu + Sin [2 k \[Pi]/n] vecv, {k, 0, n}]], Point[ptO] }; Graphics3D[instr] ] data = {{1, 2, 3}, {3, 4, 1}, {3, 2, 1}}; Circumcenter[data] {2, 3, 2} ShowGraphic[data] 2014-05-14 11:25 GMT+02:00 Murray Eisenberg <murray at math.umass.edu>: > 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] > > On May 12, 2014, at 10:25 PM, djmpark <djmpark at comcast.net> wrote: > > > 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 > > djmpark at comcast.net > > http://home.comcast.net/~djmpark/index.html > > > > > > > > From: Ste[hen Gray [mailto:stevebg at roadrunner.com] > > > > 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.) > > > > > > Murray Eisenberg murray at 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 > > > > > > > > -- --- Francisco Javier Garc=C3=ADa Capit=C3=A1n http://garciacapitan.99on.com