# Equations/algorithm for my effect

This topic is 4826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've seen this effect in some game somewhere and I'd like to do something similar (it might have been the microsoft splash screen in some xbox games). It's some particles flying around a sphere in a somewhat random pattern. Each particle appeared to be all in a line (follow the leader) rather than chaotically flying around. My requirements are that it needs to be done inside the UI system so it will be a 2D effect that looks like it's going around a sphere. So I imagine I'd make the effect function in x,y,z and then flatten it to 2D during the render. My problem is that I'm not sure where to start. Are there some sphere following algorithms or something like that out there that may help me?

##### Share on other sites
For making particles follow each other, google for "flocking" or "boids". These algorithms generally are written for euclidean space, but since a sphere is locally euclidean it shouldn't be difficult to adapt them.

##### Share on other sites
for a particle following some path around the sphere, you could define a bezier like curve defined on the sphere, however instead of using linear interpolation(larp), like normal bezier curves, you'd used spherical liner interpolation (slerp). I've seen this done for similiar things, and it gives nice results. of course you'd have to hard code in a path, but you could generate random paths and connect them using catmull-rom or somthing, you want the particle to atleast have a continuous motion, not jerky you know. to make the particles roughly follow a point on your interpolation curve you could have the particle density fall off from the leading point, there is lots you can do, this would have the shooting star effect.

Tim

##### Share on other sites
Thanks guys, I'll look into your suggestions. I'm thinking that it may be far too time consuming to implement though for such a minor effect. ;-) If this will take more than a day, maybe I'll just go with some kind of pulsing visual.

##### Share on other sites
If it's the effect I think you are referring to, the position of each particle is calculated using a fixed combination of a couple of sin cos functions added(/multiplied) together with different scaling and phase, were each particle has it's own offset within the phase. Pretty ancient demoscene effect from the good old mode 13h days :D

1. 1
Rutin
67
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633417
• Total Posts
3011782
• ### Who's Online (See full list)

There are no registered users currently online

×