Diferencia entre revisiones de «Mallado Arco 1 (grupo 59)»
De MateWiki
| Línea 40: | Línea 40: | ||
[[Categoría:TC20/21]] | [[Categoría:TC20/21]] | ||
[[Categoría:TC21/22]] | [[Categoría:TC21/22]] | ||
| + | [[Categoría:TC22/23]] | ||
[[Categoría:Articles in English]] | [[Categoría:Articles in English]] | ||
[[Categoría:Informática]] | [[Categoría:Informática]] | ||
Revisión del 19:30 16 nov 2022
We show how to draw meshes of plane regions, representing solids, with Octave UPM. The objective is to be able of visualizing physical quantities in the mesh points. The simplest example was considered in Dibujar un sólido 2-D. Here we go further and consider a parametrized solid. As an example we consider an annulus. We follow the steps:
- We introduce a sampling of the two parameters, (u,v) with a suitable step
- With meshgrid command we define two matrixes with the u and v coordinates of the mesh points in the parameter region D
- We compute the (x,y) coordenates of the mesh points with the parametrization.
- We use the mesh command to draw the mesh and adjunst the axis. We see the mesh from the top.
1 MATLAB code
h=0.1 % sampling step
u=1:h:2; % sampling of the interval [1,2]
v=0:h:2*pi+h; % sampling of the interval [0,2*pi]
[uu,vv]=meshgrid(u,v); % matrixes of u and v coordinates
figure(1)
xx=uu.*cos(vv); % parametrization
yy=uu.*sin(vv);
mesh(xx,yy,0*xx) % Draw the mesh
axis([-3,3,-3,3]) % select region for drawing
view(2) % See the pisture from the top
2 To go further
Visualization of a scalar field in a solid