Particle emitter on sphere mesh

Hello everyone,
I’m a newbie in the Openframeworks world, and I’m trying to set some particles emitter from the surface of a simple sphere mesh, using the vertices: how can I do that?

Thanks for your support!


Hello Alessandro. I would suggest you to divide the problem.
At first you have a particle emitter. In the examples folder (math/ParticleExample) there are 4 kind of particle, one of them is the emitter.
Once you’ve got this, you simply have do arrange your point emitter on the surface of a sphere. There are different way to do this, it involves some math. You would probably display them in a random way. The Wolfram website has a nice intro

When you have this two parts working, you will probably end up with the particles that does not go in the direction you are expecting, each particle emitter should point outside the sphere. That means, you should be able to define a direction in which the particle emitter should emit your particles.
This direction is easy to find, it is just, in pseudo code

glm::normalize(positionOfEmitterOnTheSphere - CenterOfTheSphere)

I would start from point 1 or 2.

1 Like

thanks man!