Skip to main content
deleted 55 characters in body
Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80

The center of a circle in 3D can be calculated from equations of (squared) distances and coplanar requirement. This method does not suffer from producing too complicated formulas that are hard to simplify.

I am not sure why method in another OP question produces such convoluted formulas (although they are correct too).

Q = (2 - Sqrt[2])/4;
    
aa = {r/Sqrt[
          3]*(Sqrt[2]*Q*(2 - U^2) + 2 - Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2),
        r/Sqrt[1]*((c*(Q - 1) - 1)*U)/(Q*(2 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(2 - U^2) + 2 - 
           Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2)};
    
bb = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 3 - 1/2*c*(1 + U^2))/(Q*(1 - U^2) - 2),
        r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2)*(1 + 2*c*Q) + 2*c)/(Q*(1 - U^2) - 2)};
    
cc = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 1 + 
           c*(Sqrt[2]*Q*(1 - U^2) + 1))/(Q*(1 - U^2) - 2), 
       r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2) + 4 + 
           c*((1/2 + Q)*(1 - U^2) - 2))/(Q*(1 - U^2) - 2)};

circleCenter[a_, b_, c_] := 
 Block[{dist = 
    SquaredEuclideanDistance @@@ 
      Tuples[{{aa, bb, cc}, {{x, y, z}}}] /. 
     Abs -> Identity, eq}, 
  eq = Equal @@ dist && CoplanarPoints[{a, b, c, {x, y, z}}];
  SolveValues[eq, {x, y, z}]]][[1]]]

Factor[#, Extension -> Sqrt[2]] & /@ 
  circleCenter[aa, bb, cc] // FullSimplify

enter image description here

The center of a circle in 3D can be calculated from equations of (squared) distances and coplanar requirement. This method does not suffer from producing too complicated formulas that are hard to simplify.

I am not sure why method in another OP question produces such convoluted formulas (although they are correct too).

Q = (2 - Sqrt[2])/4;
    
aa = {r/Sqrt[
          3]*(Sqrt[2]*Q*(2 - U^2) + 2 - Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2),
        r/Sqrt[1]*((c*(Q - 1) - 1)*U)/(Q*(2 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(2 - U^2) + 2 - 
           Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2)};
    
bb = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 3 - 1/2*c*(1 + U^2))/(Q*(1 - U^2) - 2),
        r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2)*(1 + 2*c*Q) + 2*c)/(Q*(1 - U^2) - 2)};
    
cc = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 1 + 
           c*(Sqrt[2]*Q*(1 - U^2) + 1))/(Q*(1 - U^2) - 2), 
       r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2) + 4 + 
           c*((1/2 + Q)*(1 - U^2) - 2))/(Q*(1 - U^2) - 2)};

circleCenter[a_, b_, c_] := 
 Block[{dist = 
    SquaredEuclideanDistance @@@ 
      Tuples[{{aa, bb, cc}, {{x, y, z}}}] /. Abs -> Identity, eq},
  eq = Equal @@ dist && CoplanarPoints[{a, b, c, {x, y, z}}];
  SolveValues[eq, {x, y, z}]]

Factor[#, Extension -> Sqrt[2]] & /@ 
  circleCenter[aa, bb, cc] // FullSimplify

enter image description here

The center of a circle in 3D can be calculated from equations of (squared) distances and coplanar requirement. This method does not suffer from producing too complicated formulas that are hard to simplify.

I am not sure why method in another OP question produces such convoluted formulas (although they are correct too).

Q = (2 - Sqrt[2])/4;

aa = {r/Sqrt[
      3]*(Sqrt[2]*Q*(2 - U^2) + 2 - Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2),
    r/Sqrt[1]*((c*(Q - 1) - 1)*U)/(Q*(2 - U^2) - 2), 
   r/Sqrt[6]*(Sqrt[2]*Q*(2 - U^2) + 2 - 
       Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2)};

bb = {r/Sqrt[
      3]*(Sqrt[2]*Q*(1 - U^2) + 3 - 1/2*c*(1 + U^2))/(Q*(1 - U^2) - 2),
    r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
   r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2)*(1 + 2*c*Q) + 2*c)/(Q*(1 - U^2) - 2)};

cc = {r/Sqrt[
      3]*(Sqrt[2]*Q*(1 - U^2) + 1 + 
       c*(Sqrt[2]*Q*(1 - U^2) + 1))/(Q*(1 - U^2) - 2), 
   r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
   r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2) + 4 + 
       c*((1/2 + Q)*(1 - U^2) - 2))/(Q*(1 - U^2) - 2)};

circleCenter[a_, b_, c_] := 
 Block[{dist = 
    SquaredEuclideanDistance @@@ Tuples[{{aa, bb, cc}, {{x, y, z}}}] /. 
     Abs -> Identity, eq}, 
  eq = Equal @@ dist && CoplanarPoints[{a, b, c, {x, y, z}}];
  SolveValues[eq, {x, y, z}][[1]]]

Factor[#, Extension -> Sqrt[2]] & /@ 
  circleCenter[aa, bb, cc] // FullSimplify

enter image description here

Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80

The center of a circle in 3D can be calculated from equations of (squared) distances and coplanar requirement. This method does not suffer from producing too complicated formulas that are hard to simplify.

I am not sure why method in another OP question produces such convoluted formulas (although they are correct too).

Q = (2 - Sqrt[2])/4;
    
aa = {r/Sqrt[
          3]*(Sqrt[2]*Q*(2 - U^2) + 2 - Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2),
        r/Sqrt[1]*((c*(Q - 1) - 1)*U)/(Q*(2 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(2 - U^2) + 2 - 
           Sqrt[2]/4*c*U^2)/(Q*(2 - U^2) - 2)};
    
bb = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 3 - 1/2*c*(1 + U^2))/(Q*(1 - U^2) - 2),
        r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2)*(1 + 2*c*Q) + 2*c)/(Q*(1 - U^2) - 2)};
    
cc = {r/Sqrt[
          3]*(Sqrt[2]*Q*(1 - U^2) + 1 + 
           c*(Sqrt[2]*Q*(1 - U^2) + 1))/(Q*(1 - U^2) - 2), 
       r/Sqrt[1]*(-(1 + c)*U)/(Q*(1 - U^2) - 2), 
       r/Sqrt[6]*(Sqrt[2]*Q*(1 - U^2) + 4 + 
           c*((1/2 + Q)*(1 - U^2) - 2))/(Q*(1 - U^2) - 2)};

circleCenter[a_, b_, c_] := 
 Block[{dist = 
    SquaredEuclideanDistance @@@ 
      Tuples[{{aa, bb, cc}, {{x, y, z}}}] /. Abs -> Identity, eq},
  eq = Equal @@ dist && CoplanarPoints[{a, b, c, {x, y, z}}];
  SolveValues[eq, {x, y, z}]]

Factor[#, Extension -> Sqrt[2]] & /@ 
  circleCenter[aa, bb, cc] // FullSimplify

enter image description here