Getting into LiveCode for iOS? Ask your questions here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Fri May 30, 2014 8:29 pm
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.
-
Attachments
-
- Test.livecode.zip
- (2.49 KiB) Downloaded 304 times
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Fri May 30, 2014 9:29 pm
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:06 pm, edited 1 time in total.
shiftLock happens
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Mon Jun 16, 2014 11:00 am
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.
-
Attachments
-
- SmoothTest.livecode.zip
- (3.36 KiB) Downloaded 288 times
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Wed Jun 18, 2014 1:27 am
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.
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Thu Jun 19, 2014 8:48 am
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Sun Jun 22, 2014 10:08 pm
Great work [-hh]!
Thank you capellan, I will check these stacks. Are you involved in the developing of them?
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Mon Jun 23, 2014 2:53 pm
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Tue Jun 24, 2014 6:38 am
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.
-
splash21
- VIP Livecode Opensource Backer

- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
-
Contact:
Post
by splash21 » Tue Jun 24, 2014 12:36 pm
LiveCode Development & Training : http://splash21.com
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Tue Jun 24, 2014 12:44 pm
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Tue Jun 24, 2014 2:08 pm
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

-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Tue Jun 24, 2014 4:56 pm
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens
-
Mag
- VIP Livecode Opensource Backer

- Posts: 802
- Joined: Fri Nov 16, 2012 10:51 pm
Post
by Mag » Tue Jun 24, 2014 8:26 pm
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.
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Tue Jun 24, 2014 9:12 pm
..........
Last edited by
[-hh] on Wed Aug 13, 2014 2:05 pm, edited 1 time in total.
shiftLock happens