five and eight

I don’t know much about the mechanics/physics of photography, but I think the lens flares (correct nomenclature?) are pretty neat in this photo.

What I don’t really understand is how some of them are five-sided (the pentagons on the left side of the image) while others are eight-sided (the rays around the two streetlights). Perhaps the five-sided-ness is a result of the lens having five plates in the iris diaphragm? Perhaps the eight-sided-ness is the result of lens refraction? Who knows? Not me!

five and eight