Friday, January 23, 2009

Building the Photosynthesis Engine III:Light Reactions

Light Reactions

The light reactions in photosynthesis are where light is absorbed and converted to a flow of electrons. The electrons are used to make energy rich compounds for the rest of photosynthesis. It is also the step where oxygen is produced.

This week I have worked out a way to simulate the light reactions in which all the parts of the model are embedded in a lipid bilayer as in nature (more or less). The model is more detailed model than my more general simulation of the whole photosynthesis process in that the parts are meant to sense each other and communicate with each other. Here both photosystems are glowing purple because they both have absorbed photons. The structures in red or purple are parts of the electron transport systems, the red indicating the passage of electrons.

The user will eventually be able to treat this simulation as a work bench adding or removing parts and putting them in the right order to get their own working model of the light reactions. The parts interact via a series of sensor and listen events. This seems to be an easier approach to implement than the one used in my more general simulation where all the parts are linked into one large object. Again the idea is not to mimic every single detail of the light reactions but allow the user to explore the steps in the light reaction.

Tuesday, January 20, 2009

Playing with Light

Visiting Soror inspired me to get back to Blender which I had struggled with last summer and found it very difficult. Part of the problem is that the tutorials are often times confusing especially when it comes to exporting sculptie textures. Fortunately there is new stuff out there. Now there is a site called Second Life Artist which gives a really clear explanation of how to export sculpted prim textures to Second Life using a set of Python scripts developed by Dominodesigns.

It works great! No more editing meshes by hand and voodoo baking. Soror suggested a good place to start with Blender is with a sphere and use the Sculpting tool.

So here are a few things I did today after the inauguration.

This is a shot showing some of my sculpties. The star was made with Blender, the other glowing sculpties where made earlier as part of an installation for a video.


I thought cactuses would be easy...but I can't get fine enough detail to do spines, but I think these are cute.

Virtual Succulents

Sunday, January 18, 2009

Experimental Flora

When I was in grade school I got into trouble when we had to do one of those infamous class murals. What could possibly have gotten me in trouble? Well my job was paint tree trunks and I painted them as I saw them, not brown but various other shades and encrusted with lichens like this.

Now I wonder what my class mates and teacher would have done if I painted trees looking like this gem?


This bit of experimental flora was created by Soror Nishi who does some of the most inspired objects I have seen in Second Life. Soror has a really keen eye and a wonderful organic sense-organic in the meaning related to life.

All around, one sees cellular shapes, tissues, flowers and seeds that pay homage to evolutionary exuberance. I must confess I spent way too much time last night going from one plant to another, and snapping pictures. So here is a sampling from my Flickr Stream.

This one echoes either a palm or maybe an extreme split leaved philodendron with aerial roots.


Soror titles this one "Bog Lily" but it is really more like a Calla lily complete with spathe.

Bog lily

Everything is fantastic maybe the biologist equivalent of magical realism such as these jeweled mushrooms. In some universes they probably would be down right illegal.


These lily pads are clearly inspired by the real thing.


There is attention to botanical detail everywhere. Consider these wonderful hanging legume pods:


Soror has a clear grasp of the importance of small things too, that the average visitor to a tropical rain forest might miss such as these wonderful beach flowers instantly recognisable to me as a morning glory echoing some I have seen in Florida.


So if you want to visit a great site to see just what you can do with SL...maybe wow first time visitors, check out Soror at

Soror is currently having a show at LALALALA Gallery at

If you send up teleporting to the Avendale town square, let everything rez and click on the Gallery's sign on the sign post for a teleport.

In the artist information notecard Soror says:

"The extensive attempts some make to populate this new world with "realistic" copies of the Old World show a colonial tendency to ignore the native culture and superimpose a pre-formed visual style on this new medium. This medium (SL) has more in common with stained glass than with photography, and failure to recognise this results in poor copies of boring everyday objects, architecture, flora and fauna."

And I think this is an interesting point for someone such as myself who tends to import photos for textures.

I see Soror works with Blender...wonder what tips she has for a novice?

Soror's blog is at

Friday, January 16, 2009

Molecular Mayhem in Second Life

Yesterday I visited with Erich Bremer from Stony Brook for a quick tour of Monolith, his Molecular rezzer, discussed in my previous post. He asked me to select a protein from the Protein Data Base(RCSB) so he could test it on his new beta version of Monolith. So many proteins! So I picked three favorites, a cytochrome C (pdb 3CP5), a dicer (2FFL) and a Rubisco (1RXO). The dicer and Rubisco would have required too many prims for the sim-I should have known that- but we had lots of fun rezzing and playing with cytochrome C.

Two big things. First Monolith is fast. It takes roughly one minute to rez a protein. Since a protein such as cytochrome C easily has 5,000 plus atoms, each of which is rezzed as a prim.

Second Monolith provides a fair amount of flexibility to color different regions of the molecule. For instance, cytochrome C has a heme group-this is a set of four carbon rings with an iron atom in the middle, just as in hemoglobin. Erich was able to immediately find the heme group in the pdb format file and color it, just as one might do with a traditional molecular rendering tool such as Cn3D.

Right now Monolith only does space filling models but Erich has plans for ball and stick models, and some ideas for clever use of particles. Monolith is not nearly as powerful as s Cn3D in terms of the types of displays you can use and right now you can't rotate the molecule right now and scaling might be nice, but then these traditional viewers don't let you easily fly through the molecule.

Not quite the holy grail of molecular rendering which for me would be a Cn3D type rendering system in world. But given that Monolith is still in beta, it's pretty impressive given the current constraints of Second Life's environment the Erich has to work around.

Monolith is at

Wednesday, January 14, 2009

A visit to the monolith...

Imagine being able to fly through a molecule. Well now you can at the Stony Brook School of Medicine SL site where Erich Bremer has put together Monolith. Monolith creates huge complex molecules using a complex Second Life script that is actually able to import data from some of the standard molecular data base files and use that data to create 3D molecules. Way cool!

Here is monolith itself. Straight out of 2001 at the Stony Brook site.

Some molecular views. I made these a little bit dramatic and I bet some of the more artistic SL residents will want to visit.

This is a transfer RNA.

And to show you the scale these models are done at, in this view I am barely visible on the left hand side of the image:

One more view. The metallic looking molecule in the foreground is DNA.

This is a really neat system. I haven't had a chance to play with monolith and the program is still under development.

One weakness of course is that each atom is a single prim. So that tRNA might gobble up 400 if you don't own an island monolith probably won't work. It might be possible to save on prims if monolith can be pre programmed with certain stock sculpted prims for certain common structures, but suspect it is not practical.

Certainly monolith would not work on my land in Carmine...let's see (teleporting home for a sec), one of my parcels is 1024 m squared and it supports 234 prims. Even the Stony Brook land (teleporting back...) supports roughly 15,000 Monolith could quickly eat into that. So Linden lab...if you want SL to be able to host these intensive sort of educational environments, we need more prims!

If you have SL installed on your machine visit Monolith at

Tuesday, January 13, 2009

Building the Photosynthesis Engine II

Here is a working prototype of the Photosynthesis Engine. The Engine consists of eight linked prims, scripted to qualitatively model photosynthesis. This model presented a number of challenges.

First is developing a representation of of photosynthesis that captures qualitative aspects of the process without getting bogged down in heavy model building. I chose to avoid dynamic modeling and and use very general functions to illustrate what is happening in photosynthesis.

The scripting challenge involved getting the parts of the model to talk to each other since the physical model consists of linked prims which pass data to each other. The trick was to develop a system that allows the prims to pass data using SL's llMessageLinked function to send data and the Link_message event to receive data. If you compare this version of the engine, you'll notice it has far fewer parts-important since SL does have limits on how many prims you can have. I also could simply the scripting since each prim has fewer other prims to keep track of.

The next challenge is making the way users interact with the Engine as smooth as possible and this is still being played with along with adjusting the script parameters to give more realistic output.

It is hard to see in this image but the blue horizontal object with the left and right arrows is a tunable lamp. The user can select a particular wavelength of light and "shine" it on the chloroplast to examine the relationship between light wavelength and the rate of photosynthesis. The trick here is to develop a way to represent the spectral color of a wavelength of light in SL's r,g,b color scheme The yellow and light grey boxes show the sugar and oxygen produced by the chloroplast.

The user can also change the level of carbon dioxide and water independently. Note that the user has to manually change the factor she wants to investigate..the engine is not completely automatic.

The model has a thylakoid that receives a wavelength of light from the lamp and uses its own absorption spectrum (input as a notecard) to interact with the wavelength received from the lamp. So the can gets to generate a real action spectrum. I might point out that the thylakoid's color is generated internally with a function based on the its own spectrum. So there is a fair amount of flexible scripting embedded in this innocent looking model!

More details later...

Friday, January 2, 2009

Building the Photosynthesis Engine I

One of my projects is an interactive photosynthesis module that the students can experiment on. I am just starting to work on an object I call the Photosynthesis Engine. The idea is to roughly...(very roughly I might add) model photosynthesis in a way that students can adjust the inputs: light, carbon dioxide and water and observe how the outputs of photosynthesis behave.

My initial version of the Engine is a set of 14 linked objects representing the steps and reactants and products of the light reactions and the Calvin cycle, avoiding most of the details of what happens in each cycle. The immediate challenge is figuring out what are reasonable parameters to get sensible qualitative behaviors out of the model and getting all the linked parts of the model to communicate properly.

The picture shows a preliminary set up for the Engine, including a nifty(OK that dates me) light source that displays the spectral colors of the wavelength, allowing the students to display the wavelength. Also the light reaction prim's color uses a function that takes a transmission spectrum and converts it to R,G,B values and displays that on the prim. Students will be able to send the light's wavelength to the light reaction as input and generate an action spectrum.

More later...