In [1]:
from spack import Packing
from numpy import array, pi

In [2]:
L = 2.0066668050219723
diameters = array([ 0.96,  0.97,  0.98,  0.99,  1.  ,  1.01,  1.02,  1.03,  1.04])
locs = array([[ 1.40776762,  1.26647724,  0.73389219],
              [ 0.58704249,  2.11399   ,  1.52956579],
              [ 1.75917911,  0.54290089,  1.27577478],
              [ 2.13750384,  0.87508242,  0.21938647],
              [ 1.07283961,  0.87692084,  1.9060841 ],
              [ 0.09550267,  1.94404465,  0.56463369],
              [ 1.07636871,  2.1942971 ,  0.63752152],
              [ 0.49922725,  1.20002224,  1.13360082],
              [-0.27724757,  1.62152603,  1.67262247]])
pack = Packing(locs, diameters, L=L)

In [3]:
size = 400
sc = pack.scene(rot=pi/4, camera_dist=4, cmap='autumn')
sc.render('example-packing.png', width=size, height=size)
sc.render('ipython', width=size, height=size)


Out[3]:

In [4]:
size = 1200
sc = pack.scene(rot=pi/4, camera_dist=4, cmap='autumn', clip=True, box_color=None)
sc.render('example-packing-clipped.png', width=size, height=size)
sc.render('ipython', width=size, height=size)


Out[4]: