Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path transformations
#29
(08-07-2020, 07:25 AM)Ottia Tuota Wrote: Looking at the picture you are likely to notice that the accomplished fitting is not the only possible. An infinite number of different fittings could be done when distortion is allowed. The plugin implements just one particular choice. Imagine the bounding box of the path drawn there; it is that box which is deformed into the shape of the quadrangle, and the path is deformed along with it.

(To make the plugin more general, to allow the user to choose from those infinitely many other possibilities, would mean complicating things again... I might be doing that next.)

That is what I said post #20. I have now indeed implemented a way to realize those infinitely many possibilities. The new version is 0.20 (see post #1 for how to get it). No other changes (except for a couple bug fixes).

Now the plugin asks for a reference box. The default is the bounding box of the source path, and you can apply that without any further trouble - just use the default and you get the same result as from the older version. But now there is another option: You can draw a quadrangle roughly around the source path and feed that to the plugin to be used as the reference box:

   

What is happening here is: Imagine in that picture that you translate each of those four edges of the reference box a little to be a precise tangent of the path. This gives a box of four tangents (only imagined, you need not try to create those tangents). That imagined tangent box is sent onto the target quadrangle by a projective transformation, and the source path is transformed along with it.

(The "tangents" need not really be tangents if the source path has cusps or such, but the idea is the same. I use the word tangent just for simplicity.)

This enables you to control which points of the source path are sent onto the edges of the target quadrangle.

One fact may cause surprises: The plugin has now two quadrangles, the reference box and the target quadrangle, and to perform the transformation of the former onto the latter it has to decide which edge to map onto which edge. It does this by deciding which edges are lowest on the screen and matches those. For this it has its own algorithm, and the result may not always be what you would expect.

Of the reference box the precise locations of the edges is not so relevant, only their directions. So, there is some freedom to change the box in case of such surprises.

Please report if the plugin works strangely or fails altogether.
Reply


Messages In This Thread
Path transformations - by Ottia Tuota - 04-22-2020, 10:34 AM
RE: Path transformations - by Ottia Tuota - 04-22-2020, 12:27 PM
RE: Path transformations - by Ottia Tuota - 04-24-2020, 10:28 AM
RE: Path transformations - by Zero01 - 04-24-2020, 09:25 PM
RE: Path transformations - by Ottia Tuota - 04-26-2020, 06:36 AM
RE: Path transformations - by Ottia Tuota - 05-04-2020, 10:01 AM
RE: Path transformations - by Ottia Tuota - 06-08-2020, 11:08 AM
RE: Path transformations - by Ottia Tuota - 06-09-2020, 05:08 PM
RE: Path transformations - by Ottia Tuota - 07-12-2020, 12:50 PM
RE: Path transformations - by Ofnuts - 07-12-2020, 11:33 PM
RE: Path transformations - by Ottia Tuota - 07-13-2020, 06:15 AM
RE: Path transformations - by Ottia Tuota - 07-13-2020, 05:15 PM
RE: Path transformations - by Ottia Tuota - 07-14-2020, 02:23 PM
RE: Path transformations - by Ofnuts - 07-14-2020, 04:02 PM
RE: Path transformations - by rich2005 - 07-15-2020, 09:20 AM
RE: Path transformations - by Ottia Tuota - 07-15-2020, 11:38 AM
RE: Path transformations - by Ottia Tuota - 07-16-2020, 11:42 AM
RE: Path transformations - by Ottia Tuota - 07-26-2020, 07:26 AM
RE: Path transformations - by Ottia Tuota - 08-05-2020, 06:13 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 07:25 AM
RE: Path transformations - by Ottia Tuota - 08-11-2020, 08:39 AM
RE: Path transformations - by Ofnuts - 08-07-2020, 08:23 AM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 12:06 PM
RE: Path transformations - by Ofnuts - 08-08-2020, 12:58 PM
RE: Path transformations - by Ottia Tuota - 08-08-2020, 01:33 PM
RE: Path transformations - by mahvin - 08-07-2020, 01:55 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 07:26 PM
RE: Path transformations - by mahvin - 08-07-2020, 07:56 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 08:15 PM
RE: Path transformations - by Ottia Tuota - 09-03-2020, 11:43 AM
RE: Path transformations - by Ottia Tuota - 09-04-2020, 11:29 AM
RE: Path transformations - by Ottia Tuota - 09-19-2020, 01:00 PM

Forum Jump: