Change origin of a mesh
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Matthew Worker
el 1 de En. de 2021
Comentada: Star Strider
el 1 de En. de 2021
Hello,
I would like to chane the origin of this mesh:

to put the origin0 at the coordiante : -200 ,any ideas for it?
Here is the code of the mesh:
rows=257;
columns=251;
x=0:40:columns.*3/4;
xmin=x-1;
theta=(0:5:360)*pi/180;
[th,X]=meshgrid(theta,xmin);
th2=size(th)
X2=size(X)
A=X.*cos(th);
B=X.*sin(th);
C=zeros(X2(1),th2(2));
T2 = delaunay(A,B);
trimesh(T2,A,B,C);
view(0,90)
Thank you.
0 comentarios
Respuesta aceptada
Star Strider
el 1 de En. de 2021
Try this:
rows=257;
columns=251;
x=0:40:columns.*3/4;
xmin=x-1;
theta=(0:5:360)*pi/180;
[th,X]=meshgrid(theta,xmin);
th2=size(th)
X2=size(X)
xshift = -200; % Shift ‘x’ Origin Of Mesh
yshift = 0; % Shift ‘y’ Origin Of Mesh
A=X.*cos(th) + xshift;
B=X.*sin(th) + yshift;
C=zeros(X2(1),th2(2));
T2 = delaunay(A,B);
trimesh(T2,A,B,C);
view(0,90)
axis equal
.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Computational Geometry en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!