Nonlinear grid transformations

Any layout in Gridfunction can be bent: graph paper into a wave, polar paper into a swirl, a photo into a fisheye. This guide explains the coordinates, the built-in presets and how to write your own math function, in x′ and y′, in polar form or as a complex function f(z).

Where to find it

In the generator, open Nonlinear transformation in the settings. Pick a preset or Custom math function, then adjust Strength, Frequency and Phase. Apply to chooses what bends: the grid and image together, the grid only, or an added image only. The preview, the PDF, the PNG, the SVG and the printed page all use the same transformation, and lines stay as smooth vectors in the PDF and SVG.

The coordinate system

A transformation moves every point (x, y) on the original paper to a new point (x′, y′). Leaving x′ = x and y′ = y gives the unchanged page.

Built-in presets

PresetWhat it does
WavePushes lines sideways along sine waves. Frequency sets how many waves fit across the page.
FisheyeMagnifies the center. Negative strength shrinks it instead.
Signed logarithmicStretches the middle and compresses the edges on a logarithmic curve; negative strength does the opposite.
Radial rippleCircular ripples spreading from the center, like a drop in water.
SwirlRotates the center more than the edges, twisting the grid.
BarrelBulges the page outward toward the corners, like a wide-angle lens.
Pinch / bulgePulls lines toward the center or pushes them away.
Radial powerRescales distance from the center by a power, so spacing grows or shrinks steadily outward.
Nonlinear shearSlides rows sideways more and more toward the top and bottom edges.

Writing your own math function

Choose Custom math function, then pick how to write it under Write it as. The Examples menu fills in a working function for each style that you can then edit. Formulas are read by a small math parser built into the page; they are never run as code.

Examples to try (x′ and y′)

Effectx′ =y′ =
Gentle wavex + 0.05*sin(6*pi*y)y
Slider-controlled wavex + a*sin(b*pi*y + c)y
Ripplesx*(1 + 0.06*sin(12*r))y*(1 + 0.06*sin(12*r))
Twist (use Strength)r*cos(theta + a*(1 - r))r*sin(theta + a*(1 - r))
Log scale acrosssign(x)*log(1 + 9*abs(x))y
Soft edgestanh(2x)/tanh(2)tanh(2y)/tanh(2)

What you can use

If a formula has a mistake, the message under the formula boxes says what is wrong and the page shows the unbent grid until it is fixed.

Images

When you add an image under Add an image, it is cut into a fine mesh of triangles and every triangle is moved by the same transformation as the grid, so the picture bends with the lines. Set Apply to to Image only to bend just the picture over a straight grid, or Grid only to keep the picture flat. Images stay on your device.

Tips

Try it in the generator