Sony patents real-life 'Matrix'