"Well, I don't suppose you're buying this drama" HAH that's just gold. Love the series! Learning a lot. I have a decent background in physics and programming but combining the two would've been very hard without you so keep up the good work! Loving it!!!
I had a hard time understanding your multicurve function, but now I get it. It's basically: start at point 0, calculate the mid of the next two points (1 and 2). Create a loop for t for quadraticBezier(0, 1, mid, t, pFinal). At the end of the iteration, the mid point is the new starting point (0 = mid).
You are really good, like watching NETFLIX, I can't stop watching and coding. My lesson fav so far ? Edge handling......not the springs(!), though I had to do them
I'd love to know how to find any points of intersection (accurately) of two different Bézier curves. And also of different types of paths, such as arcs, lines. (Intersections between all type, not just intersections between the same types.) Finding the points of intersection is an important step in adding and subtracting shapes without relying on clips and masks. (The stroke of two shapes may acquire strange effects if someone relies on clips and masks.)
Edit/Update/P.S.: I just saw that you have three videos on line intersections, so I skimmed them. I didn't see anything specifically mention Bézier curve intersections, but considering how Bézier curves are calculated, the techniques for line intersection may still apply. I'll have to sit down and watch them fully to be sure. If you happen to have a more elegant way to find precise intersections of various curve-line and curve-curve pairs, without adapting the technique used for line-line intersections, I'd love to see a video on it. Anyway, looking through your video topics, I see you have some very promising looking videos. I'll be back soon enough to watch them.
if you rearrange the terms it becomes really easy to understand the formula, and thus to extrapolate it to use more control points (probably as many as you like), and even to automate it as a for loop fed with an array of points. allow me to illustrate the reordered terms: Bezier ( a, b, c, v ){ // a b c are points, v is the interpolation value w = 1 - v; result = a * (w*w) + b * (w*v) * 2 + c * (v*v); } Bezier ( a, b, c, d, v ){ // a b c d are points, v is the interpolation value w = 1 - v; result = a * (w*w*w) + b * (w*w*v) * 3 + c * (w*v*v) * 3 + d * (v*v*v); } Bezier ( a, b, c, d, e, v ){ // a b c d e, are points, v is the interpolation value w = 1 - v; result = a * (w*w*w*w) + b * (w*w*w*v) * 4 + c * (w*w*v*v) * 4 + d * (w*v*v*v) * 4 + e * (v*v*v*v); } and so on, it's easy to see how this could be automated into a generalized function with n points
10:10 I really want to know the difference of your function and the canvas function. is it just run with more iterations or with more detailed numbers, are canvas functions run differently than custom JavaScript functions?
The canvas bezier function uses the real bezier curve function. Mine is approximating that with multiple quadratic curves. Plus point of mine is unlimited points on the curve. But it's not a real bezier.
aha okay I'll have to look up the difference. I'm just sitting here consuming while throwing out ideas generated that clutter my focus. I want to try using this but in another language. (Either learn C++, or use C# or Java.)
Can we calculate control points with start and end point given ? I want to draw a curve with certain given inclination every time for any given start & end points
Thanks for making this video! I'm wondering, is it possible to keep the curve on every point when calculating a multicurve? The formula in the start of the video doesn't work then (the curves don't line up properly).
Keith Peters Oh right, sorry. You explain how to make the curve touch each point when there's only 3 points, but I don't know how to do that with 4+ points.