本文主要是用matlab完成各色物品的制作,通过编程熟悉matlab的基本用法,本文原创,转载和使用请注明出处;
所有的源码都可以通过关注公众号(天一色)获取。
%-------------------------大花瓶——————————————————————
%------------------制作人:天一色—————————————————————
%----------------------2013-9-1----------------------------------------
clc
clear
close all
clear all
t=0:pi/100:2*pi;
[x,y,z]=cylinder(2+sin(2*t)+cos(2*t));
surf(x,y,z);
shading interp
%colormap(copper);
%colormap(hot);
%colormap(bone);
%colormap(pink);
%colormap(flag);
%colormap(hsv);
%colormap(white);
%colormap(grey);
%colormap(lines);
%colormap(colorcube);
%colormap(vga);
%colormap(jet);
%colormap(prism);
colormap(cool);
axis off
axis square
%-------------------------大花瓶——————————————————————
%------------------制作人:天一色—————————————————————
%----------------------2013-9-1----------------------------------------
clc
clear
close all
clear all
t=0:pi/100:2*pi;
[x,y,z]=cylinder(1+sin(3*t));
surf(x,y,z);
shading interp
%colormap(copper);
%colormap(hot);
%colormap(bone);
%colormap(pink);
%colormap(flag);
%colormap(hsv);
%colormap(white);
%colormap(grey);
%colormap(lines);
%colormap(colorcube);
%colormap(vga);
%colormap(jet);
%colormap(prism);
colormap(cool);
axis off
axis square
%-------------------------花瓶——————————————————————
%------------------制作人:天一色—————————————————————
%----------------------2013-9-1----------------------------------------
clc
clear
close all
clear all
t=0:pi/100:2*pi;
[x,y,z]=cylinder(2+sin(1*t));
surf(x,y,z);
shading interp
%colormap(copper);
%colormap(hot);
%colormap(bone);
%colormap(pink);
%colormap(flag);
%colormap(hsv);
%colormap(white);
%colormap(grey);
%colormap(lines);
%colormap(colorcube);
%colormap(vga);
%colormap(jet);
%colormap(prism);
colormap(cool);
axis off
axis square
后续内容详见: 微信公众号(天一色)