Skip to content
Branch: master
Find file History
Latest commit 8d352cc Jan 20, 2020
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md 1.0 Dec 19, 2019
centerline1.py 2020.0.2 Jan 20, 2020
centerline2.py 2020.0.1 Jan 8, 2020
convexHull.ipynb 2020.0.2 Jan 20, 2020
convexHull.py 2020.0.1 Jan 8, 2020
cutAndCap.py 1.0 Dec 19, 2019
cutWithMesh.py 2020.0.2 Jan 20, 2020
densifycloud.py 2020.0.2 Jan 20, 2020
fatlimb.py 2020.0.1 Jan 8, 2020
fitplanes.py 2020.0.2 Jan 20, 2020
fitspheres1.py
fitspheres2.py 2020.0.1 Jan 8, 2020
geodesic.py 2020.0.2 Jan 20, 2020
interpolateField.py 2020.0.1 Jan 8, 2020
interpolateScalar.py 2020.0.2 Jan 20, 2020
intersect2d.py 2020.0.1 Jan 8, 2020
mesh_smoothers.py 2020.0.2 Jan 20, 2020
meshquality.py 1.0 Dec 19, 2019
moving_least_squares1D.py 2020.0.1 Jan 8, 2020
moving_least_squares2D.py 2020.0.2 Jan 20, 2020
moving_least_squares3D.py 2020.0.2 Jan 20, 2020
pointsCutMesh1.py 2020.0.1 Jan 8, 2020
pointsCutMesh2.py 2020.0.1 Jan 8, 2020
projectsphere.py 1.0 Dec 19, 2019
quadratic_morphing.py 2020.0.1 Jan 8, 2020
recosurface.py 2020.0.1 Jan 8, 2020
run_all.sh
skeletonize.py 2020.0.2 Jan 20, 2020
splitmesh.py 2020.0.2 Jan 20, 2020
thinplate.py 2020.0.1 Jan 8, 2020
thinplate_grid.ipynb 2020.0.2 Jan 20, 2020
thinplate_grid.py 2020.0.1 Jan 8, 2020
thinplate_morphing.py 2020.0.1 Jan 8, 2020
thinplate_morphing_2d.py 2020.0.2 Jan 20, 2020

README.md

Advanced examples

In this directory you will find a set of examples to perform more complex operations and simulations.

git clone https://github.com/marcomusy/vtkplotter-examples.git
cd vtkplotter_examples/vtkplotter_examples/advanced
python example.py  # on mac OSX try 'pythonw' instead

(click thumbnail image to get to the python script)

convexhull
convexHull.py
Create a 3D Delaunay triangulation of a set of input points.
cutwithmesh
cutWithMesh.py
Cut a mesh with another mesh.
fatlimb
fatlimb.py
Modify a mesh by moving the points along the normals to the surface and along the radius of a sphere centered at the center of mass of the mesh. At each step we redefine the actor so that the normals are recalculated for the underlying polydata.
fitspheres1
fitspheres1.py
Fit spheres to a region of a surface defined by N points that are closest to a given point of the surface. For some of these points we show the fitting sphere.
Red lines join the center of the sphere to the surface point.
Black points are the N points used for fitting.
geodesic
geodesic.py
Dijkstra algorithm to compute the mesh geodesic shortest path.
interpolateField
interpolateField.py
Interpolate the value of a vectorial field only known on a small set of points to a whole region space where the field is not defined.
Two interpolation methods are shown: Radial Basis Function and Thin Plate Splines.
interpolateScalar
interpolateScalar.py
Interpolate the value of a scalar only known on a set of points to a new set of points where the scalar is not defined.
Two interpolation methods are possible: Radial Basis Function and Nearest point.
mesh_smoothers
mesh_smoothers.py
Mesh smoothing with smoothLaplacian() and smoothWSinc() methods.
mls1
moving_least_squares1D.py
Use a variant of the Moving Least Squares algorithm for a cloud of scattered points to become a smooth line. The input actor's polydata is modified by the method so more than one pass is possible.
mls2
moving_least_squares2D.py
Use a variant of the Moving Least Squares algorithm for a cloud of points to become a smooth surface. The input actor's polydata is modified by the method so more than one pass is possible.
mls3
moving_least_squares3D.py
Generate a time sequence of 3D shapes (from a blue sphere to a red tetrahedron) as noisy cloud points, and smooth it with Moving Least Squares. This make a simultaneus fit in 4D (space+time).
smoothMLS3D() method returns an actor where points are color coded in bins of fitted time.
qmorph
quadratic_morphing.py
Takes two meshes, source and target, and morphs source to target. This is obtained by fitting 18 parameters of a non linear, quadratic, transformation defined in transform(). The fitting minimizes the distance to the target surface.
recosurface
recosurface.py
Reconstruct a surface from a point cloud.
1. An mesh is loaded and noise is added to its vertices.
2. the point cloud is smoothened with MLS (see moving_least_squares2D.py)
3. mesh.clean() imposes a minimum distance among mesh points.
4. a triangular mesh is extracted from this smoother point cloud.
skeletonize
skeletonize.py
Using 1D Moving Least Squares to skeletonize a surface.
splitmesh
splitmesh.py
Split a mesh by connectivity and order the pieces by increasing value of the area.
thinplate
thinplate.py
Perform a nonlinear warp transformation defined by a set of source and target landmarks.
thinplate_grid
thinplate_grid.py
Move a set of control points to warp space in their vicinity. Warping is visualised through a set of horizontal grids.
You can’t perform that action at this time.