This is what I'm thinking:
- Get a ball bearing with an inner diameter >= the diameter of the lens.
- 3d print a gear with an inner diameter == outer diameter of the ball bearing
- Attach a linear polarization filter to the gear so it can rotate in front of the lens.
- Attach a stepper motor that drives the gear
- Use a TMC5160 silentstepstick, cut a trace and put it into motion controller mode
- Have the TMC diag pin toggle on "position reached" and have it control the shutter
- Update the position in the TMC to trigger on the next angle
- Add the images to a rotating buffer of size 4
- Use the 4 most recent images as textures to a GLES shader that calculates polarization angle.