How to make smooth surface across U-shaped object

4 Ansichten (letzte 30 Tage)
Daniell Algar
Daniell Algar am 12 Feb. 2013
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!

Akzeptierte Antwort

Daniell Algar
Daniell Algar am 13 Feb. 2013
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 :).

Weitere Antworten (0)

Kategorien

Mehr zu Delaunay Triangulation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by