Well, before you make the attempt you should know that in most cases the police have all the evidence and judges are inclined to believe their word over yours since they are law enforcement officers. If you try to beat your ticket and fail you not only have to pay your fine, but there will also be additional court costs waiting for you as well. That makes taking a ticket all the way to court is hardly ever worth your effort.
Unless you happen to be a physicist. Then you might just have the laws of the universe on your side. At least, it was for physicist Dmitri Krioukov who fought his $400 ticket for running a stop sign using the laws of, well, physics.
Krioukov was able to prove (using physics) that when he inadvertently sneezed while approaching the stop sign, he stopped just briefly enough that the police officer who was watching him failed to notice it due to passing vehicles. Korioukov was so convinced of this he wrote a four page detailing the exact process which caused this “optical illusion” which he claimed caused the police officer to take the error in citing him for running the stop sign, which Korioukov claims he didn’t do.
The judge was apparently impressed with Korioukov’s due diligence and the math he presented in his detailed explanation and found the man not guilty of running the stop sign. Even the police officer was unable to dispute the facts as presented by Korioukov and ceded the point.
However, unless you are a physicist, and have the laws of the universe on your side, you might just want to pay the fine and attend traffic school.