3

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!!!!! Screenshot of failed attempt

Dave
  • 31
  • 3
  • 1
    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. – Robin Betts Feb 20 '22 at 17:14
  • @RobinBetts: why not copy that as an answer? ;) – Chris Feb 20 '22 at 17:22
  • 2
    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.. – Robin Betts Feb 20 '22 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 Feb 20 '22 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 Feb 20 '22 at 17:53
  • By 'connected lemniscates' do you mean a spirograph pattern? If not, could you illustrate? (BTW, the .blend of the way to get the simple lemniscate is linked in the original comment) – Robin Betts Feb 20 '22 at 18:15
  • @RobinBetts Wow!!! I totally missed the Blend file. That was exactly what I was looking for! Thank you so much. I wish I could say I fully followed the math. It would be great to understand it to get around Blender's lack of polar functions. I was able, though, to easily take it and add on a height function and a # of turns function. See Blender File Here. How were you able to do this so quickly? I'm very impressed and thankful. – Dave Feb 20 '22 at 20:51
  • @Dave Cool! No problem. I'll make it into an answer tomorrow. – Robin Betts Feb 20 '22 at 21:24

2 Answers2

3

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:

enter image description here

.. with this usage:

enter image description here

@Dave's .blend can be found here.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
0

I thought I would try this using the polar equation

img1

Some helpful notes:

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

2- I used the Math Formula add-on to create the equation. Add-on link here. Video of how to use the add-on link here.

3- Also my transition isn't very smooth in the center of the lemniscate.

Here's the main equation:

img2

The full node network:

img3

What it looks like: img4

Blend file link here:

Rick T
  • 4,391
  • 1
  • 20
  • 64