Results 1 to 8 of 8

Thread: Bezier curve example

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I only answered with way to make a curve that perfectly follows a designed game road plan. Catmull scales really well, there are no min-max and you don't need any specific spacing between them, only what your game desires. Best to test it i guess to see how it works. If you have just 1 segment in the middle of a straight, and 1 segment at the ends of it, it would (propably?) come out straight "curve" there. Just try it, see if it needs 3, 4 or 5 for long straights. Also might help if you put them near the end points.

    Also to explain Catmull function to someone less familiar with it; Function takes 4 key-point parameters, and 1 float value. The float value is always in range of 0..1, and means progressive position between second and third keypoint. Sometimes calculated key-points are not looping from end to start, and so for start of a serie like that can be given the first key point twice, same for the end.
    Last edited by User137; 12-09-2013 at 07:08 PM.

  2. #2
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    length of line divided by size of desired triangle

  3. #3
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    after implementing the Catmull in my own works I realize that it doesn't work quite like my bezier line routine. still I believe that a simple solution can be found
    1. create a function that will convert a multi segment line into its Catmull equivalent.
    2. create a function that will allow you to interpolate to any position on a multi segment line.
    once you have those functions then it should be fairly easy to figure out the rest. I will try to work these out if I have some time tonight since I need them for my stuff. will post the results.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •