# Why is curveTightness acting so weird?

**URL:** <https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770>\
**Category:** Coding Questions\
**Created:** [June 17, 2021, 8:09pm UTC](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770 "2021-06-17T20:09:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cog](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cog/32/13666_2.png) [@cog](https://discourse.processing.org/u/cog)\
**Post date:** [June 17, 2021, 8:09pm UTC](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770/1 "2021-06-17T20:09:39Z")

</div>

[https://editor.p5js.org/CarlyRaeJepsenStan/sketches/xH6tvmKep](https://editor.p5js.org/CarlyRaeJepsenStan/sketches/xH6tvmKep)

 ![Screenshot 2021-06-17 130541](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/9ac008f43660488583330a9ca0b8e73d22c6d017.png)

I am applying curveTightness to a shape made out of points and curveVertex. For some reason, after a certain level of tightness on the curve, this strange thing develops on one of the points. Any idea what could be causing this?

---

<div class="post-metadata">

**Author:** ![KumuPaul](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kumupaul/32/13072_2.png) [@KumuPaul](https://discourse.processing.org/u/KumuPaul)\
**Post date:** [June 17, 2021, 10:53pm UTC](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770/2 "2021-06-17T22:53:47Z")

</div>

`CLOSE` has strange behavior with curves. I would suggest drawing curves without using `CLOSE` and take note that when drawing open curves there will be no segment between the first and second, nor between the second to last and last, vertices. The first and last `curveVertex()` just act to control the shape of the subsequent or preceeding segment.

```auto
  beginShape();
  curveTightness(tightness);
  
  //starting from the upper left corner clockwise, the 
  //points are -,- ; +,- ; +,+ ; -,+
  /*
  // It's not clear why you were drawing the box separately as part of the same shape.
  vertex(a, c);
  vertex(b, c);
  vertex(b, d);
  vertex(a, d);
  */
  
  curveVertex(a, d);
  // No segment here
  curveVertex(a, c);
  // Top
  curveVertex(b, c);
  // Right
  curveVertex(b, d);
  // Bottom
  curveVertex(a, d);
  // Left
  curveVertex(a, c);
  // No Segment
  curveVertex(b, c);

  endShape();

```

---

<div class="post-metadata">

**Author:** ![cog](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cog/32/13666_2.png) [@cog](https://discourse.processing.org/u/cog)\
**Post date:** [June 19, 2021, 1:06am UTC](https://discourse.processing.org/t/why-is-curvetightness-acting-so-weird/30770/3 "2021-06-19T01:06:17Z")

</div>

Thanks! I didn’t know you could define the curve only with curveVertex.
