cost+t*sint2 + sint-t*cost2 = d