# Vertex Command Issues

**URL:** <https://discourse.processing.org/t/vertex-command-issues/30087>\
**Category:** Coding Questions\
**Created:** [May 13, 2021, 6:08pm UTC](https://discourse.processing.org/t/vertex-command-issues/30087 "2021-05-13T18:08:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![willreichling12](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@willreichling12](https://discourse.processing.org/u/willreichling12)\
**Post date:** [May 13, 2021, 6:08pm UTC](https://discourse.processing.org/t/vertex-command-issues/30087/1 "2021-05-13T18:08:26Z")

</div>

We are trying to build a curve based off control points in multiple segments. We have a beginning segment for the first three control points, an end segment for the last three, and an entire middle with multiple segments of three. We are able to build a segment of a curve using the vertex command, but when we try to combine the segments together, the vertices do not connect in the correct order. Instead of the last point of the first segment connecting to the first point of the following segment and creating a curve, p5 is connecting the points in an incorrect order where it is drawing multiple straight lines.

[https://editor.p5js.org/Ckagan1120/sketches/ZmC8S5idJ](https://editor.p5js.org/Ckagan1120/sketches/ZmC8S5idJ)

Click 5 points on the canvas. You can turn down the curve resolution slider to get a clearer look at what is actually happening.

We recommend to click in a up and down, zig-zag kind of direction

Thanks in advance!!

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [May 14, 2021, 10:39pm UTC](https://discourse.processing.org/t/vertex-command-issues/30087/2 "2021-05-14T22:39:15Z")

</div>

Hi,

Welcome to the community! 😉

> [@willreichling12](#):
>
> but when we try to combine the segments together, the vertices do not connect in the correct order.

Can you send a picture of the actual issue?

Because I don’t quite understand it, is there something not correct here? :

 ![Capture d’écran de 2021-05-15 00-37-47](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/90ba195f9d4e7233d7e2373e06ee45845095538b.png)

---

<div class="post-metadata">

**Author:** ![ChadKagan](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@ChadKagan](https://discourse.processing.org/u/ChadKagan)\
**Post date:** [May 15, 2021, 12:53am UTC](https://discourse.processing.org/t/vertex-command-issues/30087/3 "2021-05-15T00:53:19Z")

</div>

Hi Joseph,  
I am his partner on this project. Sorry to bother you with this now but we figured it out on our own this morning, so yes that is correct. Thanks anyway!

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [May 15, 2021, 10:18pm UTC](https://discourse.processing.org/t/vertex-command-issues/30087/4 "2021-05-15T22:18:19Z")

</div>

All right, glad you found it! 😉
