科学计算科学计算 (46).pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《科学计算科学计算 (46).pdf》由会员分享,可在线阅读,更多相关《科学计算科学计算 (46).pdf(12页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Line ObjectSurface ObjectLightingReflectance Characteristics of Graphics Objects8.2 Line 8.2 Line and and SurfaceSurface(1)Create line objectSyntaxhandle=line(x,y,z,property1,value1,property2,value2,)Arguments x,y and z are vectors or matrices of the same type,which store the data of points.1.Line O
2、bject1.Line Object1.Line Object1.Line Object(2)Line PropertiesLineStyle:Specify line style.The default value is-Color:Specify line color.The default value of 0 0 0 corresponds to black.LineWidth:Specify line width.The default value is 0.5 points.Marker:Specify marker symbol,can take the same value a
3、s that of the plotfunction.MarkerSize:Specify marker size,default value is 6 points.XData,YData,Zdata:Set x,y,z values,which are vectors.t=-0.1:0.1:2*pi;x=cos(t);y=sin(t);line(x,y,Color,b)line(x+1.2,y-1,Color,y)line(x+2.4,y,Color,k)line(x+3.6,y-1,Color,g)line(x+4.8,y,Color,r)ha=gca;for n=1:size(ha.C
4、hildren)ha.Children(n).LineWidth=5;endha.XLim=-2,7;ha.YLim=-3,2;axis equalExample 1:Plot five circular lines using line objects.(1)Create surface objectUse the surface function to create a surface object.Syntax handle=surface(x,y,z,c,property1,value1,property2,value2,)Argument x,y,z are matrices of
5、the same size.Argument c specifies surface color according to the different heights.The surf function refresh the axes,delete the original plots before plotting.The surface function adds new plot to the current graph without deleting original plots.The surface function view the graph above the surfa
6、ce by default.Namely,the azimuth is 0 and elevation is 90.2.Surface 2.Surface ObjectObject(2)Surface Properties FaceColor:Define face color,which can be specified as:flat:Each face is filled with a single color.Its default.interp:Each face is filled with gradients.none:Do not draw the faces.texturem
7、ap:Each face is conformed with color specifyd in Cdata property.An RGB triplets or a color nameEdgeColor:Specify edge line color.2.Surface 2.Surface ObjectObjectr=linspace(0,2*pi,60);u,v=meshgrid(r);x=(8+3*cos(v).*cos(u);y=(8+3*cos(v).*sin(u);z=3*sin(v);axes(view,-37.5,30)hs=surface(x,y,z);axis equa
8、l;=8+3 cos=8+3 sin=3,u0,2,v0,2Example 2:Plot 3-D torus using surface objects.The equation of torus is:hs.EdgeColor=none;hs.FaceColor=interp;(1)Create Light ObjectSyntaxhandle=light(property1,value1,property2,value2,.)Light properties control the appearance and behavior of Light objects.(2)Light Prop
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 科学计算科学计算 46 科学 计算 46
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内