The setup I’ve posted has a small flaw… While using more than 5 rays will minimize the distortion to 0, having less than that will start to make the center a bit shrinked…

I figured the problem but the solution is far more complicated and slower… So if just 3 or 4 stripes, and you want the corners straight, CarlG’s setup is better. Otherwise use mine setup.

In the setup, the top part is where I create the stripes, by multiplying the radial gradient by 2N for N=number of stripes. (you may want to have the node wrangler on for looking to is step by step)

The radial gradient has a range that goes from 0 to 1 and uses the origin of the coordinate system as center; after multiplying it becomes a radial from 0 to 2N.

Then,with the modulo node I split the radial in N parts (of size 2). This turns the gradient into N slices of a smaller gradient from [0 to 2].

Subtracting 1 and using the absolute, turns the [0,2] gradient into [1,0,1] for each slice.

My thought was to scale the values of the [1,0,1] gradient by the distance to the center. So that some value in that gradient would become closer to 0 in relation to a longer distance. Since the scale is linear, I thought using the distance directly, but here is the flaw. The gradient is circular, and I would need to transform it in to a linear gradient and do the scaling after (which is not so trivial to do with nodes).

The bottom part is just the distance to the center (the dot product).

The dot product is a nice tool for handling vectors.

Dot(vectorA, vectorB)=cos(A,B) * lengthA * lengthB,

or by components:

Dot(A, B)=Ax*Bx+Ay*By+Az*Bz

If we use the same vector as in Dot(vector A, vector A), we know that the angle between A and A is 0, so the cos(A,A)=1.

This ends as Dot(vectorA, vectorA)= lengthA * lengthA. The square root of it is therefore the distance from the origin of any vector.

If you look closer to the component version, if you change the Bx, By to Ax, Ay, and use 0 for the Az and Bz, you’ll see that what you get is the Pitagoras theorem.