Interpolation Methods

Post questions on how to use or achieve an effect in Inkscape.
User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Interpolation Methods

Postby druban » Sun Nov 22, 2009 3:05 am

Hi everyone! The interpolate extension dialogue box offers the choice of two 'methods'. I can't find a reference that explains the difference between the two. Can someone point me in the right direction?

In passing, I note that this extension (not the LPE, but the older one) sometimes returns the interpolated paths offset from the original paths. Is this a bug, or is it intentional? Does this serve some function that I don't know about?

Thanks, Dru
Your mind is what you think it is.

User avatar
Kjohrf
Posts: 170
Joined: Tue Oct 27, 2009 11:42 am
Location: US
Contact:

Re: Interpolation Methods

Postby Kjohrf » Sun Nov 22, 2009 9:10 am

More information on that would be great.

The only thing I've ever found is a brief example at http://www.inkscape.org/doc/interpolate/tutorial-interpolate.en.html.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Interpolation Methods

Postby druban » Sun Nov 22, 2009 10:59 am

1
Last edited by druban on Tue May 28, 2013 7:54 pm, edited 1 time in total.
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Interpolation Methods

Postby ~suv » Sun Nov 22, 2009 12:03 pm

druban wrote:The interpolate extension dialogue box offers the choice of two 'methods'. I can't find a reference that explains the difference between the two. Can someone point me in the right direction?
I'll point you to the interp.py source file ;-)
From the (sparse) comments:

Code: Select all

(…)
            if self.options.method == 2:
                #subdivide both paths into segments of relatively equal lengths
(…)
            else:
                #which path has fewer segments?
                lengthdiff = numsegs(start) - numsegs(end)
                #swap shortest first
                if lengthdiff > 0:
                    start, end = end, start
                #subdivide the shorter path
(…)
                #if swapped, swap them back
                if lengthdiff > 0:
                    start, end = end, start
           
            #break paths so that corresponding subpaths have an equal number of segments
(…)
            #create an interpolated path for each interval

druban wrote:In passing, I note that this extension (not the LPE, but the older one) sometimes returns the interpolated paths offset from the original paths. Is this a bug, or is it intentional?
Difficult to tell - can you illustrate this with an SVG example (the 2 paths, the result after interpolazion and the extension options used)? We are talking about a recent prerelease build of Inkscape or did you use 0.46?


Return to “Help with using Inkscape”