Sphere made of noise (but with defect, plase help)

FABIA SANTCOVSKY's icon

Hi, so you know when we create an snorm 3-d matrix so we have a nice 3-d cube filled randomly with particles as a starting point for creating something? I wanted to have a randomly filled SPHERE not cube.

Everything kinda works fine but I notice there is an oddly accumulation of more particles around axis Z and I've tried to mess around with the content of jit.gen (also shown) and I can't seem to find why does that happen.

Any clue? Or directly anyone sharing their own way how to create a particle system which is basically a noise sphere?

Thx

TFL's icon

First I was getting somewhat not-too-bad results by converting to polar coordinates (not using poltocar as it is only 2D), folding the length into the range [0, radius], and convert back to cartesian.

But you'll still get uneven accumulation.

Then I found this which gave me a better result (although still not perfect).

Max Patch
Copy patch and select New From Clipboard in Max.

FABIA SANTCOVSKY's icon

How is not the second version not perfect? Looks fantastic to me!! Thanks so much!! I still don't follow why this happens (I tweaked your codebox to use a definition of theta directly from in.y doing a similar manual snorm using TWOPI as multiplier, and again it generates a sphere but with some odd distribution). Anyway, thank you!

Rob Ramirez's icon

just to throw another log on the fire, you can also use jit.geom.distribute for some similar behavior. This technique might not be useful to you since it only distributes along the surface, but it allows you to use any shape source rather than just spheres. adding a little noise gives a little more volume to the points at the expense of definition

Max Patch
Copy patch and select New From Clipboard in Max.