Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Interpolating Bezier Spline Curve DEMO

    Creation share codes
    5
    8
    480
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Gothon
      Gothon F last edited by Gothon

      It was noted by some users that the Fuze Bezier() function only takes 4 points and doesn't even go through the middle ones. This is because the middle points in a Bezier curve control the tangent to the curve at the endpoints. The curve is only guaranteed to pass through the endpoints.

      However it is not difficult to stitch together a 'spline' curve from multiple Bezier curves that pass through every input point.

      1. You can have as many input points as you like (minimum 2)
      2. The curve will pass though (interpolate) every point
      3. The path will have a continuous tangent everywhere (eg be smooth)

      To demonstrate this I have created a small program that has interactive curve editing and a missile following the curve.

      Bezier Spline DEMO
      ID: QDK63MND9L

      waldron 1 Reply Last reply Reply Quote 11
      • SteveZX81
        SteveZX81 F last edited by

        I'll check this out, thank you!

        1 Reply Last reply Reply Quote 1
        • waldron
          waldron F @Gothon last edited by

          @Gothon this is so cool what an awesome demo !

          1 Reply Last reply Reply Quote 1
          • PickleCatStars
            PickleCatStars F last edited by

            This is a nicely-editable curve! The missile even follows along while you’re moving the points :)

            1 Reply Last reply Reply Quote 1
            • Gothon
              Gothon F last edited by

              I have now added an option to connect the ends of the curve together creating closed loop that the missile can follow endlessly.

              1 Reply Last reply Reply Quote 3
              • T
                tony7059 last edited by

                Nice job, @Gothon !

                1 Reply Last reply Reply Quote 0
                • Gothon
                  Gothon F last edited by Gothon

                  Yesterday I was running the KatRacer demo and I thought that I could use a spline curve to describe the path of the race track. So I added some code from my demo and started placing control points by trial and error. Some hours later with only 16 control points I was able to pretty accurately path out the entire track.

                  With this track information I was able to confine the kart to the track. It is not perfect, but it is pretty close. With this information it should be possible to flesh out a racing game for any one who wants to just as Jon originally intended. :-) Kat made two other tracks if anyone wants to make a spline for those as-well.

                  Kat Racer - Track Spline
                  ID: 1RV23MND9L (live)

                  1 Reply Last reply Reply Quote 9
                  • PickleCatStars
                    PickleCatStars F last edited by PickleCatStars

                    It seems like fuze is maturing. I was having a look through my downloaded stuff the other day and there’s allsorts of stuff to mess about with. Your file system, 3d collision/physics helper functions, a high score table, not to mention all the game jam stuff. Now the old demos are coming back. Good times!

                    Edit: And the particles!

                    1 Reply Last reply Reply Quote 6
                    • First post
                      Last post