The surface of behaviour created by competing tropisms. Moths circling candles, and so on. Often creates fractal / biological forms.
For more information on conflict patterns, see: http://online.sfsu.edu/~psych200/unit10/101.htm. It is quite common for automated and human systems to follow an ApproachAvoidanceGradient. An example is given on the PartingPhilosophersProblem.
I'm not sure a moth circling a candle is a good example. Moths circle candles, lights, etc., due to a fooled navigational mechanism rather than an equilibrium in approach vs avoidance drives. Whether the moth circles or strikes the flame apparently depends entirely on the angle of incidence when it encounters the light. See http://park.org/Canada/Museum/insects/evolution/navigation.html
Living in a bug-rich rainforest, I can assure you that very few moths actually self-immolate. Otherwise, open fires would be a simple way for hunter-gatherers to get a free feed.
Curious. My lamp fixtures are full of small, crispy, dead moths.
Bird flocking - or at least the AI simulation thereof - is a clear and excellent example. However, moths circling lights are generally understood to be a failure of a simple navigation mechanism and not a form of approach-avoidance.