Tools · MetaPost

Online MetaPost editor

Write a MetaPost figure between beginfig and endfig and get it drawn without a TeX installation. Loops, recursive macros and exact geometry all work; download it as SVG or PNG.

See the examplesHave Forma write one

Or describe it in words and get source you can edit, checked before you see it.

Part of Forma Visuals: Draw a technical or research figure · Draw a geometry figure

⌘ or Ctrl + Enter draws. Sent to Forma's renderer, which keeps nothing
loadingStarting the renderer…

Koch snowflake A recursive macro replaces every edge with four edges a third as long, four levels deep: a finite area inside an ever longer perimeter.

In your browser, drawn with Plotly.js (MIT), Apache ECharts (Apache-2.0, notice), Chart.js (MIT).

01 Examples

MetaPost examples to start from.

02 About MetaPost

What MetaPost is good for.

MetaPost is John Hobby's language for technical drawings, descended from Knuth's METAFONT. You state equations and paths and it solves for the points, which makes precise geometry, loops of repeated shapes and recursive figures short to write.

Do btex labels work?

Not here. btex … etex runs TeX as a second program, which the sandbox does not allow. Plain string labels such as label("A", z) and defaultfont text work.

What must the source contain?

At least one beginfig … endfig, and end at the close. The first figure is the one drawn.

Can a figure read files?

No. The renderer runs in a sandbox with no access to files outside its own folder and no network, and nothing you send is kept.