the pools were connected at odd angles by marble channels that were cleverly shaped so that it appeared as if the water flowed in an endless perpetual circle , sometimes falling down , sometimes flowing uphill against gravity .