Thursday, November 28, 2024

Art generators don't know physics

 kw: generated art, scientific errors, comparisons, stock image websites

Reading a book of science for a popular audience, in a section about the use of spectroscopy to learn the compositions of stars, I encountered this illustration. Can you see what is (dramatically!) wrong with it?

The principle of refraction is this: when light enters a transparent material, such as glass, from the air, at an angle, it is bent closer to a line perpendicular to the material's surface. That means that the beam of white light entering from the left, should be refracted into a narrow spectrum that proceeds down and to the right. Then, when it encounters the other side of the prism, which is at a different angle, it will be bent downward again. 

Here, the first refraction is in the wrong direction. That implies that the glass prism has a refractive index less than 1, which is impossible. But the second refraction has the correct sense, which just adds confusion. This illustration is from Getty Images, a source of much stock artwork and photography. The author of the book in which I saw this image must not have been paying attention.

This is a more accurate illustration; it is from Britannica online. It shows the refraction angles correctly. One small matter is not accurate: Real prisms produce a spectrum with a dispersion angle of less than one degree. This illustration shows the spectrum, at the right, spreading across fifteen degrees. This is OK for the sake of illustration.

I got curious about such illustrations, and investigated a bit. First, I entered the prompt "prism spectrum" in Google Images. I looked through a few hundred images. There were all kinds of results. More than half of them were somewhere between wrong and incredibly wrong!

Not only Getty Images had it wrong; the following sites were consistently wrong or worse:

  • Shutterstock
  • DepositPhotos
  • Pixers
  • Freepix
  • Pugtree
  • Big Stock

The following had it right some of the time:

  • Adobe Stock
  • iStock
  • Vector Stock
  • KaiserScience

Finally, these sites had no errors that I found:

  • Britannica
  • Cyberphysics
  • CK12-Foundation
  • Dreamstime
  • Australia Telescope National Facility
  • LabXChange
  • Science Photo Gallery
  • Hyperphysics
  • Urban Pro

Many of the images had the look of generated artwork. So I put various prompts in four image generation products. After much experimentation with the text, the prompt used for these images was

A triangular prism in the center, a narrow light beam from the lower left upwards to halfway up the left side of the prism, continuing as a narrow spectrum across the middle inside the prism, and exiting the prism to descend toward the lower right as a wider spectrum.

Here are the best of each:

Even with very explicit instructions as to the direction of each section of the light beam, these are the best among numerous offerings that were pretty, but nonsensical. None came close.

One would think, among the billions of images used to train these programs, there would be some accurate scientific diagrams. However, spectroscopy is a "small market" in the scientific arena. If an author wants good scientific illustrations, it's still, not just "best", but imperative to use a human graphic artist, and to examine the results with a critical scientific eye.

No comments: