Sundial: History, functioning and types