SVG importer - Cubic and quadratic curves

View: New views
3 Messages — Rating Filter:   Alert me  

SVG importer - Cubic and quadratic curves

by hoako :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all!

Carlos point me that SVG supports cubic and quadratic Bézier curves.
http://www.w3.org/TR/SVG11/paths.html#PathDataGeneralInformation

Seems k3d support Bézier of different orders (bezier.h) but they are not taken
in count on the mesh data type (mesh.h).

Should we add support for other orders or simple convert all of them to cubic? I
guess the later is the better.

Cheers!
Joaquín



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: SVG importer - Cubic and quadratic curves

by Timothy M. Shead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joaquín Duo wrote:
> Carlos point me that SVG supports cubic and quadratic Bézier curves.
> http://www.w3.org/TR/SVG11/paths.html#PathDataGeneralInformation
>
> Seems k3d support Bézier of different orders (bezier.h) but they are not taken
> in count on the mesh data type (mesh.h).
>
> Should we add support for other orders or simple convert all of them to cubic? I
> guess the later is the better.
>  
This highlights another error-of-omission in the mesh data structures -
the basis matrices for cubic curves and bicubic patches aren't defined
in the data structures, and we're just assuming that the render engine
will always default to Bezier.  Doh!

Regardless, it doesn't matter.  While it's simple to elevate the order
of a quadratic curve to make it cubic, I note from the link you provide
that SVG also supports circular arcs, and the only gprim in K-3D that
supports arcs are NURBS.  I'd suggest just using NURBS for everything.

Cheers,
Tim


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: SVG importer - Cubic and quadratic curves

by Esben Stien :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Timothy M. Shead" <tshead@...> writes:

> I'd suggest just using NURBS for everything.

Indeed;).

--
Esben Stien is b0ef@e     s      a            
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e
           jid:b0ef@    n     n

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development