kr15h / ofxPiMapper

Projection mapping addon for openFrameworks that works on the Raspberry Pi
http://ofxpimapper.com
Other
461 stars 93 forks source link

Simple Grid Surface (FFD = Free-Form Deformation) #187

Open magdesign opened 2 years ago

magdesign commented 2 years ago

Anyone know how to add a grid surface to ofxPiMapper?

Meaning a surface which is split into 4 parts as shown here: quad_warp

So we are able to move the center point and also the horizontal and vertical middle. I know that it should be solvable with a mathematical theorem (german=> Strahlensatz) solution.

Currently when I use several quads in ofxPiMapper it will not fit: ofxpimapper

What I found is this paper: https://www.ronenbarzel.org/papers/warp.pdf See on page 14: freeform

and also this paper: https://www.inf.ufrgs.br/~oliveira/pubs_files/PG01_Adaptive_subdivision.pdf

Maybe someone good in mathematics can tell us the formula to code this?

kr15h commented 2 years ago

There is a grid surface. Have you tried hitting g in mapping mode?

kr15h commented 2 years ago

True it does not have perspective yet.

magdesign commented 2 years ago

True it does not have perspective yet

I tried on other mapping tools too, stitching quad surfaces together does nowhere work, so there is the need of quad-grid surface. Maybe @pierrep (https://github.com/pierrep/ofxPiMapper) can help us on this. Any inputs from people familiar with geometric calculations, mathematics, coding very welcome...

Maybe editing the existing GRID_WARP_SURFACE, since the current solution is not very usable. Ignore the additions of rows and columns, and focus only on something like posted above. Maybe @c-mendoza who made the circle surface back in 2017 knows anything... ;-)