POV-Ray : Newsgroups : povray.newusers : Non-touching objects seem to be touching Server Time
6 Jul 2022 19:25:22 EDT (-0400)
  Non-touching objects seem to be touching (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Nicki
Subject: Re: Non-touching objects seem to be touching
Date: 13 Feb 2017 04:45:00
Message: <web.58a17f63ccd1a85e42c0e3a60@news.povray.org>
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

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.