Intervals visible using perlin noise and curveVertex


I was trying to use perlin noise for the first time using it to gently nudge some coordinates every interval along the y-axis and connecting those with curveVertex.
When I looked at the image I saw those intervals where the curveVertex is drawn (the “ystep” in the code) appeared to be somewhat visible surrounded with blank space. When zooming in on the image it looks like the pixel aliasing of the curves stops at the intervals where it is then drawn as a straight line.

My question is if there is a setting/way that can hide these intervals/smooth them out or is it just a consequence of using curveVertex in this way and should I be looking at trigonometry based waves?

Thank You

CODE using

def setup():

def draw():
    shifter = 0
    xstep = 5
    for x in range(100,700, xstep):
        ystep = 40
        for y in range(10,850, ystep):
            i = map(noise(y+shifter),0,1,-9, 9)

I guess this is the way anti aliasing works.
Try noSmooth()

noSmooth() indeed makes the intervals disappear with the downside of the curves being not so pleasant to look at. I guess it’s just the way it is then. Thanks

Does it help if you render it as an SVG file?

def setup():
    size(w, h, SVG, 'output.svg')

Then you can convert output.svg to a high-res raster image (PNG, etc).

1 Like

Currently not familiar with svg, but I will look in to it

1 Like