Interpolate points to create an Epicycloid

I everyone, I have been playing with Grasshopper for a little bit and I was trying to create an epicycloid using this simple definition.

So far, I was able to generate the points of the epicycloid as shown below.

Where I am struggling is to connect the points with a curve. I tried with the component spline>Interpolate but I got the a set of curves that connects all the points based on their index

I am more interested in get a curve like this:

I suspect the problem is that the interpolate is connecting points based on index number 1,2,3,4,5 instead of connecting the ones that are on the vicinity. I tried to sort but I did not get results I was expecting.


Does anyone has some advice on how to tackle this problem? (7.7 KB) (10.5 KB)


@HS_Kim , thanks for your help. This is what I was looking for

My only awareness of epicycloids was relative to gear designs, but after seeing HS_Kim’s elegant solution I just had to try using such a shape for a 3D printed bowl. So I simplified his solution a bit and put it into a cluster

so I could add it to one of my GH bowl generator files. I came up with this on my first attempt:

This exports as a nice manifold STL file that is fairly large and would take almost 2 days to print, so I’ll tweak it to a smaller shape for my first actual print.

Thanks to both Roland and Kim for making this possible.