I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape: http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
Would love it. Especially if in real time on canvas with movable control points. On 2 Jan 2016 3:53 pm, "Ben Thurston" <benpaulthurston@...155...> wrote:
I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape:
http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
This is pretty far outside my ability to understand - at least the math part. But I have questions and comments.
In the example on your webpage, of deforming the Mona Lisa image -- that's a raster image, right? Does it only work on raster images, or only on vector, or both?
Since you mention python, I guess you're talking about an extension? What will the dialog look like? Will the user need to know what kind of formula to input? Or will it have several "presets" so that the less technical users can use it?
(That's a problem with at least a few extensions already. Because the user has to know what kind of formulas to enter, it severely restricts who can make use of the extension. I'd love to play with some of them, but have no clue what numbers and symbols to enter.)
C R mentioned making it live on canvas, with control points (I guess like a new LPE?) That would be awesome indeed! But if there's a way to use it without knowing formulas, I'd be happy with a non-live extension (including Preview).
Regarding presets -- For example, a question I've seen in forums from time to time. Can Inkscape deform a drawing to look like it's on the surface of a sphere? Would that be possible with this new feature?
Thanks for your work, and offer to improve Inkscape! (This is what I love about open source development :-) )
All best, brynn
_________________________________
From: Ben Thurston Sent: Saturday, January 02, 2016 8:50 AM To: inkscape-user@lists.sourceforge.net Subject: [Inkscape-user] qp conformal mapping
I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape: http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
------------------------------------------------------------------------------
_______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On 2016-01-02 16:50 (+0100), Ben Thurston wrote:
I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape: http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
Out of curiosity, I implemeted the python program as Inkscape extension to apply such a transformation to a linked or embedded bitmap image (using the path data of a helper path for the parameters of the transformation) [1].
Comparing the results (python 2.7.11, Pillow 3.0) with your example in the blog entry of the tranformed Mona Lisa image, I wonder how you filled missing pixels in the output image?
Simple demo produced with Inkscape 0.91 and custom extension: http://imgh.us/qpconf-demo-091.svg
Regards, V
[1] Extension sources (includes a shared module): http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/files/head:/mo... INX file: http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/view/head:/mod... Python script: http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/view/head:/mod... TODO: reorder the points of the helper path (to ease user input), support parsing bezier curve segements (inserting a node at mid-length of each segment of a quadrilateral path).
On 2016-01-04 06:07 (+0100), Ben Thurston wrote:
On 2016-01-04 02:53 (+0100), su_v wrote:
On 2016-01-02 16:50 (+0100), Ben Thurston wrote:
I developed this math and wrote a python program to do this sort of mapping, I thought maybe it would be interesting to have in inkscape: http://benpaulthurstonblog.blogspot.com/2015/12/parameterized-quadratic-conf...
Out of curiosity, I implemeted the python program as Inkscape extension to apply such a transformation to a linked or embedded bitmap image (using the path data of a helper path for the parameters of the transformation) [1].
Comparing the results (python 2.7.11, Pillow 3.0) with your example in the blog entry of the tranformed Mona Lisa image, I wonder how you filled missing pixels in the output image?
I oversampled the original image, by reading the original image as if each pixel had another pixel (of exactly the same color) at the halfway point between the two integer pixel positions... sometimes you might have to oversample even more but you would just put more pixels of the same color in between...
Oversampling now works AFAICT as expected after this change: http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-extensions/revision/747/m...
Updated demo (using oversample = 2): http://imgh.us/qpconf-demo-091-2.svg
Regards, V
participants (4)
-
Ben Thurston
-
Brynn
-
C R
-
su_v