Panorama warping cylinder

One approach would be to use SurfaceMapper – and possibly try using the SurfaceMapperGUI (may need to be updated). The problem with an algorithmic solution in this case is that very tiny variations in your cylinder surface or in the angle of your projection mounts will cause a pure geometric approach to create distortion. An alternative is to create a segmented, bezier-curve controlled surface that you can tweak at installation time and save the settings, like this:

The GUI might need to be updated for Processing 3 – I haven’t tried it.

Another old (deprecated) mapping library for Processing that supports curves – MappingTools

http://www.patricksaintdenis.com/mappingtools/

Check out in particular BezierWarp and ClusterBezierWarp.

A more up-to-date projection mapping library is Keystone, but it lacks the curve warping support that you will need. Perhaps the curve code from SurfaceMapper could be ported to KeyStone…

https://fh-potsdam.github.io/doing-projection-mapping/processing-keystone/