Skip to content
  • Dmitry Kazakov's avatar
    Cage Transform is ready for testing (implemented the last bit: extrapolation) · e4db0858
    Dmitry Kazakov authored
    That was a tough task. The points outside of the outline of the cage
    are not defined in green coordinates, so we would either need to:
    
    - chop the grid into smaller chunks near the outline, which would make
      the grid non-uniform with lots of inherited complications
    
    - extrapolate the points near the outline of the cage based on the
      internal points which lay inside the cage polygon.
    
    I chose the latter approach. It is much easier to implement, but has one
    small drawback. Sometimes, if your cage is too narrow (e.g. 8-16px wide),
    the interpolator may not find the points suitable for a base. In such a case
    the corresponding cell of the grind will be dropped from the processing
    and you may see an empty cell.
    
    The cell sizes:
    
    1) Preview: 16 px
    2) Real transform: 8 px
    
    So when creating the cage, just ensure you are not creating the cage
    polygons more narrow than 8 px. This limitation applies only to the
    non-deformed grid. The deformed one can have arbitrary configuration.
    
    CCMAIL:kimageshop@kde.org
    e4db0858