next up previous
Next: Another mesh example Up: Finite Elements Previous: Finite Elements

A small example of MESH Creation and visualisation

getf('SCI/demos/fec/macros.sci')
N=20;
n=1:N;
x=cos(n*2*%pi/N);
y=sin(n*2*%pi/N);
noeuds=N;
noeul=[(1:(N))',x',y',0*ones(N,1)];
noeul=[noeul;(N+1),0,0,0];
trianl=[];
for i=1:(N-1),trianl=[trianl;i,i,i+1,N+1,0];end
trianl=[trianl;N,N,1,N+1,0];
triang=N;
rect=[-1.2,-1.2,1.2,1.2];
fec(noeul(:,2),noeul(:,3),trianl,(1:N+1)',"030"," ",rect);
meshvisu(3,rect);
\fbox{\epsfig{file=foo0_37.eps,width=3.75in}}



Scilab group