On Sun, Jun 21, 2009 at 02:04, Ian Mallett <geometr...@gmail.com> wrote:
>
> Hello,
>
> I'm working on a program that will draw me a metallic 3D texture.  I 
> successfully made a Perlin noise implementation and found that when the 
> result is blurred in one direction, the result actually looks somewhat like 
> brushed aluminum.  The plan is to do this for every n*m*3 layer (2D texture) 
> in the 3D texture.
>
> My solution to this anisotropic blurring looks like:
>
> soften = layerarray.copy()
> total = 1
> for bluriter in xrange(1,5,1):
>     soften[:,bluriter:]  += layerarray[:,:-bluriter]
>     soften[:,:-bluriter] += layerarray[:,bluriter:]
>     total += 2
> soften /= total

Use scipy.ndimage.convolve() and an appropriate convolution kernel.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to