<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tsjerk</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tsjerk"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Tsjerk"/>
	<updated>2026-04-30T12:15:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=PovRay&amp;diff=8414</id>
		<title>PovRay</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=PovRay&amp;diff=8414"/>
		<updated>2011-08-31T11:08:50Z</updated>

		<summary type="html">&lt;p&gt;Tsjerk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Nice PovRay settings==&lt;br /&gt;
I typically use the make_pov.py script and &amp;quot;run&amp;quot; it from pymol once to load the function, and then I do ''make_pov('povray.inp')'' to create the povray.inp file.&lt;br /&gt;
Then I edit that file to insert some lines like:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fog {&lt;br /&gt;
  distance 10&lt;br /&gt;
  fog_type 2&lt;br /&gt;
  fog_alt 10.&lt;br /&gt;
  fog_offset -160.&lt;br /&gt;
  up &amp;lt;0.,1.,.4&amp;gt;&lt;br /&gt;
colour rgbt&amp;lt;1.0, 1.0, 1.0, 0.1&amp;gt;&lt;br /&gt;
turbulence 0.8&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In this case I'm not really doing depth-cueing but adding fog at the lower background edge (there were two planes defining the background and a surface below the molecule) rising up towards the front upper edge of the scene.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fog_type 2&amp;quot; means a &amp;quot;rising fog&amp;quot; along the &amp;quot;up&amp;quot; vector. fog_type 1 is a constant fog. To get pure depth cueing, you would want &amp;quot;up&amp;quot; to be along the &amp;lt;0., 0., 1.&amp;gt; vector (I think!). You'll need to play around with the distance and fog_offset parameters.&lt;br /&gt;
You wouldn't necessarily want the &amp;quot;turbulence&amp;quot; parameter in there either.&lt;br /&gt;
Check out &amp;quot;Atmospheric Effects&amp;quot; in the povray documentation for many more details: http://www.povray.org/documentation/view/201/&lt;br /&gt;
&lt;br /&gt;
==make_pov.py v1==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make_pov.py&lt;br /&gt;
# Do &amp;quot;run make_pov.py&amp;quot; from within pymol and then execute the script&lt;br /&gt;
# with &amp;quot;make_pov('povray.inp')&amp;quot; to create the povray.inp file.&lt;br /&gt;
#&lt;br /&gt;
# written by Robert Campbell 2003&lt;br /&gt;
#&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
def make_pov(file):&lt;br /&gt;
	(header,data) = cmd.get_povray()&lt;br /&gt;
	povfile=open(file,'w')&lt;br /&gt;
	povfile.write(header)&lt;br /&gt;
	povfile.write(data)&lt;br /&gt;
	povfile.close()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==make_pov.py v2==&lt;br /&gt;
This is a more extended version of an earlier extension of the version by Robert Campbell. The scene is written in two parts, a .pov file containing all meta data, such as the lights, camera and #defaults, and an include file (.inc) which contains the structure. In this way you have maximum control over your scene without having to edit a huge povray file. You may even want to consider splitting your scene up in separate parts (taken from the same perspective), which you combine in a global .pov file using #include statements. This will give even more control with regards to modifications to the scene.&lt;br /&gt;
If 'clip' is set to near|far|both, then the corresponding clipping plane(s) is/are included in a CSG difference object. Note that the result may increase the render time significantly unless the scene is simple.&lt;br /&gt;
&lt;br /&gt;
Once you run '''run make_pov.py''', run '''make_pov''' to execute the script.&lt;br /&gt;
&lt;br /&gt;
NB. the .pov file contains a commented statement with regards to a povray macro file, which allows transforming scenes and objects from model space to camera space and vice versa. The macro file is given below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make_pov.py&lt;br /&gt;
# Do &amp;quot;run make_pov.py&amp;quot; from within pymol and then execute the script&lt;br /&gt;
# with &amp;quot;make_pov('povray.inp')&amp;quot; to create the povray.inp file.&lt;br /&gt;
#                                                                                                   &lt;br /&gt;
# Original script written by Robert Campbell&lt;br /&gt;
# Modified by Tsjerk A. Wassenaar&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
def make_pov(file, name=&amp;quot;PymolObject&amp;quot;, meta=True, clip=False ):&lt;br /&gt;
        f1, f2 = file, file[:-4] + '.inc'&lt;br /&gt;
&lt;br /&gt;
        (header,data) = cmd.get_povray()&lt;br /&gt;
        povfile = open(f1,'w')&lt;br /&gt;
        if meta: povfile.write(header)&lt;br /&gt;
        povview = cmd.get_view()&lt;br /&gt;
&lt;br /&gt;
        if clip:&lt;br /&gt;
                objtype = &amp;quot;difference&amp;quot;&lt;br /&gt;
                objclip = &amp;quot;&amp;quot;&lt;br /&gt;
                if clip in [&amp;quot;near&amp;quot;,&amp;quot;both&amp;quot;]:&lt;br /&gt;
                        objclip = objclip + &amp;quot;plane { z, -%f }&amp;quot; % povview[15] &lt;br /&gt;
                if clip in [&amp;quot;far&amp;quot;,&amp;quot;both&amp;quot;]:&lt;br /&gt;
                        objclip = objclip + &amp;quot;plane { z, -%f }&amp;quot; % povview[16] &lt;br /&gt;
        else:&lt;br /&gt;
                objtype = &amp;quot;object&amp;quot;&lt;br /&gt;
                objclip = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        povfile.write(&amp;quot;&amp;quot;&amp;quot;\n&lt;br /&gt;
// Uncomment the following lines if you have the pymolmacro.inc include file and want to use it.&lt;br /&gt;
/*&lt;br /&gt;
#include \&amp;quot;pymolmacro.inc\&amp;quot;&lt;br /&gt;
PYMOL_VIEW( %10.5f, %10.5f, %10.5f,&lt;br /&gt;
            %10.5f, %10.5f, %10.5f,&lt;br /&gt;
            %10.5f, %10.5f, %10.5f,&lt;br /&gt;
            %10.5f, %10.5f, %10.5f,&lt;br /&gt;
            %10.5f, %10.5f, %10.5f,&lt;br /&gt;
            %10.5f, %10.5f, %10.5f )&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot; % povview)&lt;br /&gt;
&lt;br /&gt;
        povfile.write(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
#declare %s = union { #include &amp;quot;%s&amp;quot; }&lt;br /&gt;
%s { %s %s }&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot; % (name, f2, objtype, name, objclip ) )&lt;br /&gt;
&lt;br /&gt;
        povfile.close()&lt;br /&gt;
        povfile = open(f2,'w')&lt;br /&gt;
        povfile.write(data)&lt;br /&gt;
        povfile.close()&lt;br /&gt;
&lt;br /&gt;
cmd.extend('make_pov',make_pov)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//  PYMOLMACRO.INC v0.2 &lt;br /&gt;
//&lt;br /&gt;
//  (c)2005 Tsjerk Wassenaar, University of Groningen&lt;br /&gt;
//&lt;br /&gt;
//  This include file for Povray contains&lt;br /&gt;
//  just a few macros which together allow&lt;br /&gt;
//  the conversion between the model space&lt;br /&gt;
//  (cartesian coordinates) and the Pymol&lt;br /&gt;
//  camera space.&lt;br /&gt;
//&lt;br /&gt;
//  With these macros one can easily combine&lt;br /&gt;
//  a Pymol scene with objects defined in the&lt;br /&gt;
//  coordinate space of the original&lt;br /&gt;
//  structure file.&lt;br /&gt;
//&lt;br /&gt;
//  The input consists of the output of the&lt;br /&gt;
//  get_view() command in Pymol. This output&lt;br /&gt;
//  consists of 18 floating point numbers&lt;br /&gt;
//  defining a rotation matrix and shift&lt;br /&gt;
//  vectors for the origin of rotation and&lt;br /&gt;
//  for the camera position.&lt;br /&gt;
//&lt;br /&gt;
//  The macro PYMOL_VIEW loads a&lt;br /&gt;
//  view obtained from Pymol.&lt;br /&gt;
//&lt;br /&gt;
//  It #declares two transformation statements:&lt;br /&gt;
//&lt;br /&gt;
//  FROM_PYMOL_VIEW&lt;br /&gt;
//  TO_PYMOL_VIEW&lt;br /&gt;
//&lt;br /&gt;
//  The first can be used to transform the Pymol&lt;br /&gt;
//  scene back to model (normal) space, the latter&lt;br /&gt;
//  is used to transform other objects to appear in&lt;br /&gt;
//  the scene on the correct position.&lt;br /&gt;
//&lt;br /&gt;
//  Additionally four macros are defined to transform&lt;br /&gt;
//  vectors (points) from one space to another:&lt;br /&gt;
//&lt;br /&gt;
//  VEC2PYMOLSPACE( &amp;lt;x, y, z&amp;gt; )&lt;br /&gt;
//  VEC2CARTSPACE( &amp;lt;x, y, z&amp;gt; )&lt;br /&gt;
//  VEC2PYMOLVEC( &amp;lt;x, y, z&amp;gt; )&lt;br /&gt;
//  VEC2CARTVEC( &amp;lt;x, y, z&amp;gt; ) &lt;br /&gt;
//&lt;br /&gt;
//  *NEW*&lt;br /&gt;
//&lt;br /&gt;
//  If the view from pymol is stored as an array:&lt;br /&gt;
//&lt;br /&gt;
//  #declare M = array[18] {...}&lt;br /&gt;
//&lt;br /&gt;
//  then the macros&lt;br /&gt;
//&lt;br /&gt;
//  SET_PYMOL_VIEW &lt;br /&gt;
//    and &lt;br /&gt;
//  UNSET_PYMOL_VIEW&lt;br /&gt;
//&lt;br /&gt;
//  can be used directly to transform objects to and from that view:&lt;br /&gt;
//  object { ... SET_PYMOL_VIEW( M ) }&lt;br /&gt;
//&lt;br /&gt;
//  This is especially useful if multiple views are defined &lt;br /&gt;
//  and the scene was set in one:&lt;br /&gt;
//&lt;br /&gt;
//  #declare VIEW1 = M;&lt;br /&gt;
//  #declare VIEW2 = N;&lt;br /&gt;
//  union { #include &amp;quot;file.inc&amp;quot; UNSET_PYMOL_VIEW( M ) SET_PYMOL_VIEW( N ) }&lt;br /&gt;
//&lt;br /&gt;
//  NOTE: transform statements are combined by POV-Ray prior to &lt;br /&gt;
//  transformations of objects, so there's little need to implement a macro&lt;br /&gt;
//  SWITCH_PYMOL_VIEW( M, N )&lt;br /&gt;
//  although that would appear simpler in the scenes  &lt;br /&gt;
&lt;br /&gt;
//  Tsjerk A. Wassenaar&lt;br /&gt;
//  February 16, 2005&lt;br /&gt;
//  April 5, 2005&lt;br /&gt;
//  September 2, 2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
// Determinant of a matrix&lt;br /&gt;
//------------------------&lt;br /&gt;
#macro DET( M )&lt;br /&gt;
&lt;br /&gt;
  #local a = M[0] * ( M[4]*M[8] - M[5]*M[7] ); &lt;br /&gt;
  #local b = M[1] * ( M[3]*M[8] - M[5]*M[6] ); &lt;br /&gt;
  #local c = M[2] * ( M[3]*M[7] - M[4]*M[6] );&lt;br /&gt;
&lt;br /&gt;
  (a - b + c)&lt;br /&gt;
&lt;br /&gt;
#end // of DET()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// The inverse of a matrix&lt;br /&gt;
//------------------------&lt;br /&gt;
#macro INV( m11, m12, m13, m21, m22, m23, m31, m32, m33 )&lt;br /&gt;
&lt;br /&gt;
  #local M = array[9] { m11, m12, m13, m21, m22, m23, m31, m32, m33 };&lt;br /&gt;
  #local invdet = 1/DET( M );&lt;br /&gt;
	&lt;br /&gt;
  #local t11 = invdet * ( m22*m33 - m23*m32 ); &lt;br /&gt;
  #local t12 = invdet * ( m13*m32 - m12*m33 ); &lt;br /&gt;
  #local t13 = invdet * ( m12*m23 - m13*m22 ); &lt;br /&gt;
  #local t21 = invdet * ( m23*m31 - m21*m33 ); &lt;br /&gt;
  #local t22 = invdet * ( m11*m33 - m13*m31 ); &lt;br /&gt;
  #local t23 = invdet * ( m13*m21 - m11*m23 );&lt;br /&gt;
  #local t31 = invdet * ( m21*m32 - m22*m31 );&lt;br /&gt;
  #local t32 = invdet * ( m12*m31 - m11*m32 );&lt;br /&gt;
  #local t33 = invdet * ( m11*m22 - m12*m21 );&lt;br /&gt;
&lt;br /&gt;
  t11, t12, t13, t21, t22, t23, t31, t32, t33, 0, 0, 0&lt;br /&gt;
&lt;br /&gt;
#end // of INV()&lt;br /&gt;
&lt;br /&gt;
#macro M_INV( M )&lt;br /&gt;
  #local invdet = 1/DET( M );&lt;br /&gt;
	&lt;br /&gt;
  #local t11 = invdet * ( M[4]*M[8] - M[5]*M[7] ); &lt;br /&gt;
  #local t21 = invdet * ( M[2]*M[7] - M[1]*M[8] ); &lt;br /&gt;
  #local t31 = invdet * ( M[1]*M[5] - M[2]*M[4] ); &lt;br /&gt;
&lt;br /&gt;
  #local t12 = invdet * ( M[5]*M[6] - M[3]*M[8] ); &lt;br /&gt;
  #local t22 = invdet * ( M[0]*M[8] - M[2]*M[6] ); &lt;br /&gt;
  #local t32 = invdet * ( M[2]*M[3] - M[0]*M[5] );&lt;br /&gt;
&lt;br /&gt;
  #local t13 = invdet * ( M[3]*M[7] - M[4]*M[6] );&lt;br /&gt;
  #local t23 = invdet * ( M[1]*M[6] - M[0]*M[7] );&lt;br /&gt;
  #local t33 = invdet * ( M[0]*M[4] - M[1]*M[3] );&lt;br /&gt;
&lt;br /&gt;
  array[9] {t11, t12, t13, t21, t22, t23, t31, t32, t33}&lt;br /&gt;
#end&lt;br /&gt;
&lt;br /&gt;
#macro MV_MUL( M, V )&lt;br /&gt;
    &amp;lt; M[0]*V.x + M[1]*V.y + M[2]*V.z,&lt;br /&gt;
      M[3]*V.x + M[4]*V.y + M[5]*V.z,&lt;br /&gt;
      M[6]*V.x + M[7]*V.y + M[8]*V.z &amp;gt;&lt;br /&gt;
#end&lt;br /&gt;
&lt;br /&gt;
#macro SET_PYMOL_VIEW( M )&lt;br /&gt;
  transform {&lt;br /&gt;
    translate -&amp;lt; M[12], M[13], M[14] &amp;gt;&lt;br /&gt;
    matrix &amp;lt; M[0], M[1],  M[2],&lt;br /&gt;
	     M[3], M[4],  M[5], &lt;br /&gt;
	     M[6], M[7],  M[8], &lt;br /&gt;
	     M[9], M[10], M[11] &amp;gt;&lt;br /&gt;
  } &lt;br /&gt;
#end // of SET_PYMOL_VIEW&lt;br /&gt;
&lt;br /&gt;
#macro UNSET_PYMOL_VIEW( M )&lt;br /&gt;
  transform {&lt;br /&gt;
    translate -&amp;lt; M[9], M[10], M[11] &amp;gt;&lt;br /&gt;
    matrix &amp;lt; INV( M[0], M[1], M[2], M[3], M[4], M[5], M[6], M[7], M[8] ) &amp;gt; &lt;br /&gt;
    translate &amp;lt; M[12], M[13], M[14] &amp;gt;&lt;br /&gt;
  } &lt;br /&gt;
#end // of UNSET_PYMOL_VIEW&lt;br /&gt;
&lt;br /&gt;
#macro C2P_VEC( M, vec)&lt;br /&gt;
  #local nvec = vec - &amp;lt;M[12],M[13],M[14]&amp;gt;;&lt;br /&gt;
  #local nvec =&lt;br /&gt;
    &amp;lt; M[0]*nvec.x + M[1]*nvec.y + M[2]*nvec.z,&lt;br /&gt;
      M[3]*nvec.x + M[4]*nvec.y + M[5]*nvec.z,&lt;br /&gt;
      M[6]*nvec.x + M[7]*nvec.y + M[8]*nvec.z &amp;gt;; &lt;br /&gt;
  nvec + &amp;lt;M[9],M[10],M[11]&amp;gt;&lt;br /&gt;
#end&lt;br /&gt;
&lt;br /&gt;
#macro P2C_VEC( M, vec)&lt;br /&gt;
  MV_MUL( M_INV(M), vec - &amp;lt;M[9],M[10],M[11]&amp;gt; ) + &amp;lt;M[12],M[13],M[14]&amp;gt;&lt;br /&gt;
  //#local nvec = vec - &amp;lt;M[9],M[10],M[11]&amp;gt;;&lt;br /&gt;
  //#local N = M_INV( M ) ;&lt;br /&gt;
  //#local nvec =&lt;br /&gt;
  //  &amp;lt; N[0]*nvec.x + N[1]*nvec.y + N[2]*nvec.z,&lt;br /&gt;
  //    N[3]*nvec.x + N[4]*nvec.y + N[5]*nvec.z,&lt;br /&gt;
  //    N[6]*nvec.x + N[7]*nvec.y + N[8]*nvec.z &amp;gt;; &lt;br /&gt;
  //nvec&lt;br /&gt;
#end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#macro PYMOL_VIEW( r11, r12, r13,     // 3x3 Rotation matrix ( Model space to Camera space )&lt;br /&gt;
		   r21, r22, r23, &lt;br /&gt;
		   r31, r32, r33,&lt;br /&gt;
		    c1,  c2,  c3,     // Camera position ( Model space )&lt;br /&gt;
		    o1,  o2,  o3,     // Origin of rotation ( Model space )&lt;br /&gt;
		    s1,  s2,  or)     // Slab near and far, orthoscopic flag ( discarded )&lt;br /&gt;
&lt;br /&gt;
  #declare PYMOLVIEW_RMATRIX = array[9] { r11, r12, r13, &lt;br /&gt;
					  r21, r22, r23, &lt;br /&gt;
					  r31, r32, r33 }&lt;br /&gt;
  #declare PYMOLVIEW_CAMPOS  = &amp;lt; c1, c2, c3 &amp;gt;;&lt;br /&gt;
  #declare PYMOLVIEW_ORGPOS  = &amp;lt; o1, o2, o3 &amp;gt;;&lt;br /&gt;
&lt;br /&gt;
  #declare TO_PYMOL_VIEW = transform {&lt;br /&gt;
    translate -&amp;lt; o1, o2, o3 &amp;gt;&lt;br /&gt;
    matrix &amp;lt; r11, r12, r13,&lt;br /&gt;
	     r21, r22, r23, &lt;br /&gt;
	     r31, r32, r33, &lt;br /&gt;
	      c1,  c2,  c3 &amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  #declare FROM_PYMOL_VIEW = transform {&lt;br /&gt;
    translate -&amp;lt; c1, c2, c3&amp;gt;&lt;br /&gt;
    matrix &amp;lt; INV( r11, r12, r13, r21, r22, r23, r31, r32, r33 ) &amp;gt;&lt;br /&gt;
    translate  &amp;lt; o1, o2, o3&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  #macro VEC2PYMOLSPACE(vec)&lt;br /&gt;
    #local nvec = vec - PYMOLVIEW_ORGPOS;&lt;br /&gt;
    #local nvec =&lt;br /&gt;
      &amp;lt; PYMOLVIEW_RMATRIX[0]*nvec.x + PYMOLVIEW_RMATRIX[3]*nvec.y + PYMOLVIEW_RMATRIX[6]*nvec.z,&lt;br /&gt;
        PYMOLVIEW_RMATRIX[1]*nvec.x + PYMOLVIEW_RMATRIX[4]*nvec.y + PYMOLVIEW_RMATRIX[7]*nvec.z,&lt;br /&gt;
        PYMOLVIEW_RMATRIX[2]*nvec.x + PYMOLVIEW_RMATRIX[5]*nvec.y + PYMOLVIEW_RMATRIX[8]*nvec.z &amp;gt;; &lt;br /&gt;
    nvec + PYMOLVIEW_CAMPOS&lt;br /&gt;
  #end&lt;br /&gt;
&lt;br /&gt;
  #macro VEC2CARTSPACE(vec)&lt;br /&gt;
&lt;br /&gt;
    #local nvec = vec - PYMOLVIEW_CAMPOS;&lt;br /&gt;
&lt;br /&gt;
    #local R = PYMOLVIEW_RMATRIX;&lt;br /&gt;
    #local invdet = 1/DET( R );&lt;br /&gt;
&lt;br /&gt;
    #local T = array[9];&lt;br /&gt;
&lt;br /&gt;
    #local T[0] = invdet * ( R[4]*R[8] - R[5]*R[7] ); &lt;br /&gt;
    #local T[1] = invdet * ( R[2]*R[7] - R[1]*R[8] ); &lt;br /&gt;
    #local T[2] = invdet * ( R[1]*R[5] - R[2]*R[4] ); &lt;br /&gt;
    #local T[3] = invdet * ( R[5]*R[6] - R[3]*R[8] ); &lt;br /&gt;
    #local T[4] = invdet * ( R[0]*R[8] - R[2]*R[6] ); &lt;br /&gt;
    #local T[5] = invdet * ( R[2]*R[3] - R[0]*R[5] );&lt;br /&gt;
    #local T[6] = invdet * ( R[3]*R[7] - R[4]*R[6] );&lt;br /&gt;
    #local T[7] = invdet * ( R[1]*R[6] - R[0]*R[7] );&lt;br /&gt;
    #local T[8] = invdet * ( R[0]*R[4] - R[1]*R[3] );&lt;br /&gt;
&lt;br /&gt;
    &amp;lt; T[0]*nvec.x + T[3]*nvec.y + T[6]*nvec.z + PYMOLVIEW_ORGPOS.x,&lt;br /&gt;
      T[1]*nvec.x + T[4]*nvec.y + T[7]*nvec.z + PYMOLVIEW_ORGPOS.y,&lt;br /&gt;
      T[2]*nvec.x + T[5]*nvec.y + T[8]*nvec.z + PYMOLVIEW_ORGPOS.z &amp;gt;&lt;br /&gt;
  #end&lt;br /&gt;
&lt;br /&gt;
  #macro VEC2PYMOLVEC(vec)&lt;br /&gt;
    &amp;lt; PYMOLVIEW_RMATRIX[0]*vec.x + PYMOLVIEW_RMATRIX[3]*vec.y + PYMOLVIEW_RMATRIX[6]*vec.z,&lt;br /&gt;
      PYMOLVIEW_RMATRIX[1]*vec.x + PYMOLVIEW_RMATRIX[4]*vec.y + PYMOLVIEW_RMATRIX[7]*vec.z,&lt;br /&gt;
      PYMOLVIEW_RMATRIX[2]*vec.x + PYMOLVIEW_RMATRIX[5]*vec.y + PYMOLVIEW_RMATRIX[8]*vec.z &amp;gt;&lt;br /&gt;
  #end&lt;br /&gt;
&lt;br /&gt;
  #macro VEC2CARTVEC(vec)&lt;br /&gt;
    #local nvec = vec - PYMOLVIEW_CAMPOS;&lt;br /&gt;
  #end&lt;br /&gt;
&lt;br /&gt;
  #macro CAM2PYMOLCAM()&lt;br /&gt;
&lt;br /&gt;
  #end&lt;br /&gt;
&lt;br /&gt;
  #macro CAM2CARTCAM()&lt;br /&gt;
&lt;br /&gt;
  #end&lt;br /&gt;
#end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Third_Party_Software|PovRay]]&lt;br /&gt;
[[Category:ThirdParty_Scripts]]&lt;/div&gt;</summary>
		<author><name>Tsjerk</name></author>
	</entry>
</feed>