I'm making a game and I need to represent a "layered" circle in some clever datastructure.
A circle can have any number of layers. Each layer has a number of "slices", they can be of different lengths and pieces can be missing. The innermost layer is always a full circle. Each segment has a color, multiple segments with the same color can be next to each other.
Realistically a circle wont have more than about 40 layers or about 1500 individual slices.
I will need to be able to easily find adjacent pieces to a specific piece, see if a piece is "hanging in free air" (imagine gravity towards the center), and to remove pieces leaving a hole in their place.
I've already got a few ideas for how to store this, but I thought it was an interesting question so I figured I'd post it here for kicks.
I will be coding this in Actionscript 3.0, but feel free to post ideas in any language.