Hi Cheng,

It’s a bit abstract and involves some math that might look confusing.

I’ll try to explain the flow by going through all operators starting from the left, but first you’ll need to know a bit of the math that’s being achieved using those operators.

You can describe an unit sphere (sphere with radius 1) using 2 angles. 1 angle describing the angle on an unit circle (xz), the other the latitude (y). If you then make a top that ranges from 0 to 1 and use that as fraction of those angles, you’ll get a top with xyz positions that cover the surface of the sphere.

For examples if both angles are 0, it would point to (0,1,0), then if the first angle goes from 0 to 1, it will calculate all positions on a circle, then if you ‘rotate’ that circle in the other dimension 180 degrees it will cover a sphere.

To calculate a point on a circle you can use: x = sin(angle1 * 2 * PI) and z = cos(angle1 * 2 * PI). Then to rotate it 180 degrees, you can multiply those values with sin(angle2 * PI) and set y = cos(angle2 * PI).

If you then let ‘u’ be the variable going from 0 to 1 over the horizontal direction of the TOP represents the angle1 and ‘v’ be the variable over the vertical represents angle2, you’ll get:

x = sin(v * PI)*sin(u * 2 * PI)

y = cos(v * PI)

z = sin(v * PI)*sin(u * 2 * PI)

So this covers the surface of a sphere with radius 1. If you want to have a different radius you can simply multiply x, y and z with a number to scale the whole sphere. If you vary this per pixel you can manipulate/deform the sphere super fast.

So to express this in operators:

First I create a rampTOP (ramp1) to let the values go from 0 to 1 over the ‘u’ or ‘x’ (horizontal), then I use a flipTOP (flip1) to have the same ramp over ‘v’ or ‘y’ (vertical). For the ‘u’ values I’m calculating the sin and cos of the angle1 using a functionTOP. The cos() is stored in the ‘r’ channel, and the sin() in the ‘g’ channel of the TOP.

Similarly for the ‘v’ values the sin and cos of the angle2. Since angle2 is only 180 degrees (PI instead of 2PI) I’m using a mathTOP (math1) to change the range from 0 - 1 to 0.25 - 0.75. Then using reorderTOPs I’m fetching the individual results of the trigonometric results, so I can multiply them together. First to calculate the ‘x’, I’m multiplying (multiply1) reorder2 (cos(u)) with reorder4 (sin(v)), and multiplying (multiply2) reorder3 (sin(u)) with reorder4 (sin(v)) to get the ‘z’. Finally to get the ‘y’ I’m just fetching the cos(v) values. I’m multiplying (math2) it with -1 just to make y point up in the TOP, this is not really needed, so you could remove that one

Finally merging them all together into 1 top using again a reorderTOP (reorder6) and setting alpha to 1. This results in a TOP where every pixel represents a point of the surface of the sphere. I’ve added a null2 to show the results in points (‘v’-mode when viewing a top).

If you then multiply that top with something else, you can alter the radius like described above. Then I use the final null1 TOP as source of instanced particles, positioning them on the xyz I just computed.

The particles themselves are created by using an addSOP (Points/add1) to create a point, then converting it to a particle using a convertSOP (Points/convert1), this makes sure it gets rendered as a point.

I noticed I didn’t include any materials. You could add a lineMAT to the Points geo to have some control over how the points are rendered.

Hope this all makes a bit of sense. Not sure how much of the math you understand, perhaps check out Sphere - Wikipedia and Spherical coordinate system - Wikipedia where they explain it way better than I ever can

Cheers,

tim