Question

I generated some caves with random walk. The problem is that the output is far too small and i want to scale it up about 10-20 times. When i do so every pixel becomes visible so i need some algorithm to solve this. I thought about some sinus or cubic interpolation as it is in 1 dimension, that goes along the edges and interpolates between the centers of the pixels... So basicly the height of each pixel would be the Y axis of the graph. The image itself has only 2 "colors" wich are black and white.

The black dot is the center of each pixel and the red line the Interpolation i would like to archive: what i meanHere is how the whole cave looks like: the cave

Is there a way to realise that? Or is it impossible? I wonder how i could solve it when the caves edge goes back on the X axis, since the graph couldnt have 2 dots for each X.

Était-ce utile?

La solution

You can blur or antialias and then posterize to BW again. Basically this is going to smooth the edges, as if you applied an exponential smoothing function.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top