Draw lines, circles, and polygons on a grid and get the points plus ready-to-run OpenGL C code.
OpenGL Figure Plotter is a free, browser-based tool for computer-graphics coursework: draw points, lines, triangles, rectangles, circles and polygons on a labelled coordinate grid, and get back both the exact integer vertex list and ready-to-compile OpenGL C code. It exists because the tedious part of a CG lab is never the algorithm — it is working out which coordinates draw the figure you sketched on paper, then typing forty glVertex2i calls without a typo. Draw the shape, read the points, copy the code.
Bresenham, DDA and midpoint circle are the algorithms behind these primitives.
Open toolSelect a shape, switch to Motion path, then drag on the grid to draw the trajectory freehand — or click to place exact waypoints one at a time. The figure follows it, and the transformation matrix below updates on every frame.
Pick Select and click a shape — or drag a box across the grid — then set the numbers below. Everything previews live and is only written into the figure when you press Apply.
Drag the amber cross on the grid to move it.
M = I
Points are column vectors, so p′ = M · p and the product reads right to left — the rightmost factor is applied first. Every operation is wrapped in T(p) · … · T(−p) so it happens about the pivot rather than the grid origin.
Select a shape to see its coordinates transform.
Vertices already carry the transform, so the C code is plain glVertex2i calls — what a lab report usually pastes in.