How to Make Optical Illusions Step by Step

Making optical illusions comes down to exploiting predictable quirks in how your brain processes visual information. Your eyes and brain take shortcuts to interpret the world quickly, and every optical illusion is essentially a design that turns one of those shortcuts against itself. Whether you’re drawing on paper, designing digitally, or setting up a photograph, the core techniques fall into a handful of categories you can learn and apply right away.

Why Optical Illusions Work

Your retina doesn’t just passively record light. Cells in your eye called interneurons pool signals from neighboring photoreceptors and send inhibitory signals back to them, a process called lateral inhibition. This creates a “center-surround” structure where each nerve cell responds strongly to contrast at edges rather than to uniform areas. It’s why you perceive brightness differences that aren’t physically there when two gray patches sit next to different backgrounds.

On top of that, your brain applies a set of organizational rules to make sense of incomplete or ambiguous input. Gestalt psychology identified several of these. The principle of closure means your brain fills in gaps to complete shapes that aren’t fully drawn. Proximity makes you group nearby objects as a unit. Continuity leads you to see smooth, flowing lines even when they’re interrupted. Every illusion you create will lean on one or more of these tendencies.

Brightness and Color Illusions

The simplest illusions to make at home involve tricking the eye’s contrast processing. The famous checker shadow illusion, designed by Edward Adelson at MIT, places two squares on a checkerboard where one appears to be in shadow and the other in light. Both squares have the exact same pixel value: RGB 138, 138, 138. The illusion works because your brain adjusts for the apparent shadow, interpreting the “shadowed” square as lighter than it really is.

To build your own version of this effect, place two identical gray patches on different backgrounds in any image editor. Surround one patch with dark tones and the other with light tones. The gray on the dark background will look lighter, and the gray on the light background will look darker, even though they’re the same value. Adding a gradient between the two areas (simulating a shadow or light source) strengthens the effect dramatically, because it gives your viewer’s brain a reason to “correct” the brightness.

You can push this further by using color. Place a neutral gray square on a saturated blue background, and the gray takes on an orange tint. This happens because your brain subtracts the surrounding color from everything inside it. To create these, use a digital tool where you can set exact color values so you can prove the two areas are identical when someone doubts you.

Static Images That Appear to Move

The peripheral drift illusion, sometimes called “rotating snakes,” makes a completely still image look like it’s spinning or flowing. These patterns contain repeating asymmetrical luminance gradients, essentially a sawtooth profile that steps from dark to light in one direction and drops sharply in the other. Every time you move your eyes or blink, the brief change in light hitting your retina triggers motion-detecting neurons, and the asymmetry in the pattern biases that signal in one direction.

To create one, you need a repeating sequence of at least four luminance levels arranged in a consistent order around a circular or curved path. A common sequence is: black, dark gray, white, light gray, repeating. The key is that the steps going one way are gradual while the drop in the opposite direction is abrupt. Place these sequences in concentric rings or tessellated circular patches. When viewers look slightly away from any given ring (seeing it in peripheral vision), it will appear to rotate. The illusion is strongest at medium contrast on a mid-gray background and weakens if the overall image is very bright or very dark.

You can draw these by hand with colored markers, but digital tools give you precise control over luminance. Any vector graphics program or even a spreadsheet that generates colored grids will work. Arrange your four-tone sequence in arcs, make sure adjacent patches follow the same rotational order, and alternate the direction between neighboring rings to create the impression of counter-rotating motion.

Ambiguous Figures That Flip

Bistable illusions, like the Necker cube or the vase-faces image, present two equally valid interpretations so your brain alternates between them. Research in computational neuroscience has identified three conditions that make bistable perception work reliably. First, the sensory input needs to be clear and high-contrast, not degraded or blurry. Second, the image should depict something your brain assumes is stable (a solid object, not a flickering or transient thing). Third, both interpretations need to be roughly equally plausible, even if one is slightly dominant.

The Necker cube is a good starting project. Draw a wireframe cube with no shading, no occlusion cues, and no ground plane. Because there’s no information telling your brain which face is in front, it flips between two orientations. If you accidentally make one face look more “front-facing” through line weight or positioning, the bistability weakens. Keep all lines identical in thickness and don’t add shadows.

For a figure-ground illusion (like Rubin’s vase), draw a single contour line that simultaneously outlines two different objects. The classic approach is a vase shape whose edges also form the profile of two faces. The trick is balancing the two readings: if the vase is too ornate or the faces too detailed, one interpretation dominates and the flip stops happening. Symmetry helps. A vertically symmetric contour encourages the “vase” reading, while recognizable facial features (forehead, nose, lips, chin) along the edge encourage the “faces” reading.

Impossible Objects

Impossible figures like the Penrose triangle or Escher’s endless staircase exploit your brain’s tendency to interpret 2D lines as 3D structures. Each local section of the drawing makes perfect sense as a 3D corner or edge, but the global geometry is self-contradicting.

To draw a Penrose triangle, start with three right-angle corners connected by three bars. Each bar appears to recede in a different direction, so the structure looks solid from corner to corner but can’t exist as a whole. The technique is to draw each joint so it looks correct in isolation: use parallel lines for the bars (suggesting rectangular beams) and connect them at angles that imply three different depth planes. The illusion breaks if you add consistent shading or perspective cues, because those would reveal the contradiction. Flat, even shading on each face, or no shading at all, keeps it intact.

You can extend this principle to more complex impossible objects by chaining together locally consistent but globally contradictory segments. Escher’s “Waterfall” works this way: water flows downhill at every visible point yet somehow arrives back at the top. Sketch your structure in small sections, making each section obey normal 3D rules, and only connect the final segment in a way that breaks physical possibility.

Forced Perspective in Photography

Forced perspective is one of the most accessible illusions to create because all you need is a camera and two objects at different distances. The principle is simple: the apparent size of any object depends on the angle it occupies in your field of view, which is determined by its actual size divided by its distance from the camera. Two objects that subtend the same angle look the same size regardless of how big they really are.

To make a person appear to hold a distant building in their hand, position them close to the camera and the building far away. The person’s hand and the building need to occupy the same angular size in the frame. If a building is 100 meters tall and 2 kilometers away, a hand that’s 10 centimeters tall and 2 meters from the lens will appear to match it. The ratio is what matters: size divided by distance must be equal for both objects.

A few practical tips make this work cleanly. Use a narrow aperture (high f-number) so both the near and far objects are in sharp focus, since blur on either one breaks the illusion. Shoot on an overcast day or in even lighting so shadows don’t reveal the true distance. And position the camera low or at whatever angle makes the contact point between the two objects look natural. The illusion falls apart at the edges, so frame tightly.

Hidden 3D Images (Autostereograms)

Autostereograms, popularized by the Magic Eye books of the 1990s, hide a 3D shape inside a repeating pattern of dots or textures. They work by presenting each eye with a slightly different horizontal offset in the pattern, which your brain interprets as depth. The technique was formalized by neuroscientist Christopher Tyler and Maureen Clarke in 1991.

To make one digitally, you need a depth map (a grayscale image where brightness represents how close a surface is to the viewer) and a strip of random or patterned texture. The texture strip repeats horizontally across the image, but each repetition is shifted slightly based on the depth value at that point. Where the depth map is “closer,” the pattern repeats sooner; where it’s “farther,” the repetition stretches out. Free software tools like SIRDS by Katsura or scripts in Python can automate this process. You draw or import a depth map, choose a texture, and the program generates the stereogram.

The Magic Eye books used ray-traced 3D models with smooth gradients as their depth maps, which is why the hidden shapes felt detailed and rounded. If you’re starting out, a simple blocky depth map with just two or three depth levels is easier to get right. Make sure the horizontal repeat distance is roughly 2 to 3 centimeters at the final viewing size, which matches the natural distance between human eyes and makes the image easier to “lock onto.”

Using Gestalt Principles as a Design Framework

Nearly every illusion leans on at least one Gestalt principle, and understanding them gives you a framework for inventing new illusions rather than just copying existing ones. Closure is the engine behind the Kanizsa triangle, where three pac-man shapes positioned at the corners of an invisible triangle make you see bright white edges that don’t exist. To create your own version, arrange partial shapes (circles with wedges removed, lines with gaps) so the missing portions align along the boundary of a hidden shape. Your viewer’s brain fills in the rest.

Proximity lets you create emergent images from scattered dots or marks. Place elements closer together in certain areas and farther apart in others, and a shape materializes from the density differences. Continuity is useful for path illusions: draw two overlapping curves so they cross at a single point, and viewers will “see” the smoother continuation rather than the sharp angle, even if both readings are geometrically valid. By deliberately setting up the wrong smooth path, you can guide someone’s eye along a line that isn’t actually connected.

The most effective illusions often combine multiple principles. An impossible object uses continuity (your eye follows each edge smoothly) and closure (your brain completes it as a solid 3D form). A figure-ground illusion uses proximity and symmetry. Once you start recognizing which principles are at work in illusions you encounter, designing your own becomes a matter of choosing a principle and building a visual scenario that activates it in a misleading way.