Robots Atlas>ROBOTS ATLAS
Multimodal

Code-driven illustration

2023ExperimentalPublished: 30 November 2026Updated: 30 November 2026Published
Key innovation
The image is treated as an editable, inspectable graphics program rather than a static grid of pixels — the AI model "draws" by writing code that only becomes an illustration once rendered.
Category
Multimodal
Abstraction level
Paradigm
Operation level
InferenceApplication
Use cases
Diagrams and schematicsIcons and logosCharts and data visualizations (matplotlib)SVG vector graphicsUI mockups and components (HTML/CSS)Procedural generative art (p5.js, Canvas)Animations (CSS/SVG/JS)Image vectorization (image-to-SVG)

How it works

1) A prompt describes the desired illustration and usually names the target language (e.g. "draw an SVG of..."). 2) The LLM generates source code in a graphics/markup language (SVG, HTML Canvas+JS, CSS, p5.js, TikZ, matplotlib, WebGPU). 3) The code is executed/rendered by the appropriate engine (browser, LaTeX, interpreter), producing the image. 4) Because the result is code, it can be inspected, debugged, parametrized and iteratively refined — the model can fix its own code. A reverse variant (image-to-code / vectorization) also exists, where the model reconstructs an image as SVG code, as in StarVector.

Problem solved

Pixel/diffusion generators produce bitmaps that are hard to edit precisely, do not scale without quality loss, can be heavy, and struggle with exact geometry, text and structured diagrams. Code-driven illustration yields output that is editable, resolution-independent, lightweight and inspectable, with precise control over shapes, coordinates, text and colors.

Strengths & limitations

Strengths
✓Editable output (it is code)
✓Scales without quality loss (vector graphics)
✓Small file size
✓Precise control of geometry, text and color
✓Inspectable and debuggable output
✓Parametrizable and reusable
✓Runs on a general LLM, no diffusion model needed
Limitations
✗Weak photorealism and complex textures
✗Struggles with organic, irregular shapes
✗Quality depends heavily on the model
✗Generated code can be buggy or fail to render
✗Output is often simplified/schematic
✗Expressive limits imposed by the target language

Evolution

Original paper · 2023 · arXiv:2303.12712 · Sébastien Bubeck
Sparks of Artificial General Intelligence: Early experiments with GPT-4
Sébastien Bubeck
2023
GPT-4 draws via code (Sparks of AGI)
Inflection point

The report showed GPT-4 generating TikZ code (a unicorn), SVG (cat, truck) and JavaScript (Kandinsky-style images, a 3D scene) — popularizing the idea of "drawing with code".

2023
StarVector — a dedicated LLM for SVG

A multimodal LLM that generates SVG code; image-to-SVG, text-to-SVG and diagram generation, working directly in the SVG code space.

2025
SGP-Bench — benchmark for understanding graphics programs

A benchmark probing whether LLMs understand the visual output of symbolic graphics programs — ICLR 2025 Spotlight.

2025
"Pelican riding a bicycle" — informal SVG benchmark

The prompt "generate an SVG of a pelican riding a bicycle" became a popular informal test comparing models' ability to draw with code.