Â鶹´«Ã½

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 for his work on realistic, computer-generated human skin – taught the class: .

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++.

In the grand prize winning image, flames dance within semi-transparent candle holders of different colors. (Fir.) Check out the.

Minutes before , which doubled as a friendly image competition, Â鶹´«Ã½ senior Nick Echols (pictured below, left) showed off a “behind the scenes” graphic tied to his CSE 168 final project. Meanwhile, competition judge and winner searched for the key to the lecture hall.

Â鶹´«Ã½ 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. (.)

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