Page 2 of 3
Re: Smooth strokes
Posted: Fri May 30, 2014 8:29 pm
by Mag
Hi -hh,
I like your post, brilliant like your code.
I tried to implement a simplified version of your smoothIt handler in a drawing stack, I post it here.
Re: Smooth strokes
Posted: Fri May 30, 2014 9:29 pm
by [-hh]
..........
Re: Smooth strokes
Posted: Mon Jun 16, 2014 11:00 am
by Mag
Ok, I made some tests, here is a stack with the results.
1. To avoid to remove edges the stack splits every polygon in different segments (e.g an N is split in 3 segments), processes individually each segment and then re-compose the segments before to assign the points to the graphic.
2. The external dimension of the polygon (the rectangle), is preserved by restoring the original rect after the process. In this way I try to avoid to change the dimensions of the polygons created by the user.
4. Straight lines (for example the bars of a T) are not processed by excluding graphics with a certain wide or height of the rect. Maybe here would be better to use some proportional algorithm I think, or more better a way to distinguish a line from a curve.
All this can be improved a lot, if you have ideas or solutions please modify the stack.
Re: Smooth strokes
Posted: Wed Jun 18, 2014 1:27 am
by Mag
No one has any idea on how to improve the polygons created with the finger?
PS
I am also willing to consider professional solutions as long as the result is good. Please contact me in private.
Re: Smooth strokes
Posted: Thu Jun 19, 2014 8:48 am
by [-hh]
..........
Re: Smooth strokes
Posted: Fri Jun 20, 2014 1:28 am
by capellan
Mag wrote:No one has any idea on how to improve the polygons created with the finger?
[snip]
Hi Mag,
Check if this stack could help in this task:
http://andregarzia.on-rev.com/alejandro ... orithm.zip
This stack implements two polygon smoothing algorithms:
Chaikin and Shemanarev
Re: Smooth strokes
Posted: Sun Jun 22, 2014 10:08 pm
by Mag
Great work [-hh]!
Thank you capellan, I will check these stacks. Are you involved in the developing of them?
Re: Smooth strokes
Posted: Mon Jun 23, 2014 2:53 pm
by [-hh]
..........
Re: Smooth strokes
Posted: Tue Jun 24, 2014 6:38 am
by Mag
Hi Hermann,
thank you. What I'm trying to do is an app for write and draw with the finger. Unfortunately to date I haven't find a way to have smooth polygons. All the project are interesting in theory but I can't find a way to implement these ideas in my project, probably because this requires knowledge of mathematics that I don't have. For example, the stack with the Bezier lines is very nice, but I don't know how to implement it in a project where the user draws with the finger.
For this reason, I said that if someone finds a working solution, even professional (with the meaning that the programmer realizes it for work, so for a fee), I'd be willing to consider pay for it or fund the project.
Re: Smooth strokes
Posted: Tue Jun 24, 2014 12:36 pm
by splash21
Re: Smooth strokes
Posted: Tue Jun 24, 2014 12:44 pm
by [-hh]
..........
Re: Smooth strokes
Posted: Tue Jun 24, 2014 2:08 pm
by Mag
Hi splash21, thank you for the tip, I will study the stack.
Hi [-hh], I tried the stack but unfortunately it seems that 5 becomes a S, 3 becomes a kind of snake... maybe there is something to set that I don't understand

Re: Smooth strokes
Posted: Tue Jun 24, 2014 4:56 pm
by [-hh]
..........
Re: Smooth strokes
Posted: Tue Jun 24, 2014 8:26 pm
by Mag
Ah, ok, now I understand. Thank you.
Rounding that you have achieved is very good but has a problem: forces the user to draw what they wrote in different segments. If the process of separating a polygon in segments it were made by the code you would have a really great tool.
Re: Smooth strokes
Posted: Tue Jun 24, 2014 9:12 pm
by [-hh]
..........