Sunday, February 13, 2011

XNA Bezier Curve Editor Demo

Here is a quick look at the Bezier Curve editor I made in XNA that uses the function from my prior blog . Note there are circular Paths each withe 3 segments. Each segment is a 4 point Bezier calculation.


The basic tricks in getting this to be a smooth curve across the whole path is to:

  1. p3 of the each segment is in common to p0 of next each segment.
  2. To make the circular, p3 of last segment must be same as p0 of 1st segment.
  3. p2 and p3 of each segment must be on a strait line with p0 and p1 or the next segment. So this means
    • If a path point was moved by user, you must also move left and right control handler points by same deltas
    • If left handler moved,  must also move corresponding path point so it intersects line to other handler at mid point
    • If right handler moved, must also move corresponding path point so it intersects line to other handler at mid point


3 comments:

  1. Hello, i am very interested in your editor? maybe,can you share the code?
    Thanks

    ReplyDelete
  2. Hello! I would appreciate if you posted some info about how you draw the bezier curve itself.

    I see much struggle in XNA community to draw a straight line. So I'm very curious about how you sove both of the problems. How do you draw straight and curvy lines?

    ReplyDelete
  3. The developer behind this wonderful item is Jimmy Mancini exactly the same developer who developed the famous Youtube Ranking Software!prompter

    ReplyDelete