Skip to content
UniKit

Whiteboard sketch

The stroke geometry and SVG paths behind a whiteboard: coordinate normalisation, path smoothing with quadratic Bezier curves, an eraser and an undo/redo state machine, output as ready-to-draw path strings.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Drawing commands (one per line)

Strokes and SVG export

Commands: stroke x:y … (points as pixels or 0–1 ratios), erase x:y [radius], undo and redo. The output reports stroke and point counts, erased points, undo/redo availability and ready-to-save SVG source.

Enter stroke / erase / undo commands to see the paths and SVG; the Example button draws a sample doodle.

What this tool does

  • See what the stroke x:y … commands actually draw: the result card renders the exported SVG sketch inline.
  • Check undo / redo and erasing by eye: the preview updates with the commands, so you never have to save a file and reopen it.
  • Export an editable vector sketch: Download SVG gives you pad.svg to keep working on in a design tool.

Example

Input

stroke 200:500 400:250 600:500 800:250 1000:500
stroke 150:640 1050:640
stroke 850:200 900:240 950:200

Output

Canvas 1200 × 800px · stroke width 4px · stroke colour #111827 · background #FFFFFF · smoothed
3 strokes · 10 points · 0 erased points · 3 commands
Content bounds (150, 200) 900 × 440px · 150px from left, 200px from top, 150px from right, 160px from bottom
Undo available · redo unavailable · history depth 4 (limit 61)

Stroke detail:
  1. 5 points · start (200, 500) · path of 74 characters
  2. 2 points · start (150, 640) · path of 20 characters
  3. 3 points · start (850, 200) · path of 37 characters

Exported SVG:
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="800" viewBox="0 0 1200 800" role="img">
  <rect x="0" y="0" width="1200" height="800" fill="#FFFFFF" />
  <g fill="none" stroke-linecap="round" stroke-linejoin="round">
    <path d="M 200 500 Q 400 250 500 375 Q 600 500 700 375 Q 800 250 900 375 L 1000 500" stroke="#111827" stroke-width="4" />
    <path d="M 150 640 L 1050 640" stroke="#111827" stroke-width="4" />
    <path d="M 850 200 Q 900 240 925 220 L 950 200" stroke="#111827" stroke-width="4" />
  </g>
</svg>

The result is computed by the local source. Nothing is uploaded; the preview is the exported SVG rendered inline and can be saved as pad.svg.

Frequently asked questions

Is input uploaded?

No. Calculation stays local.

What about empty input?

The page stays empty; invalid parameters show an error.

Is the result stable?

The same input always yields the same output.

Is the preview the same SVG that gets exported?

Yes, exactly the same. The preview renders the SVG the tool generated inline (your input is only parsed as drawing commands, never as markup), and Download SVG saves identical content as pad.svg.

Keywords:whiteboard sketch

Related tools