View Full Version : Bezier Curve
ManishRoy
12-17-2007, 09:51 PM
Hi,
Does any one can help me to implement Bezier Curve Functionality using DirectX 9. and C#.
I have done it using GDI+ , but unable to implement it in DirectX.
Thanking You
Manish Roy
Reedbeta
12-17-2007, 10:35 PM
What precisely do you need help with?
ManishRoy
12-18-2007, 03:45 AM
Need to Draw Bezier Curve in DirectX ..
TheNut
12-18-2007, 10:28 AM
I'm assuming you just want to draw it? Wherein GDI you just supply a single MoveTo command with subsequent LineTo calls to draw out the curve, in DirectX you can do the same thing. It supports the ability to draw lines. The most efficient way to do it is to prepare a single vertex array and dump them all in one draw call.
Nils Pipenbrinck
12-18-2007, 02:12 PM
We can show you the 20 lines of code how to get the vertices of a line-strip that approximates a bezier, but there are 1001 pages on the net that does the same. It's so little work that we might do it however..
But: we won't do the work to allocate an vertex array, fill it, setup the renderstates ect. That work is up to you. If you're looking for cut'n'paste code we can't help you.
Btw - bezier curves are *very easy*. The most simple kind of curves that exist!
If you're able to get a Direct3D window on the screen and display a mesh or two it should be a matter of four hours to get a bezier-curve on the screen, including learning all that simple math from scratch. Unless you're just a code-monkey of cause.
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.