 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ivan Sivak Jr. Guest
|
Posted: Mon Aug 22, 2005 10:39 am Post subject: bezier spline |
|
|
hi,
I use a bezier spline as path in my 2d animation, and I'd need to
set constant speed, so I'd need to rebuild spline in constant
length steps in the same shape as original spline.
Do you know any good algorithms or have source for this ?
Thanks,Ivan
|
|
| Back to top |
|
 |
somebody Guest
|
Posted: Mon Aug 22, 2005 10:51 am Post subject: Re: bezier spline |
|
|
"Ivan Sivak Jr." <sizesoftware (AT) forex-mhv (DOT) com> wrote
| Quote: | I use a bezier spline as path in my 2d animation, and I'd need to
set constant speed, so I'd need to rebuild spline in constant
length steps in the same shape as original spline.
Do you know any good algorithms or have source for this ?
|
Google for "arclength parametrization". Usually, you just do an
approximation and do a binary search to get a uniform enough stepping.
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Mon Aug 22, 2005 2:00 pm Post subject: Re: bezier spline |
|
|
Have a look at this page for some background info:
http://antigrain.com/research/adaptive_bezier/index.html#PAGE_ADAPTIVE_BEZIER
What you can basically do is recursively subdivide the bezier segments in
halves until each partial segment has a very small angle with its previous
segment.
You then simply add up all the line lengths of the partial segments and
linearly interpolate in the last partial segment, to get to your new
position.
By the way, my new Pyro library will have full Delphi source code for this
(it's already there). I need it for text-on-a-path functions.
Nils Haeck
www.simdesign.nl
"Ivan Sivak Jr." <sizesoftware (AT) forex-mhv (DOT) com> wrote
| Quote: | hi,
I use a bezier spline as path in my 2d animation, and I'd need to
set constant speed, so I'd need to rebuild spline in constant
length steps in the same shape as original spline.
Do you know any good algorithms or have source for this ?
Thanks,Ivan
|
|
|
| Back to top |
|
 |
John Guest
|
Posted: Wed Aug 24, 2005 7:13 am Post subject: Re: bezier spline |
|
|
| Quote: | By the way, my new Pyro library will have full Delphi source code for this
(it's already there). I need it for text-on-a-path functions.
|
Nils,
can we have more infos about this lib?
thanks
John
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Wed Aug 24, 2005 3:52 pm Post subject: Re: bezier spline |
|
|
Well, basically Pyro is able to render SVG content, including animations.
- It is independent of GDI+ or GDI or any other 3rd party graphics library
- Contains complete path filling/stroking for any SVG type of path
(lines/ellipses/quadratic and cubic beziers)
- Native implementation of TTF loading/font rendering
- Import of DXF/PDF/SVG/EMF
- Export of DXF/SVG/PDF
- Anti-aliasing between 1 and 256 levels (configurable)
- Many types of transforms
- Many types of bitmap raster effects
It is the followup of DtpDocuments, and will be released later this year.
Nils Haeck
www.simdesign.nl
"John" <prout (AT) nospam (DOT) com> schreef in bericht
news:430c1e01$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
By the way, my new Pyro library will have full Delphi source code for
this
(it's already there). I need it for text-on-a-path functions.
Nils,
can we have more infos about this lib?
thanks
John
|
|
|
| Back to top |
|
 |
HB Guest
|
Posted: Wed Aug 31, 2005 1:39 am Post subject: Re: bezier spline |
|
|
Hello, when can we see the first demo ?
And will Pyro render svg pictures from
http://openclipart.org/cgi-bin/navigate
What do you mean with TTF loading ?,
does it mean we can use all true type fonts which are common on Windows,
do you use the freeType-library, or will it have less features ?
Do you see your TTF as complete replacement of gdi-text-drawing,
or would we still have to use gdi for a text box with multiple styles ?
Thank you
"Nils Haeck" <bla (AT) bla (DOT) com> schrieb im Newsbeitrag
news:430c9689 (AT) newsgroups (DOT) borland.com...
| Quote: | Well, basically Pyro is able to render SVG content, including animations.
- It is independent of GDI+ or GDI or any other 3rd party graphics library
- Contains complete path filling/stroking for any SVG type of path
(lines/ellipses/quadratic and cubic beziers)
- Native implementation of TTF loading/font rendering
- Import of DXF/PDF/SVG/EMF
- Export of DXF/SVG/PDF
- Anti-aliasing between 1 and 256 levels (configurable)
- Many types of transforms
- Many types of bitmap raster effects
It is the followup of DtpDocuments, and will be released later this year.
Nils Haeck
www.simdesign.nl
"John" <prout (AT) nospam (DOT) com> schreef in bericht
news:430c1e01$1 (AT) newsgroups (DOT) borland.com...
By the way, my new Pyro library will have full Delphi source code for
this
(it's already there). I need it for text-on-a-path functions.
Nils,
can we have more infos about this lib?
thanks
John
|
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Wed Oct 12, 2005 9:29 pm Post subject: Re: bezier spline |
|
|
Hi, sorry for the late reply.. didn't notice this message
| Quote: | Hello, when can we see the first demo ?
And will Pyro render svg pictures from
http://openclipart.org/cgi-bin/navigate
What do you mean with TTF loading ?,
does it mean we can use all true type fonts which are common on Windows,
do you use the freeType-library, or will it have less features ?
Do you see your TTF as complete replacement of gdi-text-drawing,
or would we still have to use gdi for a text box with multiple styles ?
Thank you
|
1. Yes it renders a lot of examples from openclipart.org perfectly. Some not
yet perfectly, notably because SVG filter effects are not yet fully
implemented.
2. TTF loading: it will natively load the glyph outlines from the TTF file.
It doesn't need GDI to render text or get the outlines. So it is a complete
replacement for GDI drawing. There's one exception: I'm thinking of allowing
an option to use GDI for hinted drawing of very small font sizes in
horizontal text, thus benefitting from Windows ClearType technology.
Indeed you can use any TTF font, and Pyro is also able to embed the font
data (just the glyphs that are used).
3. I don't use the freetype library, but used it as an example on how to get
the TTF font outline data. In future, Type1 fonts will be added too.
4. Demo will be available soon.
Nils
|
|
| Back to top |
|
 |
|
|
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
|
|