[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: raster and aspect ratio
From: |
John Carnahan |
Subject: |
Re: raster and aspect ratio |
Date: |
Wed, 14 Feb 1996 12:34:00 -0800 (PST) |
Nelson,
> Such a thing would be possible, but it's not clear it's desireable.
> Reading data off an X window is very slow - is there some easy way for
> you to store your data elsewhere so you can read it when necessary?
Sorry I did not explain myself the first time.
In my case, with a large world, it might be necessary. I currently scale
my world to the display using linear transform of x and y. What I want
to do is not let a mosquito draw over a hut (if you remember my
simulation). I cannot do this by just checking if they are in the same
location in the simworld since even if they are not it may translate to the
same point in the display window. For now I simply have the hut objects draw
themselves every time step which seems like a waste. So I thought it
might be convenient to just display them once and if a mosquito is in a
hut - it does not display itself (which makes sense from an OOP
standpoint). Another alternative would be to hold the hut positions on
the display as sacred and not let the mosquitoes draw over them but this
would entail modifying the Raster.m code. So I guess it just depends on
what is most efficient: Getting the color at a position, drawing the
object each time (this really hurts with a ton-o-objects) or keeping a list
of sacred points in the display. I thought that the first option would be
the most effective. What do you think?
Thanks,
JohnC