2
$\begingroup$

In this code, how can I draw the circle is intersection of the plane A1A2A3 and sphere?

Clear["Global`*"];
n = 8;
a = 2;
b = 6;
R = a/(2 Sin[Pi/n]);
h = Sqrt[b^2 - R^2];
verticesBase = 
  Table[{R Cos[2 Pi k/n], R Sin[2 Pi k/n], 0}, {k, 0, n - 1}];
vertexTop = {0, 0, h};
circumsphere = 
  Circumsphere[{vertexTop, verticesBase[[1]], verticesBase[[2]], 
    verticesBase[[3]]}];
Graphics3D[{Opacity[0.6], LightOrange, EdgeForm[{Black, Thin}], 
  Table[Polygon[{verticesBase[[k]], verticesBase[[Mod[k, n] + 1]], 
     vertexTop}], {k, 1, n}], Yellow, Polygon[verticesBase], 
  Text[Style["S", 14, Bold, Black], vertexTop + {0, 0, 0.2}], 
  Table[Text[Style["A" <> ToString[k], 14, Bold, Black], 
    verticesBase[[k]] + {0, 0, -0.2}], {k, 1, n}], Opacity[0.4], 
  LightOrange, Sphere[circumsphere[[1]], circumsphere[[2]]]}, 
 Boxed -> False, Axes -> False]

Graphics3D

$\endgroup$

1 Answer 1

3
$\begingroup$
Region[Style[
  RegionIntersection[InfinitePlane[verticesBase[[1 ;; 3]]], 
   circumsphere], Directive@{Thick, Red}]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.