global rotational rotational = 200 scrsz = get(0,'ScreenSize'); figure('Position',[1 scrsz(4)/1.2 scrsz(3)/1.2 scrsz(4)/1.2], ... 'Color', 'white' ) % front axle of gears [x, y, z] = cylinder( [-3, 0, 0], 3, 0.2 ); surf(x, y, z); hold on % rear axle of gears rear_ax = 4.75; if exploded rear_ax = rear_ax + 6; end [x, y, z] = cylinder( [rear_ax, 0, 0], 2, 0.2 ); surf(x, y, z); % IVT trans = 1.5; if exploded trans = trans + 6; end [x, y, z] = transmission( [trans, 0, 0], 3.7, 1.25, 2.4, 2 ); surf(x, y, z); % aux gearbox aux_gb = 0; trans = 1.5; if exploded aux_gb = aux_gb + 3.25; end [x, y, z] = cylinder( [aux_gb, 0, 0], 1.5, 3 ); surf(x, y, z); % inner aux gearbox inner_aux = -1; if exploded inner_aux = inner_aux + 3.25; end [x, y, z] = cylinder( [inner_aux, 0, 0], 1, 1.5 ); surf(x, y, z); % flywheel [x, y, z] = flywheel( [-1.5, 0, 0], 0.25, 0.35, 0.1, 2.5, 3.5, 1.3, 0.2, 0.1 ); surf(x, y, z); axis equal axis tight axis off %colormap autumn % varies smoothly from red, through orange, to yellow. colormap bone % is a grayscale colormap with a higher value for the blue component. % This colormap is useful for adding an "electronic" look to grayscale images. %colormap colorcube % contains as many regularly spaced colors in RGB colorspace as possible, while % attempting to provide more steps of gray, pure red, pure green, and pure blue. %colormap cool % consists of colors that are shades of cyan and magenta. It varies smoothly from % cyan to magenta. %colormap copper % varies smoothly from black to bright copper. %colormap flag % consists of the colors red, white, blue, and black. % This colormap completely changes color with each index increment. %colormap gray % returns a linear grayscale colormap. %colormap hot % varies smoothly from black through shades of red, orange, and yellow, to white. %colormap hsv % varies the hue component of the hue-saturation-value color model. % The colors begin with red, pass through yellow, green, cyan, blue, magenta, and % return to red. The colormap is particularly appropriate for displaying periodic % functions. %colormap hsv(50) % is the same as hsv2rgb([h ones(m,2)]) where h is the linear ramp, h = (0:m-1)'/m. %colormap jet % ranges from blue to red, and passes through the colors cyan, yellow, and orange. % It is a variation of the hsv colormap. The jet colormap is associated with an % astrophysical fluid jet simulation from the National Center for Supercomputer % Applications. See the "Examples" section. %colormap lines % produces a colormap of colors specified by the axes ColorOrder property % and a shade of gray. %colormap pink % contains pastel shades of pink. The pink colormap provides sepia % tone colorization of grayscale photographs. %colormap prism % repeats the six colors red, orange, yellow, green, blue, and violet. %colormap spring % consists of colors that are shades of magenta and yellow. %colormap summer % consists of colors that are shades of green and yellow. %colormap white % is an all white monochrome colormap. %colormap winter % consists of colors that are shades of blue and green. shading interp if exploded alpha(1) else alpha(.7) end lightangle(60, 45) view(-20, 35)