BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Smoth PolyBezier line?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Jon Lennart Aasenden
Guest





PostPosted: Sun Oct 23, 2005 4:57 am    Post subject: Smoth PolyBezier line? Reply with quote



Hi

When you draw in macromedia flash, you can toggle "smothing" of freehand
lines on and off.
when on, flash "rounds" off the points on your hand-drawn path to make them
smooth.
You could say it makes even the worst drawn figures much better by removing
sharp edges.

I saw an example written in blitzbasic for this (not you fathers basic, so i
havent been able to convert it) called smoth polybezier. Im no good at
beziers, but it seemed to peek ahead in the array of TPoints to calculate
hinting.

Does anyone have any code for somthing like this?

Kind regards

Jon Lennart Aasenden,
Norway


Back to top
Nils Haeck
Guest





PostPosted: Sun Oct 23, 2005 5:28 am    Post subject: Re: Smoth PolyBezier line? Reply with quote



Hi Jon,

Check out:
http://www.simdesign.nl/bezier.html

Kind regards,

Nils

"Jon Lennart Aasenden" <post_nospam_nojunk (AT) jurasoft (DOT) no> schreef in bericht
news:435b1780 (AT) newsgroups (DOT) borland.com...
Quote:
Hi

When you draw in macromedia flash, you can toggle "smothing" of freehand
lines on and off.
when on, flash "rounds" off the points on your hand-drawn path to make
them
smooth.
You could say it makes even the worst drawn figures much better by
removing
sharp edges.

I saw an example written in blitzbasic for this (not you fathers basic, so
i
havent been able to convert it) called smoth polybezier. Im no good at
beziers, but it seemed to peek ahead in the array of TPoints to calculate
hinting.

Does anyone have any code for somthing like this?

Kind regards

Jon Lennart Aasenden,
Norway





Back to top
Jon Lennart Aasenden
Guest





PostPosted: Sun Oct 23, 2005 5:49 am    Post subject: Re: Smoth PolyBezier line? Reply with quote



Hi nils!

While i am a great admirer of you work (you have helped me out on god knows
how many occations), graphics programming is just a hobby. Everything i make
end up as public domain anyway. Once in a while i find some things i just
dont know how to do (like this bezier thing) - but i ever rarely buy
components. Sorry.

PS: I have sent a few customers to your site, the scrollbox component seems
to be in demand.
(yes, i did figure it out..)

Jon Lennart Aasenden



"Nils Haeck" <bla (AT) bla (DOT) com> wrote

Quote:
Hi Jon,

Check out:
http://www.simdesign.nl/bezier.html

Kind regards,

Nils

"Jon Lennart Aasenden" <post_nospam_nojunk (AT) jurasoft (DOT) no> schreef in bericht
news:435b1780 (AT) newsgroups (DOT) borland.com...
Hi

When you draw in macromedia flash, you can toggle "smothing" of freehand
lines on and off.
when on, flash "rounds" off the points on your hand-drawn path to make
them
smooth.
You could say it makes even the worst drawn figures much better by
removing
sharp edges.

I saw an example written in blitzbasic for this (not you fathers basic,
so
i
havent been able to convert it) called smoth polybezier. Im no good at
beziers, but it seemed to peek ahead in the array of TPoints to
calculate
hinting.

Does anyone have any code for somthing like this?

Kind regards

Jon Lennart Aasenden,
Norway







Back to top
Roy M Klever
Guest





PostPosted: Sun Oct 23, 2005 12:03 pm    Post subject: Re: Smoth PolyBezier line? Reply with quote

Hi Jon Lennart Aasenden,

I have posted a small sample of an algorithem that does what you want in
the attachment group.

If you improve it I would like a copy :)

send to roymagne @ rmklever.com (remove spaces)


Kind Regards
Roy Magne Klever

Back to top
Jon Lennart Aasenden
Guest





PostPosted: Fri Oct 28, 2005 5:40 am    Post subject: Re: Smoth PolyBezier line? Reply with quote

Hi Roy

Well, it was just what i was looking for!
But i found Nils's name in the code... (isnt that ironic).
Hope you did not break any copyrights here.

Nils.. have you started answering posts by pure mind control? :)

Either way, i will have a closer look at it. Thank you for helping me out.

Kind regards

Jon Lennart Aasenden


Back to top
Roy M Klever
Guest





PostPosted: Fri Oct 28, 2005 4:56 pm    Post subject: Re: Smoth PolyBezier line? Reply with quote

Hi Jon Lennart,

Quote:
Well, it was just what i was looking for!
Good!


Quote:
But i found Nils's name in the code... (isnt that ironic).
Well there are others DP routines on the net but I used it because it is

MPL. BTW I have great respect for Nils work, he have better soultuions
than me but I share my experience in hope of gettting at the same level
as Nils :)

Quote:
Hope you did not break any copyrights here.
Why would you think I did?



Kind Regards
Roy Magne Klever


Back to top
Nils Haeck
Guest





PostPosted: Fri Oct 28, 2005 11:54 pm    Post subject: Re: Smoth PolyBezier line? Reply with quote

Hi Jon,

Nope, Roy kept himself perfectly to the MPL license :)

He used another free piece of code I wrote for Douglas-Peucker line
simplification. However, that doesn't use bezier segments, but just line
segments. The extension that Roy wrote was to convert these line segments
back to bezier segments.

While this is a nice solution, it inhibits one problem: you generally don't
know if the error specified is really honoured. So specifying a max error of
5 pixels for DP, could turn out to be larger/smaller for the bezier
segments. My other code (commercial) solves this problem.

If you contact me by email, I'll provide you with a copy for free though. I
only want money from C++ guys in this case, not from regular posters here :)

Nils

"Jon Lennart Aasenden" <post_nospam_nojunk (AT) jurasoft (DOT) no> schreef in bericht
news:4361b917 (AT) newsgroups (DOT) borland.com...
Quote:
Hi Roy

Well, it was just what i was looking for!
But i found Nils's name in the code... (isnt that ironic).
Hope you did not break any copyrights here.

Nils.. have you started answering posts by pure mind control? :)

Either way, i will have a closer look at it. Thank you for helping me out.

Kind regards

Jon Lennart Aasenden





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.