Index

Last Appendix

   

Appendix G

Povray Microtubule model file

This is a model file for the povray raytracer program (http://www.povray.org). It constructs a model microtubule with 13 protofilaments. It can also be used as a base to model microtubules with different numbers of filaments or different structures, or to model microtubules with splayed or curved tips.

Note that the language used is the internal povray scene description language. This language is similar to C, and uses the '#' symbol for compiler directives, rather than as the UNIX style comments they are used for in the .pddf files previously. Instead, the '//' token is used for comments instead.

#include "colors.inc"

#include "shapes.inc"

#include "textures.inc"

global_settings { max_trace_level 20 }

camera {

location <150, 10, 0>

look_at <0,0,0>

orthographic

}

background {colour rgb<0.8,0.8,0.8> }

light_source { <1500, -100, -100> color rgb <1,1,1>}

#declare dimer =

blob

{

threshold 0.15

component 1.0,1.0, <0,0,1>

component 1.0,1.0, <0,0,-1>

texture {

pigment { color rgbf <0.95,0.95,0.95,0.95> }

finish {diffuse 1.0}

}

no_shadow

}

#declare helix_no = 5; // number of dimer helices

#declare pf_count = 13; // number of protofilaments

#declare dimer_size = 4;

#declare delta_theta = 360/pf_count; // how much to rotate

// what the offset between p.f.s is

#declare delta_z = dimer_size*helix_no/pf_count;

// function for drawing a single protofilament

#macro drawFilament(rot)

#local length=-10;

#if (rot>6)

#declare length=length-(rot*2)+12;

#else

#declare length=length+(rot*2)-12;

#end

#while (length < 30)

#declare z_dist = (length*dimer_size) + (delta_z*rot);

#if (z_dist < 0)

object

{

dimer

#declare rot_angle = (z_dist)*.275;

#declare rPos =

vaxis_rotate( <0,-200,0>, <-1,0,0>, rot_angle );

#declare rPos = rPos + <0,200,0>;

rotate -x*rot_angle

#declare circ_offset =

vaxis_rotate(<0,4,0>, <0,0,1>, delta_theta*rot);

translate circ_offset

translate rPos

}

#else

object

{

dimer translate <0,4,z_dist> rotate z*delta_theta*rot

}

#end

#declare length=length+1;

#end

#end

#declare pf=0;

#while (pf < pf_count) // draw each protofilament

drawFilament(pf)

#declare pf=pf+1;

#end

#declare randomStream = seed(1); // draw background dimers

#declare i = 0;

#while (i < 1000)