-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|492|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Generators


 
Pakz
Created : 06 April 2019
Edited : 07 April 2019
Language : monkey2

Additive random line Texture

Create a greyscale stone like texture

Emscripten html5 version
Screenshots

Latest Update

I was looking at a video of the coding train where liquid simulations were shown. I got some inspiration from that.

Here in this snippet I have a array that acts as the image canvas. I have a function there that takes a x,y position and a angle. From that function it moves into that angle for a certain distance while adding the color intensity under it's position.
This function gets called around 20000 times on a 640*480 image and the result is a stone like texture.

 

Comments


Saturday, 06 April 2019, 20:09
HoboBen
That's really pretty!
Sunday, 07 April 2019, 02:59
Pakz
Yeah, this one came out pretty well. And not many lines of code to do it.

btw : I added a link to the emscripten page.