[Image-SIG] that's enough
Yury V. Zaytsev
yury at shurup.com
Tue Jul 20 09:42:09 CEST 2010
On Mon, 2010-07-19 at 18:18 -0500, Jack Uretsky wrote:
> In answer to your question,
> this is a simulation. The "events" are program generated; I'm trying to
> approximate a Poisson process, so the times between event pairs are
> exponentially distributed.
Hi!
It seems to me that you are consistently trying out wrong tools for the
job. Maybe next time you should really start by explaining what you want
to achieve in the first place?
What you really need is pygame. It is a simple Python SDL wrapper, that
is absolutely great to use for simulations visualization. This is the
code you need to get what you want:
# Center window on the screen
os.environ["SDL_VIDEO_CENTERED"] = "1"
pygame.init()
pygame.display.set_mode(self.screen_size, 0)
screen = pygame.display.get_surface()
# CYCLE
# Create the backgound
background = pygame.image.load(fullpath)
background = background.convert()
# Display the background
screen.blit(background, (0, 0))
pygame.display.flip()
I have written a 2D n-body problem simulator that I used as teaching
material for a Python course this spring, so if you want a more complete
example I can send it to you, but either way, I think it's better off
this list.
--
Sincerely yours,
Yury V. Zaytsev
More information about the Image-SIG
mailing list