# Joining two curves in geometry nodes (Blender 3.1)

I would like to create a lemniscate, which is a figure 8. I would like it to rise as it swoops back and forth. I tried to do model the 2-d version using polar coordinates [r^2=(a^2)cos(2theta)] or rectangular/cartesian [(x^2+y^2)^2=(a^2)*(x^2-y^2)], but couldn't figure out how.

So, I tried to do a workaround using arcs. I was able to make two arcs and join them, then put in a little bit of height. However, there is a gap between the two arcs/curves. This occurs where the first curve ends and the second begins. How can I join them so there is no gap (i.e., so it is one long curve)? Then, how can I turn that into an array?

If anyone does also know a workaround on the polar plotting, that would also be hugely appreciated!

Thank you!!!!!

• This page, (8) and (9) give you the parametric form, so you can do something like this.. If you let us know what you mean by 'rise up and down', we can tweak it. Commented Feb 20, 2022 at 17:14
• @RobinBetts: why not copy that as an answer? ;) Commented Feb 20, 2022 at 17:22
• Hi @Chris! Well.... OP could be specifically about joining (which, keeping indexes clean, is a bit of a trick?)... or 'rising and falling' .. I thought I'd wait and see.. Commented Feb 20, 2022 at 17:29
• @RobinBetts Thank you very much. I apologize that I wasn't clear. In the non-polar solution, I want to see how to make the two sets of points in the curves read as one so that it is one curve with no gaps between points. Right now there is a gap between the end point of the first curve and the start point of the second. That becomes evident when I adjusted the z of the curves as can be seen in the viewport in the attached picture to the original post.
– Dave
Commented Feb 20, 2022 at 17:51
• @RobinBetts With regard to the polar page, thank you. I had found that page as well, but have no idea how to input it into the X, Y, Z Function Surface Function that Blender has, or, more helpfully, input it in as math in Geometry Nodes so that I can adjust the Z position (that was what I meant by rising and falling) on my own and can also adjust the number of rotations afterwards (in other words, make a series of six connected rising lemniscates).
– Dave
Commented Feb 20, 2022 at 17:53

If your curve can be expressed in a parametric form (i.e. its X,Y and Z as a function of distance along some 'timeline' t), then producing it through Geometry Nodes is just a question of plumbing.

Create an arbitrary curve, sample it at the desired resolution, and then set the X,Y and Z of its points to the parametric function of its (0->1) Curve Parameter .

In your case, the parametric form of the 2D curve can be found in this reference, (8) and (9). The function is based on sin and cos, so it's cyclic with a period of 2*pi.

The bulk of this tree is just a transliteration of the 2D reference. @Dave has made the necessary adjustments, (marked red) to add a number of turns, in Z:

.. with this usage:

@Dave's .blend can be found here.

I thought I would try this using the polar equation

1- I watched a tutorial that was very helpful in explaining each part of the node network that deals with polar equations. link here