A charged particle moving at an angle to a magnetic field like that found at the ends of a solenoid (increasing field strength) would produce the desired motion.
Example: https://s3-us-west-2.amazonaws.com/courses-images/wp-content...
Example: https://s3-us-west-2.amazonaws.com/courses-images/wp-content...