curve transformation code for ray-curve intersection added