File:Finite_element_method_1D_illustration1.png
维基百科,自由的 encyclopedia
![File:Finite element method 1D illustration1.png](http://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Finite_element_method_1D_illustration1.png/800px-Finite_element_method_1D_illustration1.png)
本预览的尺寸:800 × 520像素。 其他分辨率:320 × 208像素 | 640 × 416像素 | 1,002 × 651像素。
原始文件 (1,002 × 651像素,文件大小:42 KB,MIME类型:image/png)
摘要
![]() |
File:Finite element method 1D illustration1.svg是此文件的矢量版本。 如果此文件质量不低于原点阵图,就应该将这个PNG格式文件替换为此文件。
File:Finite element method 1D illustration1.png → File:Finite element method 1D illustration1.svg
更多信息请参阅Help:SVG/zh。
|
Transferred from en.wikipedia to Commons by Maksim.
The original description page was here. All following user names refer to en.wikipedia.
许可协议
Public domainPublic domainfalsefalse |
![]() |
我,本作品著作权人,释出本作品至公有领域。这适用于全世界。 在一些国家这可能不合法;如果是这样的话,那么: 我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。 |
Source code
function main () % draw an illustration for finite element method
% prepare the scrreen and define some parameters
clf; hold on; axis equal; axis off;
fontsize=30; thick_line=3; thin_line=2; black=[0, 0, 0]; red=[1, 0, 0]; blue=[0, 0, 1];
arrowsize=0.1; arrow_type=1; arrow_angle=20; % (angle in degrees)
circrad=0.01; % radius of ball showing up in places
a=0; b=1; % interval endpoints
X=a:0.01:b; f=inline('2*x.*(1-x).^1.1'); Y=f(X); % the function
h=0.2; Xh=a:h:b; Yh=f(Xh); % the linear approximation
% x and y axes
arrow([a-0.2 0], [b+0.2, 0], thin_line, arrowsize, arrow_angle, arrow_type, black)
arrow([-0.15 -0.05], [-0.15, 1.5*max(Y)], thin_line, arrowsize, arrow_angle, arrow_type, black)
% plot the graphs
plot(X, Y, 'linewidth', thick_line); % mesh, and the function
plot(Xh, Yh, 'linewidth', thick_line, 'color', red)
%% place some dashed lines
for i=2:(length(Xh)-1)
plot([Xh(i) Xh(i)], [0, Yh(i)], 'linewidth', thin_line, 'linestyle', '--', 'color', 'black');
end
% some balls for beauty
ball(a, 0, circrad, black);
ball(b, 0, circrad, black);
for i=2:(length(Xh)-1)
ball(Xh(i), 0, circrad, black);
end
%% place text
tiny=0.07;
H=text(a+0.07, -tiny, 'x_0=0'); set(H, 'fontsize', fontsize, 'HorizontalAlignment', 'r', 'VerticalAlignment', 'top');
H=text(b-0.07, -tiny, 'x_5=1'); set(H, 'fontsize', fontsize, 'HorizontalAlignment', 'l', 'VerticalAlignment', 'top');
for i=2:(length(Xh)-1)
H=text(Xh(i), -tiny, sprintf('x_%d', i-1));
set(H, 'fontsize', fontsize, 'HorizontalAlignment', 'c', 'VerticalAlignment', 'top');
end
saveas(gcf, 'Finite_element_method_1D_illustration1.eps', 'psc2') % export to eps
function ball(x, y, r, color)
Theta=0:0.1:2*pi;
X=r*cos(Theta)+x;
Y=r*sin(Theta)+y;
H=fill(X, Y, color);
set(H, 'EdgeColor', 'none');
function arrow(start, stop, thickness, arrow_size, sharpness, arrow_type, color)
% Function arguments:
% start, stop: start and end coordinates of arrow, vectors of size 2
% thickness: thickness of arrow stick
% arrow_size: the size of the two sides of the angle in this picture ->
% sharpness: angle between the arrow stick and arrow side, in degrees
% arrow_type: 1 for filled arrow, otherwise the arrow will be just two segments
% color: arrow color, a vector of length three with values in [0, 1]
% convert to complex numbers
i=sqrt(-1);
start=start(1)+i*start(2); stop=stop(1)+i*stop(2);
rotate_angle=exp(i*pi*sharpness/180);
% points making up the arrow tip (besides the "stop" point)
point1 = stop - (arrow_size*rotate_angle)*(stop-start)/abs(stop-start);
point2 = stop - (arrow_size/rotate_angle)*(stop-start)/abs(stop-start);
if arrow_type==1 % filled arrow
% plot the stick, but not till the end, looks bad
t=0.5*arrow_size*cos(pi*sharpness/180)/abs(stop-start); stop1=t*start+(1-t)*stop;
plot(real([start, stop1]), imag([start, stop1]), 'LineWidth', thickness, 'Color', color);
% fill the arrow
H=fill(real([stop, point1, point2]), imag([stop, point1, point2]), color);
set(H, 'EdgeColor', 'none')
else % two-segment arrow
plot(real([start, stop]), imag([start, stop]), 'LineWidth', thickness, 'Color', color);
plot(real([stop, point1]), imag([stop, point1]), 'LineWidth', thickness, 'Color', color);
plot(real([stop, point2]), imag([stop, point2]), 'LineWidth', thickness, 'Color', color);
end
date/time | username | edit summary |
---|---|---|
01:53, 29 December 2005 | en:User:Oleg Alexandrov | (+source code) |
01:30, 29 December 2005 | en:User:Oleg Alexandrov |
原始上传日志
Legend: (cur) = this is the current file, (del) = delete this old version, (rev) = revert to this old version.
Click on date to download the file or see the image uploaded on that date.
- (del) (cur) 01:51, 29 December 2005 . . en:User:Oleg_Alexandrov Oleg Alexandrov ( en:User_talk:Oleg_Alexandrov Talk) . . 1002x651 (43514 bytes)
- (del) (rev) 01:50, 29 December 2005 . . en:User:Oleg_Alexandrov Oleg Alexandrov ( en:User_talk:Oleg_Alexandrov Talk) . . 1002x636 (43741 bytes)
- (del) (rev) 01:49, 29 December 2005 . . en:User:Oleg_Alexandrov Oleg Alexandrov ( en:User_talk:Oleg_Alexandrov Talk) . . 1002x636 (43741 bytes)
- (del) (rev) 01:48, 29 December 2005 . . en:User:Oleg_Alexandrov Oleg Alexandrov ( en:User_talk:Oleg_Alexandrov Talk) . . 1002x636 (43572 bytes)
- (del) (rev) 01:30, 29 December 2005 . . en:User:Oleg_Alexandrov Oleg Alexandrov ( en:User_talk:Oleg_Alexandrov Talk) . . 1002x636 (43572 bytes)
说明
添加一行文字以描述该文件所表现的内容
此文件中描述的项目
描绘内容
版权状态 简体中文(已转写)
受版权保护,并由版权所有者释出于公有领域 简体中文(已转写)
版权所有 简体中文(已转写)
著作权持有者释出至公有领域 简体中文(已转写)
文件历史
点击某个日期/时间查看对应时刻的文件。
日期/时间 | 缩略图 | 大小 | 用户 | 备注 | |
---|---|---|---|---|---|
当前 | 2006年3月18日 (六) 20:01 | ![]() | 1,002 × 651(42 KB) | Maksim | La bildo estas kopiita de wikipedia:en. La originala priskribo estas: == Licensing == {{PD-self}} ==Source code== <pre> <nowiki> function main () % draw an illustration for finite element method % prepare the scrreen and define some parameters clf; |
文件用途
以下页面使用本文件:
全域文件用途
以下其他wiki使用此文件:
- ar.wikipedia.org上的用途
- ca.wikipedia.org上的用途
- en.wikipedia.org上的用途
- es.wikipedia.org上的用途
- fi.wikipedia.org上的用途
- ja.wikipedia.org上的用途
- pl.wikipedia.org上的用途
- pt.wikipedia.org上的用途
- ro.wikipedia.org上的用途
- ru.wikipedia.org上的用途