Cover stories: From plot to finish

+ See all authors and affiliations

Science  06 Nov 2015:
Vol. 350, Issue 6261, pp. 597
DOI: 10.1126/science.aad7717

Cover stories take you behind the scenes of the design process at Science, from scientific illustration to data visualization.

To highlight this week’s special issue on the first results from the MAVEN mission, the Science design team wanted the cover to showcase some of the data collected from the spacecraft. The mission focused on Mars’ upper atmosphere, which is not intuitive for readers to visualize. To help explain the science, we wanted something that was both accurate and visually rich. The data we eventually settled on were from a simulation of solar wind interacting with ions in the martian atmosphere, which was prepared by MAVEN team member Xiaohua Fang. My personal interest was piqued when our Managing Graphics Editor, Alberto Cuadra, mentioned the possibility of creating a 3D data visualization. I am no data scientist, but as a scientific illustrator, I felt a sense of duty to pull this off.

The plot that started it all.

Ions escaping Mars’ atmosphere (colored according to energy level) and ions returning (black).

The data arrived in the form of 8052 text files, representing the trajectory of each charged particle. Every file contained x, y, and z coordinates along the particle’s path, plus an energy level. Of the escaping particles, the shortest trajectory was 1829 points and the longest was 46,732 points. I realized that the fate of this cover rested in writing a Python script that would allow my 3D modeling program, CINEMA 4D, to read the data. My partner, Zac Levinson, has tried to teach me programming in the past; here was the golden opportunity to learn once and for all.

Hello data.

A portion of 1 of the 8052 data files.

I decided to build this scene by placing a very small light at each of the coordinate points, akin to creating a very tight connect-the-dots picture. Together, the lights would blend to create the effect of glowing lines. I thought this stylistic effect would play indirectly with the idea that the movement of these ions can actually create auroras. For the cover image, I decided to show only the escaping particles so that the surface of the planet would remain unobstructed and recognizable. In the script, I wrote a function that would create a light at each value of x, y, and z and would determine the light’s color based on a color map normalized to the range of energy levels.

Make light.

A sample of the code that tells CINEMA 4D what to do.

Two hundred two lines of code and countless trials and errors later, running the script gave me my first look at the data (see “Reason to celebrate” image at right).

Reason to celebrate.

The rendering that proved my plan and script were working.

There was a problem, however: The absolute number of light objects in this scene made it impossible to do anything after running the script ,  including moving the camera to different views. I remedied this crippling problem by modifying the script to make only every 20th light visible in the viewports while keeping all lights renderable. This adjustment cut down on the number of objects to manipulate but still showed me the general shape of the ion trajectories, allowing me to move around the scene.

My next realization was the importance of choosing a good color map. More than just an arbitrary gradient, I found that some color maps showcase the data better than others. I tried a few of those available in the MatPlotLib colormap module and settled on “YlOrBr” (yellow, orange, brown). The YlOrBr map displayed a wide range of coordinating colors in close proximity on the color wheel. It was also an appropriate choice for the martian color scheme.

Another problem came to light when I discovered that axis naming conventions differ between mathematical and 3D modeling programs. Luckily, Xiaohua alerted me to this discrepancy. What is normally referred to as the y axis is called the z axis in CINEMA 4D. This resulted in the data appearing flipped across the yz plane. At the end of line 49 in the above code sample lies a small yet mighty fix: changing the sign of the y value.

Flipping out.

The data flip resulting from the different axis conventions was easy to miss, except when looking from a straight orthogonal view such as this view from the Sun. (Left) Xiaohua’s plot; (right) my renderings before and after the fix.

Finally, it was time for Mars to make its appearance. The color and normal maps from the amusingly named JHT’s Planetary Pixel Emporium made this part of the project appreciably painless. Thanks to MAVEN principal investigator Bruce Jakosky’s advice to show the light source coming from the direction of the Sun, it was easy to find the right lighting setup. Because I chose a dynamic three-quarter view of the particles, sunlight in my scene would come from the back-right direction.

Making space.

Solar wind from the Sun.

This process is a great example of how the same information can be viewed through more than one lens, according to its intended function. My illustration is functional as an eye-catching overview of the data: You see that there are hundreds of escaping particles, their general direction and concentration, and how they wrap in three dimensions around the planet. But the image I created is not suitable for studying the data in depth. For that purpose, a plot like Xiaohoa’s is irreplaceable.

With that said, illustrations such as this eliminate the disparity between what is artistic and what is empirical. Even though this was a new type of project for me, it aligned with my objectives as a scientific illustrator. Traditional illustration principles served as an essential backdrop that guided my decision-making throughout the process. I am happy to now have the foundation of a new skill set, as well as code that I can modify for future data visualizations, with the intent of helping to explain the exciting discoveries appearing in Science.

—Valerie Altounian, Scientific Illustrator at Science

Acknowledgments: I thank Bruce Jakosky and Xiaohua Fang of the MAVEN team for the data and for taking the time to give advice and feedback along the way; Beth Rakouskas and Alberto Cuadra at Science for encouragement, excitement, and feedback; and Zac Levinson for his rigorous Python tutelage that was essential for completion of this project.

Navigate This Article