3D ASCII art: rotating shapes

Every piece of 3D ASCII art on this page is a solid shape turning in space and shaded with characters: a cube tumbling on two axes, a lit sphere with a bright glint, a dodecahedron with twelve pentagon faces, a Klein bottle curling back through itself and a tesseract turning through the fourth dimension. Each frame is computed from real 3D geometry, so the shading shifts as it turns.

Where to start

Solids are compact, loop continuously and stay recognizable when small, so they make strong loaders, README headers, terminal splashes and portfolio heroes. The famous spinning donut is here as Spinning Torus (Spinning Torus), and the beating Heart 3D (Heart 3D) is in this set too. Every shape embeds with one tag and exports as a GIF, video or PNG.

How 3D ASCII rendering works

Under the hood, each solid is a tiny 3D renderer. On each frame, the shape's points are rotated, projected onto the character grid and shaded by how much light each surface catches. The brightness of each surface picks a character from a ramp, light marks for dim surfaces and dense symbols for bright ones, and depth sorting keeps near surfaces in front of far ones. That is how Torus Knot passes cleanly over and under itself.

Because the shading is a ramp, the look options change the whole feel. Halftone dots turn a shape into printed dots, Blocks makes it chunky, and Numbers or Binary give it a data-like texture. You can also pass your own ramp with the chars attribute, ordered light to dark.

Cubes, spheres, polyhedra and knots: pick a shape

The solids, grouped by kind:

  • Cubes: Rotating Cube, Puzzle Cube Turns, Sphere to Cube Morph, and Voxel Heart, built from small cubes.
  • Spheres and globes: Lit Sphere and Wireframe Globe.
  • Polyhedra and gems: Icosahedron, Octahedron, Dodecahedron and Pyramid.
  • Rings and knots: Spinning Torus, Torus Knot, Candy Trefoil Tube and Gimbal Gyroscope.
  • Math and topology: Tesseract, Klein Bottle and Mobius Strip.
  • Objects: Spinning Gold Coin, Rotating Star, Cylinder, Spring Coil and Double Helix.
  • Flights through 3D worlds: Terrain Mesh Flyover and Wireframe City Flyby, which move the camera through a scene instead of turning one shape.

3D shapes as loaders, README headers and terminal splashes

Solids loop continuously and stay recognizable at small sizes, which makes them natural loaders. Embed one with size="8" inside a loading state, or add still for a single frame to use as an icon. Rotating Star and Spinning Gold Coin suit rewards and achievements, Double Helix suits science and health products, and Wireframe Globe suits anything international.

For a README, download the GIF and add it with the snippet in the README tab. For a terminal splash, run npx --yes https://www.ascii-magic.com/ascii/cli.tgz rotating-cube --seconds=3 when a shell opens. The terminal welcome guide shows the full setup, and the developer portfolio guide suggests a solid as a hero.

Making a solid match your brand

Each shape has its own palette, such as the teal facets of Icosahedron or the violet and blue faces of Octahedron, but the embed tag can restyle any of them. Add mono and set the text color with CSS to draw a shape in your brand color, use bg for a matching background, and raise contrast to deepen the shading. A one-color Rotating Cube in your accent color makes a tidy loader for almost any interface.

For a bigger change, the source on each piece page is MIT licensed: copy it and edit the colors, the rotation speed or even the geometry itself.

Ways to use ASCII solids

Step-by-step guides with a live builder and code to copy.

All 18 use cases →

/FAQS

ASCII solids: frequently asked questions

Answers about using ASCII solids on websites, in READMEs, in terminals and in exports.

Q. What is 3D ASCII art?
3D ASCII art is a three dimensional shape drawn with text characters, where brighter surfaces use denser characters so the shape looks lit and solid. The pieces here are animated, so each shape turns in space and is shaded again on every frame. They range from a simple cube to a tesseract and a Klein bottle.
Q. How is ASCII 3D rendering done?
ASCII 3D rendering rotates a shape's points, projects them onto a grid of characters, and picks a character for each cell by how much light that surface receives. Surfaces are depth-sorted so the nearest one is drawn on top. Each piece page shows its JavaScript source, so you can read exactly how it works.
Q. Is there a rotating ASCII cube?
Yes, Rotating Cube tumbles a solid cube on two axes, each face lit with a character ramp and crisp bright edges. For variations, Puzzle Cube Turns twists a three by three color cube until it solves itself, Sphere to Cube Morph swells between a ball and a cube, and Voxel Heart is built from small cubes.
Q. Where can I find the spinning torus?
The spinning torus, the shape many people know as the spinning donut, has its own page at Spinning Torus. It is a lit ring turning on two axes with a classic character ramp, and you can embed it, play it in a terminal or download it as a GIF. Torus Knot and Candy Trefoil Tube are twisted cousins of the same shape.
Q. Can a 3D ASCII shape be used as a loader?
Yes, the solids make good loaders because they move continuously and stay recognizable at small sizes. Embed one with a smaller size, such as size="8", inside your loading state, and remove the element when your content arrives. Visitors with reduced motion turned on see a still frame instead. The website loaders guide has the full pattern.
Q. Which ASCII art 3D shapes are in the collection?
The set covers cubes, spheres, polyhedra, rings, knots and mathematical surfaces. It includes Rotating Cube, Lit Sphere, Icosahedron, Octahedron, Dodecahedron, Pyramid, Cylinder, Torus Knot, Mobius Strip, Klein Bottle, Tesseract, Gimbal Gyroscope, Double Helix and Spring Coil, plus two flights through 3D landscapes.
Q. Can I run a 3D ASCII shape in my terminal?
Yes, every solid plays in a terminal, in color where your terminal supports it. Run npx --yes https://www.ascii-magic.com/ascii/cli.tgz rotating-dodecahedron to watch it tumble, add --seconds=3 to stop after three seconds, or add --look=dots to draw it in halftone dots instead of characters.
Q. What is a tesseract, and how is it shown in ASCII?
A tesseract is a four dimensional hypercube, the 4D version of a cube. The Tesseract piece rotates it through the fourth axis and projects it down onto the character grid, so its inner and outer cubes appear to swap places. It is a striking way to introduce higher dimensions in a lesson or a talk.
Q. Can I put a spinning 3D shape in my GitHub README?
Yes, as a GIF. Open the shape, press Download GIF, commit the file to your repository and reference it from README.md with the snippet in the README tab. Smaller solids such as Rotating Cube or Icosahedron make neat headers that do not crowd the text below them.
Q. Is there a Klein bottle or Mobius strip in ASCII?
Yes, both. Klein Bottle turns slowly as its narrow neck curls back through the side to join the base, with the two sides of its single surface lit violet and teal. Mobius Strip is a one-sided band with a half twist whose color shifts from teal to violet as it travels around the loop.
Q. Can I change the characters used to shade a shape?
Yes, add the chars attribute with your own characters ordered from light to dark, and the shape is shaded with them. You can also pick a preset look: ASCII, Dense ASCII, Numbers, Binary, Letters, Blocks, Squares, Lines or Halftone dots. Dense ASCII usually gives smoother gradients on curved surfaces like Lit Sphere.
Q. Can I use a 3D shape as a desktop wallpaper or video?
Yes, export any solid as a PNG at Desktop 4K, 1080p or phone size, or as an MP4 or WebM video. Shapes sit centered on a clean background, so they make minimal wallpapers. Terrain Mesh Flyover and Wireframe City Flyby are wide scenes that fill more of the frame for an immersive video loop.

Related categories

All categories