gridtrimesh Matlab script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: gridtrimesh.zip
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Willie Brink (View more)

gridtrimesh script description:




Publisher review:
gridtrimesh fits a square grid surface of the form z = f(x,y) to a triangular mesh surface. The function GRIDTRIMESH fits a surface of the form Z = F(X,Y) to a given triangular mesh. Inputs X and Y are assumed to be produced by something similar to MESHGRID and the result could then be visualized by a simple SURF(X,Y,Z).The triangular mesh on which this function operates should be defined in the usual way by two matrices F and V. MATLAB functions that use similar representations include TRIMESH, TRISURF and REDUCEPATCH. The included example file BEETHOVEN.MAT contains two such matrices.A main advantage that this function has over the internal function GRIDDATA is that it operates not only on the set of vertices but also on the given triangulation. GRIDDATA first performs a Delaunay triangulation on the projected data points and subsequently always yields a surface that has a convex domain in the xy-plane. Another major drawback of GRIDDATA is that it handles surfaces that are not so-called 2.5D poorly (a "2.5D" surface has the property that for any xy-pair there exists at most one z-value on the surface, e.g. any function z = f(x,y)).

This is because GRIDDATA projects all points to the xy-plane and then triangulates them without considering their original positions in 3-space. GRIDTRIMESH, on the other hand, considers all intersections that the ray through a particular gridpoint makes with the surface in 3D and then picks the maximum z-value. This emulates the idea of dropping a piece of cloth over the surface from above (i.e. from somewhere on the positive z-axis).Another favourable trait of this function is its speed. I've tested it on the well-known Stanford bunny that consists of approximately 70,000 triangles. For a 100-by-100 grid (which is 10,000 points to be sampled) the function executes in about 2.4 seconds.For those requiring more speed a MEX version of the function, called MXGRIDTRIMESH, is also supplied. This function may be used in exactly the same manner and produces exacly the same answer as GRIDTRIMESH. But since MXGRIDTRIMESH was written in C and then compiled with MEX it performs better. It required about 0.2 seconds for the Stanford bunny on a 100-by-100 grid and only about 2 seconds for a 1,000-by-1,000 grid (a million points!!).The attached zip-file also includes an example script called DEMONSTRATION which can be run directly (you may need to recompile MXGRIDTRIMESH first, however).CAUTION: at this stage the inputs X and Y must be generated by meshgrid(x,y) where x and y are monotonically increasing vectors. The function might go into an infinite loop if this is not the case!!
gridtrimesh is a Matlab script for Mathematics scripts design by Willie Brink. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
gridtrimesh fits a square grid surface of the form z = f(x,y) to a triangular mesh surface.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5