Change origin of a mesh
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2021-1-1
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
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computational Geometry 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!