Cubes Generator
Generate customizable isometric 3D cube grids with patterns, colors, and export options. Create stunning geometric art instantly.
About
Isometric projection maps three-dimensional objects onto a two-dimensional plane using a 30° rotation angle, where all three axes appear equally foreshortened at a ratio of 1:1:1. This generator computes screen coordinates using the transformation xscreen = (x − z) × cos(30°) and yscreen = (x + z) × sin(30°) − y, rendering each cube with three visible faces shaded at 100%, 75%, and 50% brightness to simulate directional lighting. Manual construction of isometric grids requires precise angle measurements and tedious vertex calculations for each cube face. A miscalculated projection angle or inconsistent shading destroys the dimensional illusion. This tool eliminates measurement errors by computing exact trigonometric positions for grids up to 50×50×50 cubes with automatic depth sorting via the painter's algorithm.
Formulas
The isometric projection transforms three-dimensional Cartesian coordinates into two-dimensional screen space. For a point at position (x, y, z) in 3D space, the screen coordinates are calculated as:
Where s represents the scale factor (cube size in pixels), and the origin point centers the grid on the canvas. The 30° angle derives from the isometric standard where tan−1(0.5) ≈ 26.57° is rounded for visual consistency.
Each cube face requires six vertices. The top face vertices offset by ±0.5 on x and z axes at height y + 1. Face shading simulates a light source at the top-right using brightness multipliers:
Depth sorting uses the painter's algorithm with combined depth value d = x + y + z, rendering cubes in ascending order so foreground cubes correctly overlap background cubes.
Reference Data
| Pattern Type | Algorithm | Visual Effect | Best Use Case |
|---|---|---|---|
| Solid | Single color fill | Uniform appearance | Minimalist designs, icons |
| Checkerboard | (x + y + z) mod 2 | Alternating colors | Game boards, retro aesthetics |
| Gradient | Linear interpolation along axis | Smooth color transition | Backgrounds, depth emphasis |
| Random | Pseudo-random color selection | Chaotic, organic feel | Abstract art, textures |
| Wave | sin(x + z) wave function | Undulating pattern | Water, terrain visualization |
| Diagonal | (x + z) mod n | Striped bands | Architectural renders |
| Height Map | y-axis color mapping | Elevation visualization | Topographic displays |
| Noise | Perlin-like value noise | Natural variation | Terrain, organic surfaces |
| Radial | Distance from center point | Circular gradient | Focus effects, highlights |
| Spiral | atan2(z, x) angle mapping | Rotating color bands | Dynamic compositions |
| Projection Type | Angle | Axis Ratio | Common Application |
|---|---|---|---|
| Isometric | 30° | 1:1:1 | Technical drawings, video games |
| Dimetric | 7°/42° | 1:1:0.5 | Pixel art, retro games |
| Trimetric | Variable | All different | Artistic renders |
| Cabinet | 45° | 1:1:0.5 | Furniture design |
| Cavalier | 45° | 1:1:1 | Architecture |
| Export Format | Compression | Transparency | Recommended For |
|---|---|---|---|
| PNG | Lossless | Yes (Alpha) | Web graphics, overlays |
| JPEG | Lossy (0.92 quality) | No | Photos, social media |
| WebP | Both options | Yes | Modern web optimization |
| SVG | None (vector) | Yes | Scalable icons, print |