Using trigonometry, we can simulate a swarm of fireflies. This is just an animation demo. The fireflies are random points on a sphere, which are then rotated in random directions. The 3D coordinates on the sphere are translated to 2D coordinates for the screen, making it look like the fireflies hover around within a certain radius. Their flight path looks random and chaotic, but it's just math!