Vertex Command Issues

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

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!!

Hi,

Welcome to the community! :wink:

Can you send a picture of the actual issue?

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

1 Like

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!

3 Likes

All right, glad you found it! :wink: