lib2geom-devel — development discussion

You can subscribe to this list here.

 2007 2008 2009 2010 2011 2012 2013 2014 2015 Jan (2) Feb (3) Mar (4) Apr (27) May (5) Jun Jul (14) Aug Sep (1) Oct (4) Nov (19) Dec Jan (8) Feb (1) Mar (4) Apr (28) May (77) Jun (79) Jul (112) Aug (36) Sep (33) Oct (19) Nov (9) Dec (11) Jan Feb Mar (12) Apr (11) May (13) Jun (23) Jul (5) Aug (25) Sep (9) Oct (22) Nov (16) Dec (5) Jan (23) Feb (12) Mar (5) Apr (29) May (4) Jun (9) Jul (22) Aug (2) Sep (10) Oct (6) Nov (8) Dec Jan (2) Feb (44) Mar Apr (4) May Jun (9) Jul (5) Aug (4) Sep (7) Oct Nov Dec (10) Jan (16) Feb (8) Mar (9) Apr (5) May (3) Jun (3) Jul (6) Aug (10) Sep (48) Oct (6) Nov Dec Jan Feb Mar Apr May Jun Jul Aug (19) Sep (3) Oct (5) Nov (35) Dec (3) Jan Feb (3) Mar (4) Apr (12) May (6) Jun (16) Jul (25) Aug (16) Sep (3) Oct Nov (7) Dec Jan (3) Feb (1) Mar (21) Apr (10) May (6) Jun (3) Jul (2) Aug Sep Oct Nov Dec
S M T W T F S

1

2

3

4

5

6
(3)
7

8

9
(1)
10
(2)
11

12

13
(3)
14
(1)
15

16

17
(1)
18

19

20

21

22

23

24

25

26

27

28

29

30

31

Showing 11 results of 11

 [Lib2geom-devel] Unordered polynomial fitting idea From: njh - 2008-12-17 23:07:54 Johan asks for an unordered polynomial fitting algorithm for 2geom. We don't have one yet, despite Marco and my efforts earlier. We have a good unordered fitter for circles, lines and ellipses, but not polynomials. Why? Because the first three are represented as implicit functions, the last as a parametric function. So the way to do polynomial fitting is to represent the polynomial as an implicit function \$f(x,y) = cost\$, the curve being where \$f(x,y) = 0\$. So for a quadratic polynomial curve we want to have \$f(x(t), y(t)) = 0\$, where \$x(t) = A_xt_2 + B_xt_1 + C_xt_0\$ (where \$t_0,t_1,t_2\$ are our basis functions de jour) and similarly \$A_y, B_y, C_y\$ for \$y(t)\$. Furthermore, we want some kind of convex function for \$f(u,v)\$ where u and v aren't on the curve. Best choice is probably quadratic. So we end up with a linear system MX = Y where M is some matrix of coefficients A-C, and X and Y are vectors of points. We then do least squares (singular value decomposition or similar). Then we have the implicit function. We find a suitable t = 0 and t = 1 point on the 0 contour and use the funky sb2d-solver toy algorithm to find the corresponding polynomial curve. This idea clearly extends to arbitrary degree, although finding the true path for higher degrees is going to be messy. There are some deterministic algorithms to convert suitable (genus 1?) 2d implicit polynomials to curves, but nobody has implemented them yet. They are quite fast though. I have a few papers lurking somewhere. njh
 Re: [Lib2geom-devel] compiling error From: architetto francesco fantoni - 2008-12-14 09:10:39 thank you very much, after your fix i was able to compile it, though a later update of the svn tree produced a new error: /build/lib2geom/src/2geom/lib2geom.so: undefined reference to `Geom::solve_reals(Geom::Poly const&)' some other fix introduced mae it un-copilable again. thanks a lot for your kind attention. francesco Il giorno dom, 14/12/2008 alle 08.23 +1100, njh ha scritto: > > On Sat, 13 Dec 2008, architetto francesco fantoni wrote: > > > i'm still trying to compile lib2geom from SVN with python bindings, i > > solved more or less the previous error, but now i got this: > > Yes, I've known about that problem but lacked the time to fix it. I've > fixed it now, hopefully py2geom bindings now compile. You need > python-cairo-dev header files installed (if someone knows how to make the > cairo-helpers.cpp files only compile and link if python-cairo-dev headers > are available, please do so!). > > thanks for your bug report! > > njh
 Re: [Lib2geom-devel] compiling error From: njh - 2008-12-13 21:24:01 On Sat, 13 Dec 2008, architetto francesco fantoni wrote: > i'm still trying to compile lib2geom from SVN with python bindings, i > solved more or less the previous error, but now i got this: Yes, I've known about that problem but lacked the time to fix it. I've fixed it now, hopefully py2geom bindings now compile. You need python-cairo-dev header files installed (if someone knows how to make the cairo-helpers.cpp files only compile and link if python-cairo-dev headers are available, please do so!). thanks for your bug report! njh
 [Lib2geom-devel] compiling error From: architetto francesco fantoni - 2008-12-13 13:48:25 i'm still trying to compile lib2geom from SVN with python bindings, i solved more or less the previous error, but now i got this: /usr/include/c++/4.1.3/bits/stl_algo.h:236: error: no match for ‘operator==’ in ‘__first.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = Geom::SBasis*, _Container = std::vector >]() == __val’ /home/francesco/build/lib2geom/lib2geom/src/2geom/sbasis-2d.h:134: note: candidates are: bool Geom::operator==(const Geom::Linear2d&, const Geom::Linear2d&) /home/francesco/build/lib2geom/lib2geom/src/2geom/matrix.h:142: note: bool Geom::operator==(const Geom::Matrix&, const Geom::Matrix&) /home/francesco/build/lib2geom/lib2geom/src/2geom/point.h:158: note: bool Geom::operator==(const Geom::Point&, const Geom::Point&) /home/francesco/build/lib2geom/lib2geom/src/2geom/linear.h:133: note: bool Geom::operator==(const Geom::Linear&, const Geom::Linear&) make[2]: *** [src/2geom/py2geom/CMakeFiles/py2geom.dir/pw.o] Error 1
 [Lib2geom-devel] python bindings From: francesco fantoni - 2008-12-13 10:42:32 I'm trying to compile lib2geom with python binding, but i get this error, any tip?: [ 93%] Building CXX object src/2geom/py2geom/CMakeFiles/py2geom.dir/sbasis.o /usr/include/boost/python/object/inheritance.hpp: In static member function ‘static void* boost::python::objects::dynamic_cast_generator::execute(void*) [with Source = Geom::SBasis, Target = std::vector >]’: /usr/include/boost/python/object/inheritance.hpp:122: instantiated from ‘void boost::python::objects::register_conversion(bool, Source*, Target*) [with Source = Geom::SBasis, Target = std::vector >]’ /usr/include/boost/python/object/class_metadata.hpp:66: instantiated from ‘void boost::python::objects::register_base_of::operator()(Base*) const [with Base = std::vector >, Derived = Geom::SBasis]’ /usr/include/boost/mpl/for_each.hpp:73: instantiated from ‘static void boost::mpl::aux::for_each_impl::execute(Iterator*, LastIterator*, TransformFunc*, F) [with Iterator = boost::mpl::v_iter >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, 0l>, LastIterator = boost::mpl::v_iter >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, 1l>, TransformFunc = boost::add_pointer >, F = boost::python::objects::register_base_of]’ /usr/include/boost/mpl/for_each.hpp:96: instantiated from ‘void boost::mpl::for_each(F, Sequence*, TransformOp*) [with Sequence = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, TransformOp = boost::add_pointer >, F = boost::python::objects::register_base_of]’ /usr/include/boost/python/object/class_metadata.hpp:98: instantiated from ‘void boost::python::objects::register_shared_ptr_from_python_and_casts(T*, Bases) [with T = Geom::SBasis, Bases = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>]’ /usr/include/boost/python/object/class_metadata.hpp:225: instantiated from ‘static void boost::python::objects::class_metadata::register_aux2(T2*, Callback) [with T2 = Geom::SBasis, Callback = boost::integral_constant, T = Geom::SBasis, X1 = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’ /usr/include/boost/python/object/class_metadata.hpp:219: instantiated from ‘static void boost::python::objects::class_metadata::register_aux(void*) [with T = Geom::SBasis, X1 = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’ /usr/include/boost/python/object/class_metadata.hpp:205: instantiated from ‘static void boost::python::objects::class_metadata::register_() [with T = Geom::SBasis, X1 = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’ /usr/include/boost/python/class.hpp:496: instantiated from ‘void boost::python::class_::initialize(const DefVisitor&) [with DefVisitor = boost::python::init, W = Geom::SBasis, X1 = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’ /usr/include/boost/python/class.hpp:629: instantiated from ‘boost::python::class_::class_(const char*, const char*) [with W = Geom::SBasis, X1 = boost::python::bases >, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_>, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’ /home/francesco/build/lib2geom/src/2geom/py2geom/sbasis.cpp:79: instantiated from here /usr/include/boost/python/object/inheritance.hpp:89: error: cannot dynamic_cast ‘(Geom::SBasis*)source’ (of type ‘class Geom::SBasis*’) to type ‘class std::vector >*’ (source type is not polymorphic) make[2]: *** [src/2geom/py2geom/CMakeFiles/py2geom.dir/sbasis.o] Error 1 make[1]: *** [src/2geom/py2geom/CMakeFiles/py2geom.dir/all] Error 2 make: *** [all] Error 2 -- architetto Francesco Fantoni l.go san giacomo, 38 I-41100 modena (italia) tel.& fax. +39.059.217554 skype: hva_studio e.mail: francesco@... web: http://www.hv-a.com
 Re: [Lib2geom-devel] curve fitting From: njh - 2008-12-10 00:29:14 opened my mouth too soon - bezier-utils.cpp it would be good to rewrite this using existing 2geom operations as much as possible, then look at the relative performance. njh On Wed, 10 Dec 2008, njh wrote: > On Wed, 10 Dec 2008 J.B.C.Engelen@... wrote: > >> Ok, actually, the same code is already in 2geom :-) >> So, I can delete more files from inkscape jay! > > It is?! Where? > > njh > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Lib2geom-devel mailing list > Lib2geom-devel@... > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel >
 Re: [Lib2geom-devel] curve fitting From: njh - 2008-12-10 00:19:11 On Wed, 10 Dec 2008 J.B.C.Engelen@... wrote: > Ok, actually, the same code is already in 2geom :-) > So, I can delete more files from inkscape jay! It is?! Where? njh
 Re: [Lib2geom-devel] curve fitting From: J.B.C.E - 2008-12-09 23:25:07 > -----Original Message----- > From: Engelen, J.B.C. (Johan) > Sent: zaterdag 6 december 2008 15:06 > To: lib2geom-devel@... > Subject: RE: [Lib2geom-devel] curve fitting > > > -----Original Message----- > > From: njh [mailto:njh@...] > > Sent: zaterdag 6 december 2008 8:26 > > To: Engelen, J.B.C. (Johan) > > Cc: lib2geom-devel@... > > Subject: Re: [Lib2geom-devel] curve fitting > > > > On Sat, 6 Dec 2008 J.B.C.Engelen@... wrote: > > > > > Hi all, > > > > > > I want to improve the curve fitting of the freehand tool in > > inkscape, > > > as at the moment is really not behaving the way I think it should. > > > > It would be good to move the fitter into 2geom. It's fairly self > > contained, but should be modified to return a Path. The original > > version write is lost in the depths of time, but I know that pjrm > > spent quite a bit of time trying to speed it up. > > I can do that ofcourse, it would make a good starting point. > I'll have a look where to put it. Ok, actually, the same code is already in 2geom :-) So, I can delete more files from inkscape jay!
 Re: [Lib2geom-devel] curve fitting From: J.B.C.E - 2008-12-06 14:06:05 > -----Original Message----- > From: njh [mailto:njh@...] > Sent: zaterdag 6 december 2008 8:26 > To: Engelen, J.B.C. (Johan) > Cc: lib2geom-devel@... > Subject: Re: [Lib2geom-devel] curve fitting > > On Sat, 6 Dec 2008 J.B.C.Engelen@... wrote: > > > Hi all, > > > > I want to improve the curve fitting of the freehand tool in > inkscape, > > as at the moment is really not behaving the way I think it should. > > It would be good to move the fitter into 2geom. It's fairly > self contained, but should be modified to return a Path. The > original version write is lost in the depths of time, but I > know that pjrm spent quite a bit of time trying to speed it up. I can do that ofcourse, it would make a good starting point. I'll have a look where to put it. > > > I remember something about someone (Marco?) making a curve > fitter... > > Can you point me to where I should look? > > There is a simple curve fitter that Marco worked on, demoed > in the toys ./d2sbasis-fitting and > ./d2sbiasb-fitting-with-np. Neither is very good > unfortunately - fitting polynomials whith this approach is fraught. > > A different approach might be to use the linfty approximator > that jfb and I have been working on, which is demoed in > ./sb-to-bez. The idea here would be to just join all the > points with line segments, then use the fitter with a loose > parameter (say 10 pixels) > > I've quickly implemented a toy to demonstrate this idea: pencil. > > However, it appears that firstly, using line segments with > the existing fitter upsets it (not surprising given that it > tries to compute the curvature); so I made it join the curve > with quadratic beziers. > Secondly, it goes to some trouble to match all the corners. > Perhaps jfb has some ideas (I do wonder whether the convole > toy might be helpful in > conjunction?) Maybe I should state exactly what I want to improve. I'd like to make something like "I Love Sketch", which needs a fitter to only one cube curve. So I now put the smoothness of Inkscape's pencil to 100, which means it tries to fit all the data points to a single cube curve segment. Unfortunately that doesn't work too well, as I think much better approximations are possible with a single cube curve. (so it's not a best fit) So what is needed is something that fits not a general curve, but just a single cube curve. That's something that should not be too hard I think, because we know the exact form of the formula of what must be fitted, no piecewise stuff. Right? (so just a least squares fit?) Cheers, Johan
 Re: [Lib2geom-devel] curve fitting From: njh - 2008-12-06 07:25:56 On Sat, 6 Dec 2008 J.B.C.Engelen@... wrote: > Hi all, > > I want to improve the curve fitting of the freehand tool in inkscape, as > at the moment is really not behaving the way I think it should. It would be good to move the fitter into 2geom. It's fairly self contained, but should be modified to return a Path. The original version write is lost in the depths of time, but I know that pjrm spent quite a bit of time trying to speed it up. > I remember something about someone (Marco?) making a curve fitter... Can > you point me to where I should look? There is a simple curve fitter that Marco worked on, demoed in the toys ./d2sbasis-fitting and ./d2sbiasb-fitting-with-np. Neither is very good unfortunately - fitting polynomials whith this approach is fraught. A different approach might be to use the linfty approximator that jfb and I have been working on, which is demoed in ./sb-to-bez. The idea here would be to just join all the points with line segments, then use the fitter with a loose parameter (say 10 pixels) I've quickly implemented a toy to demonstrate this idea: pencil. However, it appears that firstly, using line segments with the existing fitter upsets it (not surprising given that it tries to compute the curvature); so I made it join the curve with quadratic beziers. Secondly, it goes to some trouble to match all the corners. Perhaps jfb has some ideas (I do wonder whether the convole toy might be helpful in conjunction?) njh
 [Lib2geom-devel] curve fitting From: J.B.C.E - 2008-12-06 01:53:50 Hi all, I want to improve the curve fitting of the freehand tool in inkscape, as at the moment is really not behaving the way I think it should. I remember something about someone (Marco?) making a curve fitter... Can you point me to where I should look? Cheers, Johan (Sorry for my absence: WoW addiction mostly... The trip to the USA was postponed unfortunately, but I've been having good progress at work too, making WoW a nice braindead occupation in the evening :) )

Showing 11 results of 11