注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

随机过程

http://superware.blog.163.com

 
 
 

日志

 
 

Plot and Draw in Maxima  

2016-09-26 21:50:37|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

1.  Graphic Interface Plot

Plot is the standard Gnuplot interface to Maxima, convenient in its application, but not very flexible regarding the graphics' appearance.


1.1  Plot Commands


% Functions in Cartesian coordinates

plot2d ( f(x), xrange, options );
plot3d ( f(x, y), xrange, yrange, options );


% Parametric functions


plot2d ( [parametric, x(t), y(t), trange], options );

plot3d ( [x(u, v), y(u, v), z(u, v)], urange, vrange, options );

From the above,the functions plot2d and  plot3d differs in handling the parametric functions,  that is to say that  the syntax of the functions plot2d and  plot3d are not consistent。

The xrange and yrange are given by:

[x, x_1, x_2]

[y, y_1, y_2]



1.2 Options in plot functions

The format of the options is as the following

[opt_1, val_1], [gnuplot_preamble, "set size ratio -1"], ...

For example:

plot2d (

[ parametric, sin(3*t), sin(4*t), [t, 0, 2*%pi] ],

[nticks, 100],

[gnuplot_preamble, "set size ratio -1"]

)




2. Graphic interface Draw

The Gnuplot interface Draw provides an additional set of Maxima graphic routines, which differ from the standard routines with regard to their parameters, in particular the structure of the options.


2.1  Plot Commands


draw2d (options_1, graphic_object_1, options_2, graphic_object_2, ...);

draw3d (options_1, graphic_object_1, options_2, graphic_object_2, ...);


2.2  2D-graphic Objects


obj_explicit   : explicit   ( f(x), x, x1, x2 );

obj_parametric : parametric ( x(t), y(t), t, t1, t2 );

obj_implicit : implicit ( f(x,y) = g(x,y), x, x1, x2, y, y1, y2 );

obj_polar : polar ( r(phi), phi, phi1, phi2 );

obj_points : points ( xvals, yvals );

obj_points : points ( p1, p2, p3, p4, ... );

obj_polygon : polygon ( xvals, yvals );

obj_polygon : polygon ( p1, p2, p3, p4, ... );

obj_rectangle : rectangle ( p1, p2 );

obj_ellipse : ellipse ( x0, y0, a, b, angle_start, angle_end );


obj_label : label ( ["text", x, y], ... );


obj_vector : vector ( [x, y], [dx, dy] );


obj_image : image ( m, x, y, nx, ny );



2.3 3D-graphic Objects


obj_explicit : explicit ( f(x,y), x, x1, x2, y, y1, y2 );

obj_implicit : implicit ( f(x,y,z) = g(x,y,z), x, x1, x2, y, y1, y2, z, z1, z2 );

obj_parametric : parametric ( x(t), y(t), z(t), t, t1, t2 );

obj_parametric_surface : parametric_surface ( x(u,v), y(u,v), z(u,v),

u, u1, u2, v, v1, v2 );

obj_cylindrical : cylindrical ( r(z,phi), z, z1, z2, phi, phi1, phi2 );

obj_spherical : spherical ( r(phi, theta),

phi, phi1, phi2, theta, theta1, theta2 );

obj_points : points ( xvals, yvals, zvals );

obj_points : points ( p1, p2, p3, ... );


obj_label : label ( ["text", x, y, z], ... );


obj_vector : vector ( [x, y, z], [dx, dy, dz] );

  评论这张
 
阅读(54)| 评论(0)
推荐

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017