Lorenzo Isella wrote:
> ...
> pos_list=s.zeros(3) # I initialize the array to contain the single
> particle's coordinates
> my_rad=1.06/2.
> for i in xrange(0,n_part): #n_part is the number of particles in my system
> pos_list[0]=x_list[i] #x_list contains a list of the x-coordinate
> of all the particles in the system at a given time
> pos_list[1]=y_list[i]
> pos_list[2]=z_list[i]
> particle=v.sphere(pos=pos_list,radius=my_rad,color=v.color.blue)
> In a sense, I have filled the space with the same particle repeated
> many times, whereas I would like to have an array of particles
> part[j] whose positions can be updated in time.
Try this (to get all points in the frame):
my_rad = 1.06 / 2.
particles = [v.sphere(pos=loc, radius=my_rad, color=v.color.blue)
for loc in zip(x_list, y_list, z_list)]
> 1)zooming and selecting a part of the scene (i.e. some specific particle
> configurations) and generating a pdf or eps or jpg or png file.
See Ruth Chabay's contributed program to go from Vpython to POV-Ray
source, then use POV-Ray to go from source to .png image.
> 2)generating a movie. I saw there is a contributed program which should
> work only for MacOS and I wonder if there is anything similar available
> for Linux (I am running Debian testing on my box).
First, you are not asking anything simple when you ask to go to a movie.
Your head needs to get higher if you really want to do this. E-mail me
separately if you have everything solved up through getting .png images,
and I can provide you with "no redistribution; no comercial use" code to
take a bunch of .png files to a .mng file (which is an obscure movie
format, but there _are_ a few readers out there).
--Scott David Daniels
Sco...@Ac...
|