Skip to main content
14 events
when toggle format what by license comment
Jul 26, 2017 at 8:02 comment added Szabolcs @Mr.Wizard Beyond this one point that you mentioned, I do not have time to revise it right now. If you would like to do that, that would be great. I know that it is not very fast.
Jul 26, 2017 at 7:51 comment added Mr.Wizard Do you have interest in revisiting and optimizing this code? If so I may wait for you to do that; if not I may try myself.
Jul 26, 2017 at 7:43 comment added Szabolcs @Mr.Wizard I do not remember ... I wrote the code years before I posted it here. I should have commented it better, but I did not. I may have run into tolerance problems. As I remember there are cases when a==b is True but DeleteDuplicates[{a,b}] does not remove one of the elements because there is a tiny difference between them.
Jul 26, 2017 at 7:30 comment added Mr.Wizard The pairwise compare of DeleteDuplicates[points, #1 == #2 &] is very expensive as known. What is its purpose here?
Feb 22, 2017 at 9:19 comment added Alexey Popkov Finally I come to dividing the original shape into two parts but for another reason: the marker should be (anti)symmetric. With SimplifyCurve I got a very nice result in this way, see my answer.
Feb 20, 2017 at 12:51 comment added Szabolcs Yes, the two endpoints will always be fixed and cannot be removed. But it is always only two points, even for a letter Z. This means that the top and bottom segment of the Z may each use 3 points instead of only two endpoints. Thus there will be some redundancy, but not much. Your angle based method will not have this problem.
Feb 20, 2017 at 12:46 comment added Alexey Popkov With this method the topmost and bottommost points are fixed and can't be removed. Consider the case of glyph "Z": after converting into boundary mesh it'll have many redundant topmost and bottommost points with identical $y$ coordinates... The same is true for many other glyphs.
Feb 20, 2017 at 12:11 comment added Szabolcs @AlexeyPopkov Maybe something like this. It splits the closed curve into two open curves at the topmost and bottommost (ymax, ymin) points, and applies simplification separately.
Feb 20, 2017 at 11:05 comment added Alexey Popkov You mean, two overlapping segments? Without overlaps we'll get fixed boundary points again.
Feb 20, 2017 at 10:44 comment added Szabolcs @AlexeyPopkov Yes, that is correct. It might be better to split the data into two segments and apply the algorithm separately.
Feb 20, 2017 at 8:14 comment added Alexey Popkov As I understand, SimplifyLine doesn't take into account that we have closed curve and should treat list of points as cyclic, it never removes first and last points.
Feb 18, 2017 at 2:49 comment added Alexey Popkov Related Demonstration by Mark McClure: demonstrations.wolfram.com/PolylineSimplification
Feb 16, 2017 at 19:18 history edited Szabolcs CC BY-SA 3.0
added 680 characters in body
Feb 16, 2017 at 19:09 history answered Szabolcs CC BY-SA 3.0