I studied Theory of Machines in my undergrad course. Coupler curves are part of this course. My wish is to write computer programs using Python to trace these coupler curves. See output, four bar mechanism is tracing out infinity curve
-
$O_1$ is the fixed pin on left -
$O_2$ is the fixed pin on right - line
$AO_2$ is a helpful construction that assists in calculation of$\delta$ -
$\alpha$ is the angle between$AO_2$ and$O_1O_2$ -
$\theta$ is the angle between$AO_2$ and$BO_2$ -
$\delta$ is the angle made by the link$BO_2$ with x axis - Point P is tracing the infinity coupler curve
Links | Distance |
---|---|
Crank |
a |
Coupler AB | b |
Crank |
c |
Fixed frame |
d |
point P on link AB (AP) | r |
Angle | Symbol |
---|---|
phi ( |
|
alpha ( |
|
theta ( |
|
|
delta ( |
slope of line AB | gamma ( |
The key is, once the angles are known following relation can be used to find the co-ordinates:
-
$\phi$ is defined in the code. 2$\pi$ radians are discretized into 180 points. So,$O_1 A$ is the driving crank. -
$\theta$ is calculated using the cosine formula.$cos(\theta) = \frac{O_2A^2 + c^2 - b^2}{2.O_2A.c}$
-
$\delta$ :- When
$\phi$ <$\pi$ =>$\delta$ =$\pi + (\theta - \alpha)$ - When
$\phi$ >$\pi$ =>$\delta$ =$\pi - (\theta - \alpha)$
- When
$\gamma = tan^{-1} (\frac{y_B - y_A}{x_B - x_A})$
Point | x co-ordinate | y co-ordinate |
---|---|---|
|
||
|
||
A | ||
B | ||
P |
infinity_coupler_curve.mp4
Executing the code
- will generate a crude animation and
- write a video titled 'infinity_coupler_curve.mp4' in current directory and
- save an image titled 'infinity_coupler_curve.png' in current directory
ffmpeg.exe is required for saving the animation as mp4. ffmpeg executable is downloaded from https://github.com/BtbN/FFmpeg-Builds/releases for win64