Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Bezier & pen tool trainer

See how Bezier curves are built, then practise the vector pen tool by tracing shapes with corner and smooth points and get a score.

0.40

Points (x, y):

How to use

  1. Bezier playground: drag the numbered points, or type their coordinates. Points 0 and 3 are where the curve starts and ends; points 1 and 2 are the handles that pull it. Move the t slider to see how the point on the curve is built from straight lines.
  2. The table shows the point and tangent at t, the curve length, the tight bounding box and the path code, plus the code for the two halves when the curve is split at t.
  3. Pen tool practice: pick a shape and trace the grey line. Click to place a corner point. Press, drag and release to place a smooth point: you are pulling out its handles. Drag any point or handle to adjust it. Click the first point to close a shape.
  4. Press Check my path for a score: the average gap between your path and the target. Three stars means under 3 pixels.
  5. You can also type or paste path data (M, L, C and Z, absolute coordinates) and press Use this path data.

Keyboard and touch

DragMove a point or handle (mouse, pen or finger)
TabMove between the slider, number boxes and buttons
← →Move the t slider
EnterRedraw from the typed points, or check the path

Tips

  • Put points where the curve changes direction or ends, not along the middle of a smooth stretch. The circle needs only four.
  • Drag each handle in the direction the curve is travelling. Handle length is about a third of the distance to the next point for gentle curves.
  • A curve always stays inside the shape made by its four points, which is why the bounding box is usually much smaller than the handles suggest.
  • Untick Mirror handles to move one handle on its own and make a sharp corner between two curves, as at the top of the heart.

About this tool

A cubic Bezier curve is B(t) = (1-t)³P0 + 3(1-t)²t P1 + 3(1-t)t² P2 + t³P3 for t from 0 to 1. de Casteljau's construction finds the same point by repeated straight-line interpolation, which also splits the curve into two exact halves. The tight bounding box uses the curve's ends plus the points where dx/dt or dy/dt is zero (roots of a quadratic). The length is found by 8-point Gauss-Legendre integration on 16 pieces.

The practice score samples 41 points on every piece of both paths and averages, both ways, the distance from each sample to the nearest sample on the other path. It does not matter where you start or which way you go round. The pen tool behaves like the one in common vector drawing programs, but this is our own simplified version. The circle uses the usual handle length of 0.5523 × radius. Not affiliated with any software maker.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product