Hi, Josh,
Thanks for the quick reply. I think I'll go back on-list to avoid redundancy.
Hi,
Off-list reply...
Thanks for your interest in Inkscape! I will leave it to people more familiar with our internals and the pencil tool to respond regarding possible integration. :)
After watching the video, I can say there is definitely an interesting feature of your little demo app (besides the smoothing). That is the reshaping of sections of paths based on where the beginning and end of a stroke intersect with it (rather than node editing as Inkscape requires).
Yes, this is oversketching--it's not a new idea, but I haven't seen it implemented well in a full product (and my implementation in the prototype is not great either). Integrating this feature into Inkscape would be to a large extent a UI issue--and I'm not the best person to figure those out :)
Without having read the paper, what does this implementation look like in terms of number of nodes/points created? We currently have a smoothing option for the pencil tool, and when you choose to make it smoother, it reduces the number of nodes used (and also reduces accuracy).
Yes, in producing the Inkscape examples, I tried tuning the smoothing option as well as I could. The central idea of my algorithm is to solve a global optimization problem explicitly minimizing the number of curve segments, subject to accuracy constraints, so in general it produces relatively few segments. The examples in the paper have the curve segments color coded, so you can see exactly which ones are produced.
Are you at all familiar with lib2geom? It is the geometry library that Inkscape uses. In terms of curve fitting, I believe that would actually be the project to integrate that piece into (since we could then utilize it)... http://lib2geom.sourceforge.net/
I've briefly looked at the source code on SVN, but that's the extent of my familiarity. As far as I can tell, it's based on these S-basis things, to which I haven't been able to find a great introduction--I think I understand them well enough to conclude that converting my splines to this representation (approximately) should be relatively painless. Regardless, I want my library to be standalone (and I need, for example, Eigen for high-performance linear algebra--so I'll use it for vectors in general to make my life easier), but if it makes sense to interface with Inkscape through lib2geom, then that's the way to go.
I'd recommend checking out lib2geom if you have a chance, compiling it, and checking out the many "toys" that it has... your demo video feels somewhat like the toys that they create (basically the proof of concept before things are attempted in Inkscape).
Will do.
-Ilya
participants (1)
-
Ilya Baran