Sandbox
For the purposes of the current task, a cube of unit length is rendered in oblique projection with ASCII symbols as follows:
+-----+
/ /|
+-----+ |
| | +
| |/
+-----+
+
for the vertices.-
for the X edges. The unit length along X is represented by five-
between two vertices.|
for the Y edges. The unit length along Y is represented by two|
between two vertices./
for the Z edges. The unit length along Z is represented by one/
between two vertices.- Vertices are only drawn where all the three planes intersect.
- Edges are only drawn where exactly two planes intersect.
When a unit face is extruded, it is offset by a unit length from its original position and four new edges are created for each direction (positive and negative).
You can think of the extrusion as of drawing the axes of a 3D Cartesian coordinate system where each axis is represented as a cuboid with cross section 1x1 and length n
away from (0,0,0)
Extruded by 1 along X:
+-----------------+
/ /|
+-----------------+ |
| | +
| |/
+-----------------+
Task
Given three numbers for the XYZ axes, extrude the faces of a unit cube symmetrically by the indicated amounts and render the result with the ASCII symbols as specified above.
Input
x, y, z – non-negative numbers - extrusion lengths for the respective axes. 0 means no extrusion. The input can be three numbers, a list of three numbers, a triple, a string or anything that’s convenient for you.
Output
The ASCII drawing of the cube after extrusion. Leading and trailing wihtespaces are allowed.
Test cases
X Y Z
0 0 0
+-----+
/ /|
+-----+ |
| | +
| |/
+-----+
1 0 0
+-----------------+
/ /|
+-----------------+ |
| | +
| |/
+-----------------+
0 0 1
+-----+
/ /|
/ / |
/ / +
/ / /
/ / /
+-----+ /
| | /
| |/
+-----+
1 1 0
+-----+
/ /|
+-----+ |
+---| | +-----+
/ | |/ /|
+-----+ +-----+ |
| | +
| |/
+-----+ +-----+
| | +
| |/
+-----+
2 0 1
+-----+
/ /|
+-----------+ +-----------+
/ /|
+-----------+ +-----------+ |
| / /| | +
| +-----+ | |/
+---------| | +-----------+
| |/
+-----+
1 1 1
+-----+
/ /|-+
+-----+ |/|
+---| | +-----+
/ | |/ /|
+-----+-----+-----+ |
| / /| | +
| +-----+ | |/
+---| | +-----+
| |/| +
+-----+ |/
+-----+
Winning criteria
The shortest solution in bytes in every language wins. Please add a short description of the method used and your code.