Animate CO2 motor in MATLAB -
I'm trying to recreate this engine in Matlab:. I am looking to use Hend Graphics to animate all moving parts. I have all the fixed parts already programmed, now I am working to move the ball up and down, but I do not know how it works. I do not understand how the work is done and what I have to do to move the ball. Any insights will be greatly appreciated.
Here is an example for a large circle for a small circle:
% # Large-board coordinates T = 0: pi / 100: 2 * pi; Xc = Kos (T); Yc = sin (t); % # Create small-board coordinates xs = 0.1 * cos (t); Ys = 0.1 * sin (t); % # Plot big circle shape, plot (xc, yc, 'r'); % # Small circle at the first place of plot and capture small caricol = plot (xs + xc (1), ys + yasi (1), 'b'); % # Loop to update small circle handle for tidx = 1: Length of small circle set (t)% # Update status (small chorale H, 'xData', xs + xc (tidx), 'yData', ys + Yc (tIdx)); To appreciate the Beauty Break (0.1)% # Wait a bit; End
Comments
Post a Comment