Crank Mechanism
Example from the PscFunctions package
With the help of routines of the package one can obtain the unified equations practically of any continuous curve
.
For example, routines of the package allow to create the equation of the curve representing an outline of the crank mechanism. For this purpose it is enough to equate a curve containing one arbitrary parameter w. Changing parameter
w
we can create simulation of the mechanism movement.
> | restart; with(PscFunctions): x:=(t,w)->cos(w+2*Pi*PR(t,0,1))+sqrt(9-sin(w)^2)*PR(t,1,1)+PR(t,3,1)-PR(t,5,1): y:=(t,w)->sin(w+2*Pi*PR(t,0,1))-sin(w)*PR(t,1,1)+PR(t,2,1)/4-PR(t,4,1)/2+PR(t,6,1)/4: plots[animate](plot,[[x(t,w),y(t,w),t=0.03..7],color=BLACK,thickness=2],w=0..2*Pi,scaling=CONSTRAINED); 'X'=x(t,w); 'Y'=y(t,w); |