However, I have very liitle idea on how i can make it. I wrote a code for two spinning ellipses, but I don’t think that it is correct to start with circles. Maybe PVector could help me, but I didn’t manage to make something useful with my skills.

When you have the name, start by reading the wikipedia article.

You need to get the math before you can go to programming.

When you make a screen shot you can see better what’s going on:

it’s a 3D circle which is twisted in itself

Example

here is a wrong approach with a 3D circle and Z has an additional sine().
The good thing is we can control each point on the circle.
Bad thing is that’s wrong. That’s mainly because the additional sine() is only with Z.
Please google the right formula.

Start by creating a circle of points so that we can manipulate their positions. We want the points connected by lines, so use beginShape(), a loop of vertex()es and endShape(). We can use cos() and sin() to position the points around the circle in the xy-plane.

hint( ENABLE_STROKE_PERSPECTIVE ); lets our lines have some 3D depth. Otherwise, they are always the same thickness on the screen.

Then notice that the circle twists around the x-axis. So, we twist the y- and z-coordinates by an angle based on the x-coordinate of the circle points using another cos()/sin() pair. How much do we twist? Well, it comes and goes, so we use a sin(time) function, scale and shift it to the 0 to 1 range and then notice that it pauses at 0, so we raise it to a power of 2 to hold it longer near 0.