|
|
Hi everyone,
you guys are right. Most of the scene is created from computer generated code.
I am running a discrete element method simulation in fortran, which outputs the
positions of objects.
I then have a python script which imports the positions of the objects, and
writes a scene file including all the lights and everything.
For this specific image I added some stuff manually.
By the way, scaling everything up worked out wonderfully. In case you are
wondering here is the scene file and the resulting image:
http://imgur.com/9KpgjeE
#include "colors.inc"
background { color White }
camera
{ location <0.3, 1.5, 0.9>
look_at <0.0, 0.0, 0.0> }
light_source { <-0.01, 2.0, 0.5> color White}
light_source { <0.01, 2.0, 0.5> color White}
cylinder {< -0.525, 0.0, 0.0 >, < 0.525, 0.0, 0.0 >, 0.15 open texture {pigment
{color Red transmit 0.45} finish { phong 1 }}}
intersection{ sphere {<0.525, 0.0, 0.0>, 0.15}
box {<0.525,-0.2,-0.2>,<0.7,0.2,0.2>} texture {pigment {color Red
transmit 0.45} finish { phong 1 }} }
intersection{ sphere {<-0.525, 0.0, 0.0>, 0.15}
box {<-0.525,-0.2,-0.2>,<-0.7,0.2,0.2>} texture {pigment {color Red
transmit 0.45} finish { phong 1 }} }
sphere {< -0.52500000, 0.0000000000, 0.0000000000 >, 0.149 texture {pigment
{color Yellow} finish { phong 1 }}}
sphere {< 0.52500000, 0.0000000000, 0.0000000000 >, 0.149 texture {pigment
{color Yellow} finish { phong 1 }}}
sphere {< -0.26250000, 0.0000000000, 0.0000000000 >, 0.149 texture {pigment
{color Yellow} finish { phong 1 }}}
sphere {< 0.00000000, 0.0000000000, 0.0000000000 >, 0.149 texture {pigment
{color Yellow} finish { phong 1 }}}
sphere {< 0.26250000, 0.0000000000, 0.0000000000 >, 0.149 texture {pigment
{color Yellow} finish { phong 1 }}}
And sorry about the ugly lines where the hemishpherical ends touch the cylinder.
I was too lazy to do this properly.
Post a reply to this message
|
|