# Intervals visible using perlin noise and curveVertex

**URL:** <https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532>\
**Category:** Processing.py\
**Created:** [August 28, 2020, 6:58am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532 "2020-08-28T06:58:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benf](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@benf](https://discourse.processing.org/u/benf)\
**Post date:** [August 28, 2020, 6:58am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532/1 "2020-08-28T06:58:42Z")

</div>

Hi

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

 ![perlin_intervals_visible](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/919922cb2b9ee3af493377057df1cc655f2cd447.jpeg)

CODE using processing.py

```auto
w=800
h=850
def setup():
    size(w,h)
    background(255)
    noLoop()

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

```

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 28, 2020, 8:17am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532/2 "2020-08-28T08:17:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![benf](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@benf](https://discourse.processing.org/u/benf)\
**Post date:** [August 28, 2020, 8:37am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532/3 "2020-08-28T08:37:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [August 28, 2020, 9:43am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532/4 "2020-08-28T09:43:18Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![benf](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@benf](https://discourse.processing.org/u/benf)\
**Post date:** [August 28, 2020, 11:02am UTC](https://discourse.processing.org/t/intervals-visible-using-perlin-noise-and-curvevertex/23532/5 "2020-08-28T11:02:20Z")

</div>

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