News Release

A Picture is Worth a 1,000 lines of C++ Code

San Diego, CA, July 2 , 2010 -- If a picture is worth a 1,000 words, then the computer science corollary must be “a picture is worth a 1,000 lines of C++ code.”

That’s certainly the case for the computer science students at the University of California, San Diego who paint pictures with C++ computer programming code. Computer science professor Henrik Wann Jensen – winner of a 2004 Academy Award for his work on realistic, computer-generated human skin – taught the class: CSE 168: Rendering Algorithms.

For their final project, the Rendering Algorithms students pulled together what they’d learned about generating digital images from their own computer code and painted one final picture with C++.

CSE 168 winning image

In the grand prize winning image, flames dance within semi-transparent candle holders of different colors. (First prize, second prize and some honorable mention images are here.) Check out thephotograph that inspired the winning image on the competition Web site.

Minutes before the final image presentations, which doubled as a friendly image competition, UC San Diego senior Nick Echols (pictured below, left) showed off a “behind the scenes” graphic tied to his CSE 168 final project. Meanwhile, competition judge and 2007 CSE 168 grand prize winner Iman Sadeghi searched for the key to the lecture hall.

Nick Echols shows off a behind the scenes graphic
UC San Diego senior Nick Echols (pictured below, left) showed off a “behind the scenes” graphic tied to his CSE 168 final project.
Once the keys were located and the laptop projector fired up, the students presented final images revealing how hard-core programming – rather than off-the-shelf software like Photoshop and 3D graphics programs – can be used to generate aesthetically pleasing graphics.

In the grand prize winning image, flames dance within semi-transparent candle holders of different colors. (First prize, second prize and some honorable mention images are here.)

A smoky haze rises from each translucent candle holder. This candle light generates rings of light called caustics – which can occur when light passes from one medium to another, like from air to water. When sunlight passes through a magnifying lens, for example, the bright spot generated while focusing the lens on some surface is a caustic.

“In the case of our candle lights, the curvature and thickness of the crystal bottle makes light focus on the primary ring shown below the bottle. The secondary ring, which is bigger in diameter, is generated by the reflection of the smaller, brighter ring, against the bottle,” explained Carlos Dominguez-Caballero, who together with fellow computer science master’s student Holmes Futrell won the grand prize. CSE 168 is open to both advanced undergraduate students and graduate students.

kitchen light
Kiten light from winning image.
The winning students also programmed the kitchen illumination, even though the actual light sources are not in the picture. This kitchen light bounces into the main room as indirect lighting. Note, the stream of light just to the left of the bunny pouring in from the kitchen.

“The grand prize image combined all the techniques that the students learned about in class and then added extras such as the glowing smoke above the candles – and they only had two weeks to accomplish this,” said computer science professor Henrik Wann Jensen.

 

 

Media Contacts

Daniel Kane
Jacobs School of Engineering
858-534-3262
dbkane@ucsd.edu