Message Boards Message Boards

0
|
3433 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Merge two cubes. (Cuboctahedron)

Posted 3 years ago
POSTED BY: Brian OBrien
5 Replies
Posted 3 years ago

An example of applying rotation:

cuboctas = Table[
    Rotate[PolyhedronData["Cuboctahedron", "Polyhedron"], i Degree, {0, 0, 1}],
    {i, 0, 90, 15}
  ];

Manipulate[
    Graphics3D[cuboctas[[angle]], Axes -> True, PlotRange -> 1.1],
    {{angle, 1}, {1 -> 0, 2 -> 15, 3 -> 30, 4 -> 45, 5 -> 60, 6 -> 75, 7 -> 90}, SetterBar},
    SaveDefinitions -> True
 ]

See also the functions Scale and Translate

POSTED BY: Hans Milton
Posted 3 years ago

Thank you! Unlike the Cylinder method which you can supply additional parameters, the Polyhydron method seems to lack constructors, how does one apply a scale and rotation to this object at construction?

I was afraid to say that the return type seems typeless... but it does. I am relieved to here it does have a type... but why am i not seeing that in the documentation the method? Am i missing something?

POSTED BY: Brian OBrien
Posted 3 years ago
POSTED BY: Hans Milton
Posted 3 years ago

The following code shows a ball being combined with a cylinder. I need to change the ball to the Cuboctahedron. This section of code works:

cy = Cylinder[{{-1, 0, 0}, {1, 0, 0}}, .25];
ba = Ball[{0, 0, 0}, 1];
sc = PolyhedronData["Cuboctahedron"];
rd = RegionDifference[ba, cy];
o = RegionPlot3D[rd, PlotPoints -> 42]

However this code fails:

rd = RegionDifference[sc, cy];
o = RegionPlot3D[rd, PlotPoints -> 42]

And I don't know why.

POSTED BY: Brian OBrien
Posted 3 years ago

Maybe this will help

Entity["Polyhedron", "Cuboctahedron"]["Dataset"]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract