3
$\begingroup$

How to plot an octahedron inside a sphere and the same sphere inside a cube in 3d?

$\endgroup$
  • 1
    $\begingroup$ Take a look at PolyhedronData and GeometricTransform. Have you tried anything? $\endgroup$ – Kuba Aug 12 at 11:35
  • $\begingroup$ I tried in graphics 3D for the circumsphere of octahedron. But the output is saying octahedron is not a graphic 3d primitive.I did not understand this. $\endgroup$ – Sunita Aug 12 at 11:42
  • 2
    $\begingroup$ Hard do say anything without a code sample. Also, make sure you went through examples in documentation I mentioned. $\endgroup$ – Kuba Aug 12 at 11:55
9
$\begingroup$

Try

Graphics3D[{Opacity[.25], PolyhedronData["Octahedron", "Faces"],Sphere[{0, 0, 0}, 1/Sqrt[2]],Cuboid[1/Sqrt[2] {-1, -1, -1}, 1/Sqrt[2] {1, 1, 1}]}]

enter image description here

$\endgroup$
4
$\begingroup$
cs = Circumsphere @ Octahedron[];

cuboid = Cuboid @@ Transpose[RegionBounds[cs]];

Graphics3D[{Opacity[0.6, Red], Octahedron[],
  Opacity[.4, Blue], cs, 
  Opacity[.4, Yellow], cuboid}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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