In earlier civilizations, science (math in particular), religion, and art were not separate. We don't even have a word for the broad and fluid field they formed together, but we can get a feel for it by gazing at any of the many astounding works of geometric art which have survived till now, and are usually part of a sacred structure.