필터 지우기
필터 지우기

How to make smooth surface across U-shaped object

조회 수: 3 (최근 30일)
Daniell Algar
Daniell Algar 2013년 2월 12일
Hi!
I have a set of data, say z(x,y), that could simply be thought of as a "U" shape in the (x,y)-plane, extended in the z-plane. So it's essentially a bathtub shape. This bathtub is originally built up of two (mirrored) "L" shapes, so the base/bottom of the tub has some overlaid values, no problem in it selfe.
I like to visualise the structure with surfaces on, so I use delaunay and trimesh. This works perfect when applied to the two "L"'s separately, but not when applied to the "U" (essentially consisting of all values from the two L-shapes). I figure this is because the delaunay triangle's asymptote towards the upper edges due to some "located in the wrong plane"-problem, so it's all edgy and ugly everywhere but on the base plane (x,y), not smooth at all. I've tried all trisurf, mesh, DelaunayTri, and others without pleasing results. I've tried extending the triangles variables like
tri1= delaunay(x1, y1);
tri2= delaunay(x2, y2);
tri= [tri1; tri2+ size(tri1, 1)];
trimesh(tri, [x1, x2], [y1, y2], [z1, z2])
also that without any success. I should add that size(x1, 1) ~= size(x2, 1), and the same goes for the other variables.
So, someone who dealt with this before? Who knows how to get a smooth surface across the full shape?
Thanks in advance!

채택된 답변

Daniell Algar
Daniell Algar 2013년 2월 13일
I can add for future reference that I solved it by correcting a bug from the code above. The variable tri should have been
tri= [tri1; tri2+ length(x1)];
of course :).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by