Organometallic Odyssey
  • Home
  • Categories
  • Tags
  • Archives

Making POV-Ray Orbit A Crystal Structure

I like to use Mercury to generate POV-Ray files, but this should work with any POV-Ray scene.

#include "math.inc"

#macro ccdc_orthographic_camera( camera_position )
    camera {
        orthographic
        // In orthographic view, making 'angle' smaller makes the structure bigger,
        // and vice versa:
        angle 0.075
        location camera_position
    sky   <-100,10000,-100>
        up    <0,1,0>
        right  -x * (image_width/image_height)
        look_at <0,0,0>
//        rotate_view_for_animation()
    }
#end

#declare r = 23000;

ccdc_orthographic_camera( <
r*(clip(cos(1.5*pi*clock),0,1)+clip(sin((-1*pi)+(1.5*pi*clock)),0,1)),
r*clip(sin(1.5*pi*clock),0,1),
r*clip(sin((-0.5*pi)+(1.5*pi*clock)),0,1)
> )
Comments
comments powered by Disqus

Published

May 24, 2012

Category

crystallography

Tags

  • crystallography 4
  • Powered by Pelican. Theme: Elegant by Talha Mansoor