Is there a way to add the GRASS v.centerline function to the QGIS Toolbox GRASS functions? - qgis

The standard GRASS plugin in QGIS does not include the v.centerline function in the Toolbox.. it may be an extension that needs to be added.. is there a way to add v.centerline to the GRASS functions in the QGIS toolbox? Would prefer not having to try and learn using the separate GRASS environment to try and use v.centerline.
Tried finding procedure on web to add v.centerline as extension to GRASS functions in QGIS Toolbox, but without success..

Related

Remeshing of a triangular mesh for making high quality Delaunay triangulation?

I have a triangular mesh of the brain surface. I want to remesh it to a high-quality Delaunay triangulation. I'm seeking an easy and straightforward method.
pygalmesh interfaces CGAL and has surface remeshing. Install CGAL, then install pygalmesh with
pip install pygalmesh
Then you can use
pygalmesh-remesh-surface lion-head.off out.vtu -e 0.025 -a 25 -s 0.1 -d 0.001
on the command line.
I'm not sure if C++ is an option for you but the CGAL library provides such a functionality. See this package, see in particular this example.
If you want to use a GUI, you can use the CGAL polyhedron demo. You can compile it yourself by compiling the code in demo/Polyhedron from a release or use the pre-compiled windows demo available: demo + dlls to be extracted in the directory of the demo. Load your input mesh, select it and click on Operations -> Tetrahedral Mesh Generation -> Create a Surface Triangle Mesh
You mean that you want to resample the mesh? I've had some success using the trimesh package: https://github.com/mikedh/trimesh
Check out trimesh.remesh in particular.
You can use JIGSAW for surface (re)meshing. Similarly to CGAL, it offers various Delaunay-based methods to discretise planar/surface/volume domains, with a focus on high quality mesh creation.
Though JIGSAW itself is a c++ code, you can run it directly from either MATLAB or Python. To install, you'll need a c++ compiler and cmake. Click through to GitHub for additional instructions and examples.
**I'm a developer of JIGSAW, so keep this in mind I guess! Otherwise, in addition to CGAL, the MMG or Geogram packages may also be of interest.

How to make a complex robot model in webots?

I make my robot using cyberbotics webots. I can’t figure out how to make a beautiful 3D model. At least at the mantis hexapod level.
I understand that you can import ready-made fraud only in vrml97 format, but it is not supported by fusion 360 and other programs.
But in webots itself, I did not find a way to build a model more complicated than using cubes, pyramids, and other simple objects.
There was also an idea to assemble a model from a large number of rectangles using grouping, but it seems to me that such a model will greatly slow down.
Is it possible to see how the finished robots are made, and make changes to them?
The node you are looking for is the IndexedFaceSet https://www.cyberbotics.com/doc/reference/indexedfaceset, it allows you to efficiently model a shape using a set of triangle faces, you will find an example of this in this simulation world: https://cyberbotics.com/doc/guide/samples-geometries#high_resolution_indexedfaceset-wbt
One possible workflow to do this is to use Blender to create your mesh and then use the Webots exporter to export it to Webots: https://github.com/cyberbotics/blender-webots-exporter

Modifiying imported shapes in OpenSCAD

Given an STL file, OpenSCAD is able to import it:
import("file.stl");
I can also transform the result. However, when I try to do any openscad commands, the imported shape disappears:
translate([10,0,0])
import("Boat.stl");
cube(5);
Once the function call is added to any native shape, the boat disappears. Is there any way around this? I am trying to take a shape that has been sliced into pieces in netfabb, and create tabs so the the pieces fit precisely together for gluing.

Converting images from one geospatial coordinate system to another

I'd like to stack the images from this map: http://earthquake.usgs.gov/regional/nca/soiltype/map/ from linear projection into a leaflet map. The source tiles are in known but nonstandard zoom levels, and leaflet maps want mercator mercator XYZ tiles. In principle, I know how to do this - I have functions for changing XY coordinates into lat-lng coordinates in the two maps, and I just need to map pixels for the target map in terms of pixels in the source map.
This is unfortunately nontrivial, as the source pixels are spread across hundreds of different image files, and I am trying to put them into hundreds more images. Is there a software package that makes this a little bit more straightforward? If there is no library for dealing with this kind of data, it seems like there really should be...
Postgis has the RT_ST_Transform method, which under the hood uses GdalWarp. So, you have at least these two options. If you use Postgis, you will need to actually register/import the images into Postgis, using raster2pgsql and then call RT_ST_Transform on each one and then dump them out again -- which could be scripted to some extent using plpgsql (Postgres's scripting language). There is something of a learning curve involved with using Postgis raster, which may be worthwhile if you plan to do any other image processing analysis. You could also write a shell script (or similar) to automate gdalwarp if you don't wish to go the Postgis route.
For a less formal method than gdalwarp (an excellent program), you can check out the Leaflet plugin Leaflet.imageTransform, that can transform and image on the fly in the browser.

fruit ninja Blade effect

i want to make fruit ninja blade. i am using cocos2d and the MotionStreak is really ugly for this. Any other approach or better settings for MotionStreak? maybe particle system? any free great tools similar to ParticleDesigner?
I have my own implementation with OpenGL triangle strips mapped with texture. The blade is very smooth if the distances between adjacent points are small enough. I use linear interpolation to insert more points between two points which the distance is greater than a predefined constant. I'm thinking of use order 2 interpolation but the implementation is more difficult and the performance may reduces.
Source code is available here https://github.com/hiepnd/CCBlade
i don't know how much effort it will take but the thing is you can create and change shape of filter and just apply a white to gray gradient as it's texture, it'll give a very good looking results. i myself am working with cocos2d-x (it's just a c++ port of cocos2d) and it has samples for dynamic filters (it's just like you create and manipulate a mesh and all the things are done automaticaly), it uses CCActionGrid class but i just didn't used this class yet if you couln't solve your problem using that ask me to search deeper.
http://pixlatedstudios.com/2012/02/fruit-ninja-like-blade-effect/
Worth Checking out!!!! based on hiepnd CCBlade tutorial.