Canonical transformations in three-dimensional phase space