% defines a profile x = [1.0 1.8 4.0 4.8 6.8 7.6 8.8 9.4]; y = [1.5 2.0 2.1 2.5 2.5 2.2 2.0 1.5]; plot(x,y) axis([0 10 0 4]) % to make the profile smoother, we use a spline xx = 1:0.2:9.4; yy = spline(x,y,xx); hold on plot(x,y,'o',xx,yy); % to add a wheel t = 0:0.01:2*pi; plot(2.5+0.5*cos(t),1.5+0.25*sin(t)); plot(8.0+0.5*cos(t),1.5+0.25*sin(t));