[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Old pygame tutorial not working





Knapp schrieb:
On Mon, Aug 4, 2008 at 10:15 AM, Jake b <ninmonkeys@xxxxxxxxx> wrote:
On Sun, Aug 3, 2008 at 2:46 AM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
If colors had only a red component, suppose, there would be 256 shades of
red.  Because this is the case with grey heightmaps (only 256 shades of
grey), there can only be 256 heights encoded.  The obvious solution is to
use all four values of color to encode more data, but this is
computationally unfeasible.
I'm curious why? ( My thought is that doing a get on r,g,b,a would be
fast relative the blur operation? )

Does this fix it?

soften[1:][0:] += Data[0:-1][0:]*8

I think if you want to slice pixel arrays then PixelArray() works
better: http://www.pygame.org/docs/ref/pixelarray.html

--
Jake

Why not just use an array of floats?



Why not use the height as interpolation points and interpolate between them? (using a spline or bezier or any other interpolation method)


~DR0ID