Hello Vikram and Roy, Thank you so much for your time in replying to my email. I have been able to create a Delaunay triangulation of the map of the Texas state. How I did it is as follows:
1. Get the shapefile for the map from http://gis-txdot.opendata.arcgis.com/datasets/texas-state-boundary 2. Load this into QGIS application which is free and runs across different platforms. 3. Use tool 'Vector->Geometry Tools->Simplify' to get coarse lines. You can control how coarse you want the outer lines. 4. Use tool 'Vector->Geometry Tools->Extract Vertices' to create a layer with vertices of the simplified map you obtained in step 3. 5. Save the layer corresponding to vertices by 'Layer->Save as'. In the save as option, you can deselect most of the features. Look for option 'GEOMETRY' and select 'As_XY' to store the (x,y) coordinates of the vertices. This link was helpful: https://gis.stackexchange.com/questions/8844/getting-list-of-coordinates-for-points-in-layer-using-qgis 6. Finally, I created the .geo file by reading the .csv file in step 5. The file generated in step 5 has the first and last vertices equal so while creating the .geo file I excluded the last vertex. I then ran gmsh on .geo file. I think this is not very efficient but for now it works. Alternatively, I could directly extract the vertices from the shapefile by using some python libraries such as basemap or some other libraries. I am guessing that python libraries may also have features similar to step 3 using which you can coarsen the boundary lines. Regards, Prashant On Sat, May 16, 2020 at 12:39 AM Vikram Garg <vikram.v.g...@gmail.com> wrote: > > Vikram Garg > > vikramvgarg.github.io/ > > > On Fri, May 15, 2020 at 11:02 PM Roy Stogner <royst...@oden.utexas.edu> > wrote: > >> >> On Fri, 15 May 2020, Vikram Garg wrote: >> >> > Once you have the boundaries defined, TRIANGLE, which uses Delaunay >> > triangulation should be able to do this. >> >> This is true, but defining the boundaries in code is certainly a pain. >> IIRC you wrote your own vectorizer as an undergrad, and it took us a >> week to figure out that even though the meshes looked okay to the >> naked eye, sharp jumps from pixel row to pixel row were behind the >> crazy pressure spikes we were seeing in airfoil simulations. >> >> > Yes, I was wary of that, but then we had sharp fractal like features due > to the ice crystals we were trying to represent. We can have similar > features on a coastal > boundary representation, but I depending on the eventual purpose, these > can be smoothed considerably. > > >> Is there any "standard" 2D format for vector shape data? My wife >> uses (or when necessary converts everything to) SVG for laser cutter >> and plotter use, but SVG has a zillion features beyond defining loops. >> I'm not sure if there's a specific subset of SVG that's well-defined >> enough to write a reader for. I guess it's just XML under the hood. >> Maybe the thing to do would be to load a vector Texas outline into >> Inkscape, save it, and write a quick-and-dirty parser for whatever's >> there? >> > > I am not aware of a standard format. The inkscape idea could work, I > myself used Matlab's imread, not sure if it supports svg currently. > > >> --- >> Roy >> > _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users