Smooth strokes

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Smooth strokes

Post by Mag » Tue Jun 24, 2014 11:48 pm

Hi [-hh], thank you for the explanation. Actually I had understand this, unfortunately I explained it bad in my post, sorry.

Code: Select all

If you now target on cutting a one-segment drawing into parts then you have for example to decide when a snake is a badly written "5" or a "S".
I think that automatic cutting a one-segment drawing into parts would be a great step forward for this project.

Maybe a way could be to try to identify the change of directions of a polygon. I market some of them in the picture. Do you think that would be possible to accomplish this? I tried to accomplish it but found that it's a goal too much hard.
Attachments
smoothDraw35.jpg
smoothDraw35.jpg (28.73 KiB) Viewed 5122 times

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Smooth strokes

Post by [-hh] » Wed Jun 25, 2014 7:45 am

..........
Last edited by [-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Smooth strokes

Post by [-hh] » Wed Jun 25, 2014 6:59 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 2:04 pm, edited 1 time in total.
shiftLock happens

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Smooth strokes

Post by Mag » Wed Jun 25, 2014 9:05 pm

Hi [-hh],

I can't understand the logic with which the cuts are made. In this image there is the splits made ​​by smoothDraw2, and in the below row as it should be splitted (only curves and lines). Maybe I have the wrong settings? :oops:
Attachments
split.png

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Smooth strokes

Post by [-hh] » Thu Jun 26, 2014 11:49 am

..........
Last edited by [-hh] on Wed Aug 13, 2014 2:04 pm, edited 1 time in total.
shiftLock happens

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Smooth strokes

Post by Mag » Fri Jun 27, 2014 12:18 pm

Hi, I found your latest version a lot improved. Great work!

I think the weak point is still the recognition of the various curves. Maybe this would be enough to simply implement a system that detects when a segment changes direction. Like the system that I implemented in my first version: if a point with respect to the two previous points continues its trend (eg. up,up or down,up) then the direction is the same.

Reducing shivering it's a very important feature, well done. I have some difficulties to understand how you implemented it. Too much math for me :oops:

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Smooth strokes

Post by Mag » Fri Jun 27, 2014 4:15 pm

For those interested in the subject, I opened a topic on freehand's draw quality here: http://forums.livecode.com/viewtopic.php?f=8&t=20894

Post Reply