If you're working on a class project, you need to learn that it is never illegal for US residents to leave, for any reason at all, unless so ordered by a judge (which is only done if the person is a flight risk concerning matters before the courts).
No..certainly not. You were denied the patent because either someone already took the patent, or the technology does not blend into the patent laws. You did not break any law, so enjoy your trip.