update 3d math