Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Represent a cuboid with rounded edges
ResourceFunction["RoundedCuboid"][pmin] represents a unit cube with rounded edges and with its lower corner at pmin. | |
ResourceFunction["RoundedCuboid"][pmin,pmax] represents an axis-aligned cuboid with rounded edges and with lower corner pmin and upper corner pmax. |
| RoundingRadius | {0.1,0.1,0.1} | the radii of rounded edges |
| r | use r for radii in all three directions |
| {rx,ry,rz} | separate setting for each radius |
A unit rounded cuboid:
| In[1]:= |
| Out[1]= | ![]() |
Rounded cuboids with different sizes:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Differently styled rounded cuboids:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Rotated rounded cuboid:
| In[4]:= |
| Out[4]= | ![]() |
A rounded unit cube:
| In[5]:= |
| Out[5]= | ![]() |
A rounded cuboid parallel to each axis:
| In[6]:= |
| Out[6]= | ![]() |
Short form for a rounded unit cube cornered at the origin:
| In[7]:= |
| Out[7]= | ![]() |
Color directives specify the face colors of cuboids:
| In[8]:= |
| Out[8]= | ![]() |
FaceForm can be used to specify the styles of the faces:
| In[9]:= |
| Out[9]= | ![]() |
Different properties can be specified for the front and back of faces using FaceForm:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Opacity specifies the face opacity:
| In[11]:= |
| Out[11]= | ![]() |
Decompose the cuboid into its components and apply different styling to each:
| In[12]:= |
| In[13]:= |
| Out[13]= | ![]() |
Adjust how rounded the edges are:
| In[14]:= | ![]() |
| Out[14]= | ![]() |
Adjust the edges in each direction independently:
| In[15]:= |
| Out[15]= | ![]() |
Leave some edges sharp:
| In[16]:= |
| Out[16]= | ![]() |
A simple 3D bar chart:
| In[17]:= |
| In[18]:= | ![]() |
| Out[18]= | ![]() |
Use Rotate to get all possible rounded cuboids in Graphics3D:
| In[19]:= |
| Out[19]= | ![]() |
Rectangle with a non-zero value for RoundingRadius is a 2D version of RoundedCuboid:
| In[20]:= |
| Out[20]= | ![]() |
Cuboid is a special case of RoundedCuboid:
| In[21]:= |
| Out[21]= | ![]() |
Cylinder can be viewed as a special case of RoundedCuboid:
| In[22]:= | ![]() |
| Out[22]= | ![]() |
Sphere can be viewed as a special case of RoundedCuboid:
| In[23]:= |
| Out[23]= | ![]() |
BarChart3D or RectangleChart3D can be used to create rounded cuboids:
| In[24]:= | ![]() |
| Out[24]= | ![]() |
Get the graphical primitive for BarChart3D:
| In[25]:= | ![]() |
| In[26]:= |
| Out[26]= | ![]() |
Compare with RoundedCuboid:
| In[27]:= |
| Out[27]= | ![]() |
The two cuboids have a very different internal structure:
| In[28]:= | ![]() |
| Out[28]= | ![]() |
When the width of the cuboid is zero in at least one dimension, no cuboid is created:
| In[29]:= |
| Out[29]= | ![]() |
When any length of the cuboid is less than twice the corresponding setting for RoundingRadius, a warning is issued and artifacts appear:
| In[30]:= |
| Out[30]= | ![]() |
Random rounded cuboid collections:
| In[31]:= | ![]() |
| Out[31]= | ![]() |
Adjust interactively the rounding radii:
| In[32]:= | ![]() |
| Out[32]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License