Exemplary embodiments are directed to a heat engine. The heat engine includes a pipe that defines a continuous internal path. The pipe includes a first pipe section and a second pipe section. The heat engine includes a first piston disposed within the first pipe section. The heat engine includes a second piston disposed within the second pipe section. The first and second pistons are magnetically linked to travel along the continuous internal path of the pipe.