In the 2 images below, mesh topography or wireframe drapes a woman (and two hands) in a photograph, creating a mixed media portrait composed of digital effects and photography. To a statistician, it appears to be an elevation-agnostic surface plot, but they wouldn't know where to begin.

  1. How is this effect accomplished and in which program?
  2. What is this style called and does it count as glitch?

enter image description here

Another one:

enter image description here


3 Answers 3


I think the two images are completely different processes.

The first image looks like it is just a custom dither process applied to a greyscale image as follows:

Process each line separately from left to right keeping track of a running value which starts at 0 at the beginning of each line.

At each pixel add the greyscale value of the input image on a scale of 0 to 1 to the running value.

If the running value is greater than 1, output a white pixel and subtract 1 from the running value, otherwise output a black pixel.

Repeat this for each line and you get an image like the first image.

For constant grey at the left edge you get a regular set of lines which break up as you reach the varied grey values and then random lines in the grey space to the right of the image.

I don't know a graphics program which does that, but it would be simple to implement.

The second image looks completely different to me. If you had a three dimensional model and applied a texture of black with thin white lines you might get that result. I think it would be very difficult to process an existing photograph to get that result though. You would probably need to build a three dimensional model from the photograph and then use that. The second image includes shadows on the white lines, so that image uses a lighting model as well.

I do not know a term other than wireframe or mesh for this style.

pseudo code for the custom dithering:

assume an input image input(x, y) with greyscale values in the range from 0 to 1, and an output image output(x, y) where values will be set to 0 or 1

for y = y_begin to y_end
  running_value = 0
  for x = x_begin to x_end
    running_value = running_value + input(x, y)
    if running_value > 1 then
      output(x, y) = 1
      running_value = running_value - 1
      output(x, y) = 0
    end if
  next x
next y

(You might alternatively want to try "running_value = running_value + 0.1 + input(x, y) * 0.9" as the fourth line)

This will only work well for an image which has a uniform black/dark background, and where the subject of the image is of uniform colour lit from the side with a single light source.
In the sample image this applies as the colour is just one uniform skintone, with a single lightsource creating lighter and darker variations of that skintone in the image.
In this circumstance the greyscale corresponds closely to the three dimensional contours, so a simple process like this can give the impression of lines which match those three dimensional contours.

For more complex images you will get results which look more like the random lines on the right hand side of the image, or just dots without any recognisable pattern.

  • Can't really follow what is meant by running value and grayscale value. How are they reflected and correspond to the output per pixel (white/black/directional-X/directional-Y) before and after the custom dither?
    – user610620
    Sep 15, 2022 at 5:41
  • I've put sample pseudo code and some notes about which images it should work well for. Sep 15, 2022 at 10:13
  • Your edits still only seem to explain colorization. What explains the directional abberations of the image: the glitch Waves. What in your code is moving them from their original positions in the not-shown (non-wavy) original photo?
    – user610620
    Sep 17, 2022 at 10:08
  • 1
    The position of each point in the lines on the right hand side depends on the fractional part of the sum of all the greyscale values in that line of the image to the left of it. This value (the part of the number after the decimal point) is largely random, but often similar enough from one line to the next that the points can form lines, although not vertical lines. The direction of those line is effectively random. Sep 17, 2022 at 13:47
  • You could call it a glitch or random side-effect, those wavy lines are certainly not an intentional effect of the dithering. The intention of the dithering is just to approximate the greyscale of the original image using only black and white (rather than grey) pixels. Sep 17, 2022 at 13:48

As Timothy said, these effects require two very different approaches. There's no real glitching going on in either effect.

For the first effect, you can use this approach outlined by Louis Hoebregts:

  1. Draw an image to a canvas and divide it into a grid.
  2. Get the brightness of every cell—save this data.
  3. (separately) Draw particles moving from left to right. To exactly recreate the image you provided, you'd want "waves" of particles.
  4. Update each particle's speed based on the brightness of the cell (from step 2) that it's in.
  5. (optionally) Fade each particle based on its speed.
  6. (optionally) Do not clear your scene on each frame, to let the particles fade out.

How to create the second effect is not as clear to me. I see two potential approaches:

  1. Manually draw each line using a graphics program then manually shade it.
  2. Create a 3D model. Create material(s) that make it look like the lines seen. Then add shading.
  • You say there are two approaches, but then near the end you say there are two effects ("the second effect is not clear to me"). confused. What are the approaches. What are the effects.
    – user610620
    Sep 18, 2022 at 23:40
  • The part below the first line is about creating the first image. The part below the second line is about creating the second image Sep 19, 2022 at 12:23
  • Is there a name for the "shooting particles left to right" procedure? Seen it employed several times.
    – user610620
    Sep 19, 2022 at 21:54
  • There's not a name for everything. Sep 20, 2022 at 1:41
  • If an answer satisfies your post, click the check mark next to the answer Sep 20, 2022 at 1:42

That is a popular effect for folk that have 3D printing robots where they can poke a pencil into the extruder part and then it writes anything they want, in an albeit messy way.

Pen plotters can use maths equations and there are specific programs to turn images into pencil stroke maths plots, SVG pen maps from color images.

There are books on the subject, paying applications, free ones, web applications, paying algo's to load into free apps...

theres also a book on it https://www.generativehut.com/

  • Hi. Can you please expand on your answer a little, mentioning what each link shows/contains, even briefly, or with some example images. Link only answers are generally best avoided here on GDSE because of link rot.
    – Billy Kerr
    Dec 15, 2023 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.