Bicycle wheel cycle and bezier

I am trying to plot a path for the front wheel of a bicycle while only the curve of the bezier rear wheel is known. Now I think I know how to get the formula, but the answer should be a (set of) Bezier curve. I am assuming that if the trajectory of the rear wheel is a Bezier curve then the front wheel track is unnecessary. So I probably have to recursively approximate it using more than one curve?

I want to view the result in SVG.

Please try to explain in small steps as my math is a little rusty after 26 years ...

To understand what I'm talking about, see: Example of a path to a bicycle wheel

Some background information might be helpful here: I am trying to create a plugin for Inkscape that calculates the path the CNC machine should follow when moving the swivel knife at a given offset. It is like the famous rear wheel track and is trying to get its front wheel track out of it. So the input is an SVG file with the paths in it (the shapes I want to cut), and the output is the same file with additional SVG paths appended to it (the paths the CNC machine must follow to cut the shapes I want with swivel knife).

The funny thing is that the bike will begin to ride on a line that is exactly parallel to the line between the start point and its control point and will end its ride exactly parallel to the line between the end point of the Bézier curve and the control point. This is what happens in between these points, which seem to be out of control ...

+3


source to share


3 answers


GOT IT!

I think I found an elegant solution to this problem after thoroughly studying the tutorial that KIKO showed me. Look at point 6 (De Castelau's algorithm)

Note that the green line touches the Bezier curve. We can use it to represent a frame (with a length L) of a bicycle (which is always parallel to this line). This makes it very easy to draw the path of the front wheel.



But I need a front wheel track in Bezier curves ...

Step 1: Duplicate the first Bezier curve and modify it so that the first 2 control points (p1 and p2 in the example) are offset with length L parallel to the line (p1, p2). Do the same with P3 and P4. This Bezier will be our first assessment of the front wheel. Step 2: Begin drawing Bezier curves for the rear and front wheel while tracking the difference between the calculated front wheel track and the front Bezier wheel estimate. If the difference becomes large, split the estimated Bezier curve and adjust a new control point. Repeat this process until you finish painting.

+1


source


Perhaps you want: "Soil on Bezier curves?"

http://pomax.github.io/bezierinfo



Looks like a useful webpage to me. But from the link you gave, I can only see its phase curve with slightly higher amplitude. It is best to filter the rear wheel data to get the front wheel data. It all depends on the data you have for the rear wheel.

0


source


Suppose we accept the assumption that the front wheel is at a fixed distance from the rear wheel and that it is always on a tangent line, "which makes the problem acceptable.

The Bezier curve is given by the formula B (t) = (1-t) ^ 3 P_0 +3 (1-t) ^ 2 t P_1 +3 (1-t) t ^ 2 P_2 + t ^ 3 P_3

tangent can be found by differentiating

T = dB / dt = `-3 P_0 t ^ 2 + 9 P_1 t ^ 2-9 P_2 t ^ 2 + 3 P_3 t ^ 2 + 6 P_0 t-12 P_1 t + 6 P_2 t-3 P_0 + 3 P_1

we can find the normal unit length N by finding N = T / sqrt (TT). The curve we want is B(t) + a N

. For some constant a. This is not a good expression. You are probably best off calculating some points and fitting the curve. You might be able to use CAS for algebraic processing.

0


source







All Articles