Last week I was trying to think of boolean predicates that I could use for exercises in an introductory programming class. I remembered the triangle inequality, which states how the lengths of three line segments must relate if they are to be formed into a triangle. In short, each segment must be shorter than the other two combined.

I absently connected in my mind the three sides of a triangle to the three components of an RGB color. If I treated the red, green, and blue intensities as the lengths of the three line segments, which colors could make triangles?

This seemed like a job for volume rendering, but my volume renderer is in a state of disrepair. So, I just generated a bunch of slices across the color cube with this Kotlin code:

## Comments

Does color have shape?

Just go ask Pythagora

Triangles abound