Re: simplify path feature?

Jason Miller <[email protected]> Tue, 12 Apr 2016 21:00:31 +0200
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
Dear Philipp,

Thanks, this looks great!  Is it difficult to have it convert the segments into splines at the very end?

Best wishes,

Jason


> On Apr 12, 2016, at 7:49 PM, Philipp Kindermann <[email protected]> wrote:
> 
> Hi all,
> 
> I wrote a small ipelet that hopefully does what you need. For a selected path, it lets you input a tolerance on the distance between points and then removes vertices on the path that are too close. You can find it here:
> https://github.com/PhKindermann/ipe-simplify <https://github.com/PhKindermann/ipe-simplify>
> Note that it's my first ipelet so the code is a bit messy and there will be bugs (e.g. it does not work for splines), but I hope that it does the job for now.
> 
> Best,
> Philipp
> 
> Am 11.04.2016 um 17:46 schrieb Nathaniel Cunningham:
>> Jason, you might want the algorithm to be a bit smarter: to pay attention to spacing of points, for example, and adapt the number of points discarded accordingly; and (more importantly) to keep more points, or most extreme points ("corners") at locations where the curve direction changes rapidly.  But I agree, that even the simplest version you outline would be a good addition, and the rest would just be refinement.
>> 
>> Surely there are already algorithms out there someplace to do this, that would simply need to be incorporated into an ipelet?  Not sure where to track such a thing down, though.
>> 
>> -- Nathaniel
>> 
>> On Mon, Apr 11, 2016 at 4:37 AM, Jason Miller <[email protected] <mailto:[email protected]>> wrote:
>> Thanks!
>> 
>> I would be personally happy with something even much simpler: namely an ipelet which converts a path made with the pen tool to a spline and keeps only 1 out of every k points where k is a user input.  (Paths made with a stylus seem to have such a huge number of points that one can take k quite large and still get something which looks almost exactly the same as the original path.)  In other words, it does not even have to be particularly smart about deciding which points to keep when simplifying the path.
>> 
>> Best wishes,
>> 
>> Jason
>> 
>> > On Apr 11, 2016, at 11:10 AM, Otfried Cheong < <mailto:[email protected]>[email protected] <mailto:[email protected]>> wrote:
>> >
>> > Simplifying the curve when you draw with the pen is on my to-do list for
>> > the next version.  I shouldn't be too hard to add an ipelet to simply a
>> > curve afterwards as well - I don't think there is one publicly available
>> > right now (would be a good exercise to learn to write ipelets :-)
>> >
>> > Cheers,
>> > Otfried
>> >
>> > On Mon, Apr 11, 2016, at 01:05, Nathaniel Cunningham wrote:
>> >> +1 for this ipelet request!  (Don't know of one already available)
>> >>
>> >> -- Nathaniel
>> >>
>> >> On Sun, Apr 10, 2016 at 4:13 AM, Jason Miller <[email protected] <mailto:[email protected]>>
>> >> wrote:
>> >>
>> >>> Dear all,
>> >>>
>> >>> I was wondering if there exists an ipelet that would be able to simplify a
>> >>> path that contains a huge number of points?  I have created some ipe
>> >>> drawings using a stylus on my computer and the result is always very large
>> >>> because ipe records such a high density of points.
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Jason
>> >>> _______________________________________________
>> >>> Ipe-discuss mailing list
>> >>> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] <mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]>
>> >>> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss <http://lists.science.uu.nl/mailman/listinfo/ipe-discuss>
>> >>>
>> >> _______________________________________________
>> >> Ipe-discuss mailing list
>> >> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] <mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]>
>> >> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss <http://lists.science.uu.nl/mailman/listinfo/ipe-discuss>
>> > _______________________________________________
>> > Ipe-discuss mailing list
>> > Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] <mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]>
>> > http://lists.science.uu.nl/mailman/listinfo/ipe-discuss <http://lists.science.uu.nl/mailman/listinfo/ipe-discuss>
>> 
>> _______________________________________________
>> Ipe-discuss mailing list
>> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] <mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]>
>> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss <http://lists.science.uu.nl/mailman/listinfo/ipe-discuss>
>> 
>> 
>> 
>> _______________________________________________
>> Ipe-discuss mailing list
>> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected] <mailto:Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]>
>> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss <http://lists.science.uu.nl/mailman/listinfo/ipe-discuss>
> 
> -- 
> ************************************************************************
> Dr. Philipp Kindermann
> 
> FernUniversität in Hagen
> Fakultät Mathematik und Informatik
> Lehrgebiet Theoretische Informatik
> 58084 Hagen, Germany
> 
> Phone: +49 (0)2331 987 4784
> Room: 0H311, IZ
> ************************************************************************ 
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]
> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss

_______________________________________________
Ipe-discuss mailing list
Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]
http://lists.science.uu.nl/mailman/listinfo/ipe-discuss