diff --git a/README.md b/README.md
index 917d0fb4..0949fd62 100644
--- a/README.md
+++ b/README.md
@@ -26,13 +26,21 @@ with no other dependencies.
## ๐พ Installation
```bash
pip install vedo
+```
+
+
+additional installation details (click to expand)
-# To get the latest dev version use instead:
-pip install -U git+https://github.com/marcomusy/vedo.git
+- As some of the features work better and faster on the older VTK version 8 you can install it via:
+`pip install vtk==8.1.2`
-# Or from the conda-forge channel:
-conda install -c conda-forge vedo
-```
+- To get the latest _dev_ version of `vedo` use instead:
+`pip install -U git+https://github.com/marcomusy/vedo.git`
+
+- Or install it from the conda-forge channel via:
+`conda install -c conda-forge vedo`
+
+
---------------------------------------------------------------------
@@ -62,7 +70,7 @@ The `vedo` library includes a [large set of working examples](https://github.com
for a wide range of functionalities:
-working with polygonal meshes and point clouds (click to expand)
+working with polygonal meshes and point clouds (click to expand)
- Import meshes from VTK format, STL, Wavefront OBJ, 3DS, Dolfin-XML, Neutral, GMSH, OFF, PCD (PointCloud),
@@ -168,9 +176,9 @@ Type `vedo -h` for the complete list of options.
| | | |
|:--------|:--------|:--------|
-| [![airplanes](https://user-images.githubusercontent.com/32848391/57341963-b8910900-713c-11e9-898a-84b6d3712bce.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/airplanes.py) | [![greyscott](https://user-images.githubusercontent.com/32848391/80291855-87e11f80-8751-11ea-9428-12e193a2a66e.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/grayscott.py)| [![quatumsine](https://user-images.githubusercontent.com/32848391/47751431-06aae880-dc92-11e8-9fcf-6659123edbfa.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/tunnelling2.py) |
-| *Create a simple 3D animation in exactly 10 lines of code.* | *Turing system of reaction-diffusion between two molecules.* | *Quantum-tunnelling of a particle in a box hitting a sinusoidal potential.* |
-| [![trimesh](https://user-images.githubusercontent.com/32848391/91164151-e8b44080-e6ce-11ea-8213-cf5b12aa4d16.png)](https://github.com/marcomusy/vedo/blob/master/examples/other/trimesh) | [![dolf](https://user-images.githubusercontent.com/32848391/58368591-8b3fab80-7eef-11e9-882f-8b8eaef43567.gif)](https://vedo.embl.es/content/vedo/dolfin.html)| [![whisker](https://user-images.githubusercontent.com/32848391/95772479-170cd000-0cbd-11eb-98c4-20c5ca342cb8.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/whiskers.py) |
+| [![cubecut](https://user-images.githubusercontent.com/32848391/99916179-e763d580-2d08-11eb-9044-b647115167ed.jpg)](https://github.com/marcomusy/vedo/tree/master/examples/advanced/cutWithMesh2.py) | [![greyscott](https://user-images.githubusercontent.com/32848391/80291855-87e11f80-8751-11ea-9428-12e193a2a66e.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/grayscott.py)| [![quatumsine](https://user-images.githubusercontent.com/32848391/47751431-06aae880-dc92-11e8-9fcf-6659123edbfa.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/tunnelling2.py) |
+| *Work with volumes and polygonal meshes.* | *Turing system of reaction-diffusion between two molecules.* | *Quantum-tunnelling of a particle in a box hitting a sinusoidal potential.* |
+| [![trimesh](https://user-images.githubusercontent.com/32848391/91164151-e8b44080-e6ce-11ea-8213-cf5b12aa4d16.png)](https://github.com/marcomusy/vedo/blob/master/examples/other/trimesh) | [![dolf](https://user-images.githubusercontent.com/32848391/58368591-8b3fab80-7eef-11e9-882f-8b8eaef43567.gif)](https://vedo.embl.es/content/vedo/dolfin.html)| [![whisker](https://user-images.githubusercontent.com/32848391/99916183-e8950280-2d08-11eb-8070-8bb1146c7c62.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/whiskers.py) |
| *Interoperability with the [trimesh](https://trimsh.org/) library.* | *Support for the [FEniCS/Dolfin](https://fenicsproject.org/) library for PDE and finite element solutions.* | *Advanced 2D histogramming and plotting capablities.* |
@@ -182,6 +190,7 @@ Run any of the _built-in_ examples from command line by typing:
| | | | |
|:---:|:---:|:---:|:---:|
| [![covid](https://user-images.githubusercontent.com/32848391/77330206-4824b380-6d1f-11ea-9bc3-e3aef970dcc2.gif)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/covid19.py)
`covid19` | [![caption](https://user-images.githubusercontent.com/32848391/90437536-dc2e5780-e0d2-11ea-8951-f905ffb54f54.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/caption.py)
`caption` | [![fonts3d](https://user-images.githubusercontent.com/32848391/90437540-dd5f8480-e0d2-11ea-8ddc-8839688979d0.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/fonts3d.py)
`font` | [![fonts](https://user-images.githubusercontent.com/32848391/90966829-9bba4980-e4d7-11ea-9ec8-23bac4b7448e.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/fonts3d.py)
`fonts` |
+| [![airplanes](https://user-images.githubusercontent.com/32848391/57341963-b8910900-713c-11e9-898a-84b6d3712bce.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/airplanes.py)
`airplanes` | [![scatter3](https://user-images.githubusercontent.com/32848391/99916178-e632a880-2d08-11eb-80e6-fe99f72fe913.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter3.py)
`scatter3` | [![fonts3d](https://user-images.githubusercontent.com/32848391/99916180-e763d580-2d08-11eb-85a0-2d87c2661466.png)](https://github.com/marcomusy/vedo/tree/master/examples/basic/lights.py)
`lights` | [![dens4d](https://user-images.githubusercontent.com/32848391/99916182-e7fc6c00-2d08-11eb-9097-9993f04ead00.gif)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot_density4d.py)
`density4d` |
| [![wave_eq](https://user-images.githubusercontent.com/32848391/39360796-ea5f9ef0-4a1f-11e8-85cb-f3e21072c7d5.gif)](https://github.com/marcomusy/vedo/blob/master/examples/simulations/wave_equation.py)
`wave_equation` | [![doubleslit](https://user-images.githubusercontent.com/32848391/96374703-86c70300-1174-11eb-9bfb-431a1ae5346d.png)](https://github.com/marcomusy/vedo/blob/master/examples/simulations/doubleslit.py)
`doubleslit` | [![tun1](https://user-images.githubusercontent.com/32848391/96375030-e0c8c800-1176-11eb-8fde-83a65de41330.gif)](https://github.com/marcomusy/vedo/blob/master/examples/simulations/tunnelling1.py)
`tunnelling1` | [![image](https://user-images.githubusercontent.com/32848391/96374887-dc4fdf80-1175-11eb-860a-e719558e7ed7.png)](https://github.com/marcomusy/vedo/blob/master/examples/advanced/thinplate_morphing_2d.py)
`morphing_2d` |
| [![rabbits](https://user-images.githubusercontent.com/32848391/50738808-5816ad00-11d8-11e9-9854-c952be6fb941.jpg)](https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares2D.py)
`least_squares2d`| [![lut](https://user-images.githubusercontent.com/32848391/95255899-5c934e00-0822-11eb-9b07-fc3f31e2b6da.png)](https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_lut.py)
`mesh_lut` | [![psimu](https://user-images.githubusercontent.com/32848391/50738891-db380300-11d8-11e9-84c2-0f55be7228f1.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/particle_simulator.py)
`particle_simulator` | [![gyro](https://user-images.githubusercontent.com/32848391/39766016-85c1c1d6-52e3-11e8-8575-d167b7ce5217.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope1.py)
`gyroscope1` |
| [![customaxes](https://user-images.githubusercontent.com/32848391/90966973-0750e680-e4d9-11ea-8e56-d75a1ad523dd.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/customAxes.py)
`customaxes` | [![intersect](https://user-images.githubusercontent.com/32848391/90437548-de90b180-e0d2-11ea-8e0c-d821db4da8a9.png)](https://github.com/marcomusy/vedo/tree/master/examples/advanced/intersect2d.py)
`intersect2d` | [![goniom](https://user-images.githubusercontent.com/32848391/90437544-dd5f8480-e0d2-11ea-8321-b52d073444c4.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/goniometer.py)
`goniometer` | [![](https://user-images.githubusercontent.com/32848391/82767103-2500a800-9e25-11ea-8506-e583e8ec4b01.jpg)](https://github.com/marcomusy/vedo/tree/master/examples/tetmesh/tet_threshold.py)
`tet_threshold` |
@@ -198,22 +207,14 @@ Run any of the _built-in_ examples from command line by typing:
| [![shadow](https://user-images.githubusercontent.com/32848391/57312574-1d714280-70ee-11e9-8741-04fc5386d692.png)](https://github.com/marcomusy/vedo/tree/master/examples/basic/shadow.py)
`shadow` | [![multiple_pendulum](https://user-images.githubusercontent.com/32848391/50738892-db380300-11d8-11e9-807c-fb320c7b7917.gif)](https://github.com/marcomusy/vedo/tree/master/examples/simulations/multiple_pendulum.py )
`multiple_pend` | [![](https://user-images.githubusercontent.com/32848391/59095175-1ec5a300-8918-11e9-8bc0-fd35c8981e2b.jpg)](https://github.com/marcomusy/vedo/tree/master/examples/volumetric/interpolateVolume.py)
`interpolateVolume` | [![histo_polar](https://user-images.githubusercontent.com/32848391/64912717-5754f400-d733-11e9-8a1f-612165955f23.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_polar.py)
`histo_polar` |
| [![streamplot](https://user-images.githubusercontent.com/32848391/73614123-93162a80-45fc-11ea-969b-9a3293b26f35.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot7_stream.py)
`plot7_stream` | [![violin](https://user-images.githubusercontent.com/32848391/73481240-b55d3d80-439b-11ea-89a4-6c35ecc84b0d.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_violin.py)
`histo_violin` | [![plot3_pip](https://user-images.githubusercontent.com/32848391/73393632-4ff64780-42dc-11ea-8798-45a81c067f45.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot3_pip.py)
`plot3_pip` | [![histo_spheric](https://user-images.githubusercontent.com/32848391/73392901-fccfc500-42da-11ea-828a-9bad6982a823.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_spheric.py)
`histo_spheric` |
| [![readvts](https://user-images.githubusercontent.com/32848391/80862655-04568f80-8c77-11ea-8249-5b61283e04ce.png)](https://github.com/marcomusy/vedo/tree/master/examples/volumetric/read_vts.py)
`read_vts` | [![donutPlot](https://user-images.githubusercontent.com/32848391/64998178-6f6b7580-d8e3-11e9-9bd8-8dfb9ccd90e4.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/donut.py)
`donut` | [![extrude](https://user-images.githubusercontent.com/32848391/65963682-971e1a00-e45b-11e9-9f29-05522ae4a800.png)](https://github.com/marcomusy/vedo/tree/master/examples/basic/extrude.py)
`extrude` | [![plotxy](https://user-images.githubusercontent.com/32848391/96375341-cb549d80-1178-11eb-868f-3e7d55d989ff.png)](https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot1_errbars.py)
`plot1_errbars` |
-| [![isohead](https://user-images.githubusercontent.com/32848391/56972083-a7f3f800-6b6a-11e9-9cb3-1047b69dcad2.gif)](https://github.com/marcomusy/vedo/tree/master/examples) | [![viz_raycast](https://user-images.githubusercontent.com/32848391/58336919-f7b1a080-7e44-11e9-9106-f574371093a8.gif)](https://github.com/marcomusy/vedo/tree/master/examples) | [![viz_slicer](https://user-images.githubusercontent.com/32848391/80866479-3bd13600-8c8f-11ea-83c7-5f5b4fccb29d.png)](https://github.com/marcomusy/vedo/tree/master/examples/) | [![lego](https://user-images.githubusercontent.com/32848391/59788744-aaeaa980-92cc-11e9-825d-58da26ca21ff.gif)](https://github.com/marcomusy/vedo/tree/master/examples/) |
-| [![elastodyn](https://user-images.githubusercontent.com/32848391/54932788-bd4a8680-4f1b-11e9-9326-33645171a45e.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elastodynamics.py)
`elastodynamics` | [![heatconv](https://user-images.githubusercontent.com/32848391/57455107-b200af80-726a-11e9-897d-9c7bcb9854ac.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/heatconv.py)
`heatconv` | [![stokes](https://user-images.githubusercontent.com/32848391/73683666-f36f9f80-46c2-11ea-9dca-2b559d2f458d.png)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py)
`stokes` | [![lshape](https://user-images.githubusercontent.com/32848391/56671156-6bc91f00-66b4-11e9-8c58-e6b71e2ad1d0.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes_lshape.py)
`stokes_lshape`|
+| [![isohead](https://user-images.githubusercontent.com/32848391/56972083-a7f3f800-6b6a-11e9-9cb3-1047b69dcad2.gif)](https://github.com/marcomusy/vedo/tree/master/examples/volumetric/app_isobrowser.py)
`app_isobrowser` | [![viz_raycast](https://user-images.githubusercontent.com/32848391/58336107-5a09a180-7e43-11e9-8c4e-b50e4e95ae71.gif)](https://github.com/marcomusy/vedo/tree/master/examplesvolumetric/app_raycaster.py)
`app_raycaster` | [![viz_slicer](https://user-images.githubusercontent.com/32848391/80866479-3bd13600-8c8f-11ea-83c7-5f5b4fccb29d.png)](https://github.com/marcomusy/vedo/tree/master/examples/) | [![lego](https://user-images.githubusercontent.com/32848391/59788744-aaeaa980-92cc-11e9-825d-58da26ca21ff.gif)](https://github.com/marcomusy/vedo/tree/master/examples/) |
+| [![elastodyn](https://user-images.githubusercontent.com/32848391/54932788-bd4a8680-4f1b-11e9-9326-33645171a45e.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elastodynamics.py)
`elastodynamics` | [![heatconv](https://user-images.githubusercontent.com/32848391/57455107-b200af80-726a-11e9-897d-9c7bcb9854ac.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/heatconv.py)
`heatconv` | [![stokes](https://user-images.githubusercontent.com/32848391/73683666-f36f9f80-46c2-11ea-9dca-2b559d2f458d.png)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py)
`stokes` | [![lshape](https://user-images.githubusercontent.com/32848391/56671156-6bc91f00-66b4-11e9-8c58-e6b71e2ad1d0.gif)](https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes_lshape.py)
`stokes_lshape`|
## ๐ References
-**Presentations at interantional conferences:**
-
-- M. Musy, G. Dalmasso, J. Sharpe and N. Sime, "`vedo`*: plotting in FEniCS with python*", ([link](https://github.com/marcomusy/vedo/blob/master/docs/fenics_poster.pdf)).
-Poster at the [FEniCS'2019](https://fenicsproject.org/fenics19/) Conference,
-Carnegie Institution for Science Department of Terrestrial Magnetism, Washington DC, June 2019.
-- G. Dalmasso, *"Evolution in space and time of 3D volumetric images"*. Talk at the Conference for [Image-based Modeling and Simulation of Morphogenesis](https://www.pks.mpg.de/imsm19/).
-Max Planck Institute for the Physics of Complex Systems, Dresden, Germany, March 2019.
-
**Scientific publications leveraging `vedo` (formerly known as `vtkplotter`):**
- X. Diego *et al.*:
@@ -226,6 +227,17 @@ Development, 5 April 2018, [doi: 10.1242/dev.154856](http://dev.biologists.org/c
- F. Claudi, A. L. Tyson, T. Branco, *"Brainrender. A python based software for visualisation of neuroanatomical and morphological data."*
bioRxiv 2020.02.23.961748; doi: https://doi.org/10.1101/2020.02.23.961748
+
+**Presentations at international conferences:**
+
+- M. Musy, G. Dalmasso, J. Sharpe and N. Sime, "`vedo`*: plotting in FEniCS with python*",
+[Poster](https://github.com/marcomusy/vedo/blob/master/docs/fenics_poster.pdf) at the [FEniCS'2019](https://fenicsproject.org/fenics19/) Conference,
+SDTM, Washington DC, June 2019.
+- G. Dalmasso, *"Evolution in space and time of 3D volumetric images"*. Talk at [Image-based Modeling and Simulation of Morphogenesis](https://www.pks.mpg.de/imsm19/).
+Max Planck Institute for the Physics of Complex Systems, Dresden, Germany, March 2019.
+- G. Dalmasso, *"A four-dimensional growing mouse limb bud reconstruction"*. Talk at [SEBD](https://sebd.es/meeting-sebd-2020), Spain, November 2020.
+
+
**Have you found this software useful for your research? Star โจ the project and cite it as:**
M. Musy et al., "vedo
, a python module for scientific visualization and analysis of 3D objects
diff --git a/examples/advanced/cutWithMesh.py b/examples/advanced/cutWithMesh1.py
similarity index 100%
rename from examples/advanced/cutWithMesh.py
rename to examples/advanced/cutWithMesh1.py
diff --git a/examples/advanced/cutWithMesh2.py b/examples/advanced/cutWithMesh2.py
new file mode 100644
index 00000000..c3108f0c
--- /dev/null
+++ b/examples/advanced/cutWithMesh2.py
@@ -0,0 +1,21 @@
+"""Cut a cube with a surface
+to create a 'capping' mesh"""
+from vedo import *
+import numpy as np
+
+
+# Equation of the "gyroid" (https://en.wikipedia.org/wiki/Gyroid)
+x, y, z = np.mgrid[:30,:30,:30] * 0.4
+U = sin(x)*cos(y) + sin(y)*cos(z) + sin(z)*cos(x)
+
+# Create a Volume, take the isosurface at 0, smooth it and set mesh edges
+s = Volume(U).isosurface(0).smoothLaplacian().lineWidth(1)
+
+# Create a gridded cube
+c = CubicGrid(n=(29,29,29), spacing=(1,1,1)).alpha(1)
+
+s.cutWithMesh(c).color('silver') # take what's inside of cube
+c.cutWithMesh(s).color('grey') # take what's inside of isosurface
+
+# Show all the created objects
+show(s, c, __doc__, bg='darkseagreen', bg2='lightblue', axes=5)
diff --git a/examples/advanced/multi_viewer.py b/examples/advanced/multi_viewer.py
index 19d74f01..6842fdf0 100644
--- a/examples/advanced/multi_viewer.py
+++ b/examples/advanced/multi_viewer.py
@@ -40,7 +40,7 @@ def onLeftClick(mesh):
pos='bottom-left', c=ishape.color(), bg='k', font='Calco')
instt = Text2D(instr, pos='bottom-right', c='dg', bg='g', font='Quikhand')
- axes = addons.buildAxes(ishape, yzGrid=False)
+ axes = ishape.buildAxes(yzGrid=False)
acts = [ishape, axes, sname, sprop, instt]
plt1.backgroundColor('silver')
diff --git a/examples/advanced/splitmesh.py b/examples/advanced/splitmesh.py
index c4e4cdbc..e8589ac6 100644
--- a/examples/advanced/splitmesh.py
+++ b/examples/advanced/splitmesh.py
@@ -1,11 +1,11 @@
"""Split a mesh by connectivity and
-order the pieces by increasing area.
+order the pieces by increasing area
"""
from vedo import *
-em = load(datadir+"embryo.tif").isosurface(80)
+em = Volume(datadir+"embryo.tif").isosurface(80)
# return the list of the largest 10 connected meshes:
splitem = em.splitByConnectivity(maxdepth=40)[0:9]
-show( [(em, __doc__), splitem], N=2, axes=1 )
+show(splitem, __doc__, axes=1, viewup='z')
diff --git a/examples/basic/lights.py b/examples/basic/lights.py
index c4da34ea..3563152d 100644
--- a/examples/basic/lights.py
+++ b/examples/basic/lights.py
@@ -1,16 +1,28 @@
-from vedo import Plotter, Plane, datadir
+"""Set custom lights to a 3D scene"""
+from vedo import Plotter, load, datadir, Point, Light, show
-vp = Plotter()
+man = load(datadir+'man.vtk').c('white').lighting('glossy')
-cow = vp.load(datadir+"cow.vtk").c("grey").scale(4).rotateX(-90)
-vp += Plane(pos=[0, -3.6, 0], normal=[0, 1, 0], sx=20).texture("grass")
-vp.show(viewup='y', interactive=0)
+p1 = Point([1,0,1], c='y')
+p2 = Point([0,0,2], c='r')
+p3 = Point([-1,-0.5,-1], c='b')
+p4 = Point([0,1,0], c='k')
-# vp.light() returns a vtkLight object with focal Point, fp, to mesh cow
-# fp can also be explicitly set as fp=[x,y,z]
-l = vp.addLight(pos=[-6, 6, 6], focalPoint=cow, deg=12, showsource=1)
+# Add light sources at the given positions
+l1 = Light(p1, c='y') # p1 can simply be [1,0,1]
+l2 = Light(p2, c='r')
+l3 = Light(p3, c='b')
+l4 = Light(p4, c='w', intensity=0.5)
-# can be switched on/off this way
-#l.SwitchOff()
+show(man, l1, l2, l3, l4, p1, p2, p3, p4,
+ __doc__, axes=1, viewup='z')
-vp.show(interactive=1)
+
+
+#####################################################
+##### Equivalent code using a Plotter instance: #####
+#####################################################
+# plt = Plotter(axes=1)
+# plt += [man, p1, p2, p3, p4, l1, l2, l3, l4]
+# plt.show(viewup='z')
+#####################################################
diff --git a/examples/basic/specular.py b/examples/basic/specular.py
index f4e5a042..9f8d41c1 100644
--- a/examples/basic/specular.py
+++ b/examples/basic/specular.py
@@ -3,7 +3,7 @@
specular, specularPower, specularColor.
"""
#https://lorensen.github.io/VTKExamples/site/Python/Rendering/SpecularSpheres
-from vedo import Plotter, Arrow, datadir
+from vedo import Plotter, Arrow, Light, datadir
vp = Plotter(axes=1)
@@ -30,6 +30,5 @@
print('Adding a light source..')
p = (3, 1.5, 3)
f = (3, 1.5, 0)
-vp.addLight(pos=p, focalPoint=f)
-vp += Arrow(p,f, s=0.01, c='gray', alpha=0.2)
+vp += [Arrow(p,f, s=0.01, c='gray', alpha=0.2), Light(pos=p, focalPoint=f)]
vp.show()
diff --git a/examples/notebooks/notebooks_index.ipynb b/examples/notebooks/notebooks_index.ipynb
index b543a7ee..5592005b 100644
--- a/examples/notebooks/notebooks_index.ipynb
+++ b/examples/notebooks/notebooks_index.ipynb
@@ -21,7 +21,6 @@
"- advanced/gray_scott.ipynb\n",
"- advanced/sierpinski.ipynb\n",
"- advanced/thinplate_grid.ipynb\n",
- "- advanced/value-iteration.ipynb\n",
"- advanced/volterra.ipynb\n",
"- basic/align1.ipynb\n",
"- basic/align2.ipynb\n",
@@ -31,9 +30,7 @@
"- basic/distance2mesh.ipynb\n",
"- basic/manipulate_camera.ipynb\n",
"- basic/mirror.ipynb\n",
- "- basic/noname.ipynb\n",
"- basic/pca.ipynb\n",
- "- basic/shadow.ipynb\n",
"- basic/shrink.ipynb\n",
"- basic/sphere.ipynb\n",
"- dolfin/demo_cahn-hilliard.ipynb\n",
@@ -92,13 +89,6 @@
"Markdown(l1)"
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- },
{
"cell_type": "code",
"execution_count": null,
diff --git a/examples/other/makeVideo.py b/examples/other/makeVideo.py
index 4c06719a..68c3b86a 100644
--- a/examples/other/makeVideo.py
+++ b/examples/other/makeVideo.py
@@ -1,12 +1,12 @@
"""
Make a video (needs ffmpeg or opencv)
Set offscreen=True to only produce the video
- without any graphical window showing
+ without any graphic window showing
"""
print(__doc__)
from vedo import *
-# settings.screeshotScale = 2 # to get higher resolution
+# settings.screeshotScale = 2 # to get higher resolution
# declare the class instance
vp = Plotter(bg='beige', axes=10, offscreen=True)
@@ -26,6 +26,6 @@
#Options are: elevation_range=(0,80),
# azimuth_range=(0,359),
# zoom=None,
-# cam1=None, cam2=None # initial and final camera positions
+# cam1=None, cam2=None # initial and final camera positions
-video.close() # merge all the recorded frames
+video.close() # merge all the recorded frames
diff --git a/examples/other/nevergrad_opt.py b/examples/other/nevergrad_opt.py
index 8f6aa53c..61ac3743 100644
--- a/examples/other/nevergrad_opt.py
+++ b/examples/other/nevergrad_opt.py
@@ -30,7 +30,7 @@ def callbk(optimizer, v, value):
res = optimizer.minimize(func) # best value
printc('Minimum at:', res.value)
-ln = Line(pts, lw=3)
+ln = Line(pts, lw=3, c='r')
fu = plot(f, xlim=[-3,4], ylim=[-3,4], alpha=0.5)
show(fu, ln, __doc__)
diff --git a/examples/pyplot/plot_density4d.py b/examples/pyplot/plot_density4d.py
new file mode 100644
index 00000000..784bcf8d
--- /dev/null
+++ b/examples/pyplot/plot_density4d.py
@@ -0,0 +1,35 @@
+# Plot a volume evolution in time
+# Credits: https://github.com/edmontz
+import numpy as np
+from scipy.fftpack import fftn, fftshift
+from vedo import Volume, ProgressBar, show, interactive
+
+def f(x, y, z, t):
+ r = np.sqrt(x*x + y*y + z*z + 2*t*t) + 0.1
+ return np.sin(9*np.pi * r)/r
+
+n = 64
+qn = 50
+vol = np.zeros((n, n, n))
+n1 = int(n/2)
+
+pb = ProgressBar(0, qn, c="r")
+for q in pb.range():
+ pb.print()
+
+ t = 2 * q / qn - 1
+ for k in range(n1):
+ z = 2 * k / n1 - 1
+ for j in range(n1):
+ y = 2 * j / n1 - 1
+ for i in range(n1):
+ x = 2 * i / n1 - 1
+ vol[i, j, k] = f(x, y, z, t)
+ volf = fftn(vol)
+ volf = fftshift(abs(volf))
+ volf = np.log(12*volf/volf.max()+ 1) / 2.5
+
+ vb = Volume(volf).mode(1).c("rainbow").alpha([0, 0.8, 1])
+ show(vb, bg="black", axes=1, viewup='z', interactive=False)
+
+interactive()
\ No newline at end of file
diff --git a/examples/pyplot/scatter3.py b/examples/pyplot/scatter3.py
index 07ad8a0f..1d1cd656 100644
--- a/examples/pyplot/scatter3.py
+++ b/examples/pyplot/scatter3.py
@@ -3,30 +3,28 @@
from vedo import *
from numpy.random import randn
-
-### first scatter plot in blue
+### first cloud in blue, place it at z=0:
x = randn(2000) * 3
y = randn(2000) * 2
-
-# scatter cloud, place it at z=0:
pts1 = Points([x,y], c="blue", alpha=0.5).z(0.0)
+bra1 = Brace([-7,-7], [7,-7], thickness=0.75,
+ comment='whole population', s=0.5, c='b')
-
-### second scatter plot in red
+### second cloud in red
x = randn(1200) + 4
y = randn(1200) + 2
pts2 = Points([x,y], c="red", alpha=0.5).z(0.1)
+bra2 = Brace([8,2], [6,5], comment='red zone', c='r').z(0.3)
-
-### third scatter plot with marker in black
+### third cloud with a black marker
x = randn(20) + 4
y = randn(20) - 4
-mark = Marker('*', s=0.2, filled=True)
+mark = Marker('*', s=0.25)
pts3 = Glyph([x,y], mark, c='k').z(0.2)
+bra3 = Brace([8,-6], [8,-2], comment='my stars').z(0.3)
+# some text message
+msg = Text("preliminary\nresults!", font='Quikhand', s=1.5)
+msg.c('black').rotateZ(20).pos(-10,3,.2)
-label = Text("preliminary\nresults!", font='Quikhand', s=1.5, pos=(-8,4,.2))
-label.c('black').rotateZ(20)
-
-show(pts1, pts2, pts3, label, __doc__,
- title='A simple scatter plot', axes=1, viewup='2d')
+show(pts1, pts2, pts3, msg, bra1, bra2, bra3, __doc__, axes=1, zoom=1.2)
diff --git a/examples/pyplot/whiskers.py b/examples/pyplot/whiskers.py
index ec144c5c..12fb672a 100644
--- a/examples/pyplot/whiskers.py
+++ b/examples/pyplot/whiskers.py
@@ -1,31 +1,42 @@
"""Whisker plot with quantiles indication
(horizontal line shows the mean value)"""
+from vedo import Axes, Brace, Line, Ribbon, show
from vedo.pyplot import whisker
-from vedo import show, buildAxes
import numpy as np
# create 5 whisker bars with some random data
ws = []
for i in range(5):
- xval = i*2
- data = np.random.randn(25) + i/2
+ xval = i*2 # position along x axis
+ data = xval/4 + np.random.randn(25)
w = whisker(data, bc=i, s=0.5).x(xval)
ws.append(w)
+ # print(i, 'whisker:\n', w.info)
+
+# build some theoretical expectation to be shown as a grey band
+x = np.linspace(-1, 9, 100)
+y = x/5 + 0.2*np.sin(x)
+ye= y**2/5 + 0.1 # error on y
+line = Line(np.c_[x, y])
+band = Ribbon(np.c_[x, y-ye], np.c_[x, y+ye]).c('black').alpha(0.1)
+
+# build braces to inndicate stats significance and dosage
+bra1 = Brace([0, 3],[2, 3], comment='*~*', s=0.7, style='[')
+bra2 = Brace([4,-1],[8,-1], comment='dose > 3~\mug/kg', s=0.7)
# build custom axes
-ax = buildAxes(xrange=[-1,9],
- yrange=[-3,5],
- htitle='\beta_c -expression: change in time',
- xtitle=' ',
- ytitle='Level of \beta_c protein in \muM/l',
- xValuesAndLabels=[(0,'experiment^A\nat t=1h'),
- (4,'experiment^B\nat t=2h'),
- (8,'experiment^C\nat t=4h'),
- ],
- xLabelSize=0.02,
- )
+axes = Axes(xrange=[-1,9],
+ yrange=[-3,5],
+ htitle='\beta_c -expression: change in time',
+ xtitle=' ',
+ ytitle='Level of \beta_c protein in \muM/l',
+ xValuesAndLabels=[(0,'Experiment^A\nat t=1h'),
+ (4,'Experiment^B\nat t=2h'),
+ (8,'Experiment^C\nat t=4h'),
+ ],
+ xLabelSize=0.02,
+ )
-show(ws, ax, __doc__)
-# print('whisker0:', ws[0].info)
+show(ws, bra1, bra2, line, band, __doc__, axes, zoom=1.1)
diff --git a/examples/simulations/hanoi3d.py b/examples/simulations/hanoi3d.py
index 15e3bff2..bf54e87f 100644
--- a/examples/simulations/hanoi3d.py
+++ b/examples/simulations/hanoi3d.py
@@ -1,19 +1,15 @@
-"""
-Demo to show how to solve the Tower of Hanoi
-"""
-from __future__ import division, print_function
-from vedo import Plotter, makePalette, Cylinder, Box, ProgressBar, printc
+"""Demo to show how to solve the Tower of Hanoi"""
+
+from vedo import Plotter, Cylinder, Box, ProgressBar
+from copy import deepcopy
class Hanoi:
"""
Class to solve the Hanoi problem. It is taken from Geert Jan Bex's website:
-
https://github.com/gjbex/training-material/blob/master/Misc/Notebooks/hanoi.ipynb
-
- with Creative Commons Zero v1.0 Universal licence
+ Creative Commons Zero v1.0 Universal licence
"""
-
def __init__(self, nr_disks):
self._nr_disks = nr_disks
self._towers = [list(range(nr_disks, 0, -1)), list(), list()]
@@ -24,12 +20,10 @@ def nr_disks(self):
@property
def nr_moves(self):
- return 2 ** self.nr_disks - 1
+ return 2**self.nr_disks - 1
@property
def towers(self):
- from copy import deepcopy
-
return deepcopy(self._towers)
def tower(self, n):
@@ -49,63 +43,33 @@ def move_disks(self, n, from_tower, to_tower):
yield self.move_disk(from_tower, to_tower)
yield from self.move_disks(n - 1, helper, to_tower)
- def solve(self):
- for move in self.moves():
- print("disk {0} from {1} to {2}".format(*move))
-
def moves(self):
yield from self.move_disks(self.nr_disks, 0, 1)
-def demo3d_hanoi(**kwargs):
- nr_disks = kwargs.get("nr_disks", 5)
- interactive = kwargs.get("interactive", 1)
-
- hanoi = Hanoi(nr_disks)
- tower_states = list([hanoi.towers])
- for _ in hanoi.moves():
- tower_states.append(hanoi.towers)
-
- vp = Plotter(axes=0, interactive=0, bg="w", size=(800, 600))
- vp.camera.SetPosition([18.5, -20.7, 7.93])
- vp.camera.SetFocalPoint([3.0, 0.0, 2.5])
- vp.camera.SetViewUp([-0.1, +0.17, 0.977])
-
- cols = makePalette("red", "blue", hanoi.nr_disks+1, hsv=True)
- disks = {
- hanoi.nr_disks
- -i: Cylinder(pos=[0,0,0], r=0.2 * (hanoi.nr_disks-i+1), c=cols[i])
- for i in range(hanoi.nr_disks)
- }
- for k in disks:
- vp += disks[k]
- vp += Box(pos=(3.0, 0, -.5), length=12.0, width=4.0, height=0.1)
- vp.show(zoom=1.2)
-
- printc("\n Press q to continue, Esc to exit. ", c="y", invert=1)
- pb = ProgressBar(0, len(tower_states), 1, c="b", ETA=False)
- for t in pb.range():
- pb.print()
- state = tower_states[t]
- for tower_nr in range(3):
- for i, disk in enumerate(state[tower_nr]):
- disks[disk].pos([3 * tower_nr, 0, i + 0.5])
- vp.show(resetcam=0, interactive=interactive, rate=10)
- vp.show(resetcam=0, interactive=1)
-
-
-if __name__ == "__main__":
-
- import argparse
-
- parser = argparse.ArgumentParser(description="Solve the Tower of Hanoi.")
- pa = parser.add_argument
- pa("-n", "--nr_disks", type=int, default=5, help="Number of disks")
- pa("-i", "--interactive", action="store_true",
- help="Request user to press keyboard to display next step",
- )
- args = parser.parse_args()
- demo3d_hanoi(
- nr_disks=args.nr_disks,
- interactive=args.interactive,
- )
+nr_disks=5
+hanoi = Hanoi(nr_disks)
+
+tower_states = list([hanoi.towers])
+for _ in hanoi.moves():
+ tower_states.append(hanoi.towers)
+disks = { hanoi.nr_disks - i : Cylinder(r=0.2*(hanoi.nr_disks-i+1), c=i)
+ for i in range(hanoi.nr_disks) }
+
+vp = Plotter(interactive=0, size=(800, 600), bg='wheat', bg2='lb')
+vp.camera.SetPosition( [14.57, -14.772, 6.132] )
+vp.camera.SetFocalPoint( [3.0, 0.6, 2.0] )
+vp.camera.SetViewUp( [-0.098, 0.167, 0.981] )
+vp += disks.values()
+vp += Box(pos=(3,0,-0.5), size=(12,4,0.1))
+
+pb = ProgressBar(0, len(tower_states), 1, c="y")
+for t in pb.range():
+ pb.print()
+ state = tower_states[t]
+ for tower_nr in range(3):
+ for i, disk in enumerate(state[tower_nr]):
+ disks[disk].pos([3 * tower_nr, 0, i+0.5])
+ vp.show(resetcam=0, rate=10)
+vp.show(interactive=1)
+
diff --git a/examples/volumetric/app_isobrowser.py b/examples/volumetric/app_isobrowser.py
new file mode 100644
index 00000000..fb23985e
--- /dev/null
+++ b/examples/volumetric/app_isobrowser.py
@@ -0,0 +1,8 @@
+from vedo import datadir, Volume
+from vedo.applications import IsosurfaceBrowser
+
+vol = Volume(datadir+'head.vti')
+
+plt = IsosurfaceBrowser(vol, c='gold') # Plotter instance
+
+plt.show(axes=7, bg2='lb')
diff --git a/examples/volumetric/app_raycaster.py b/examples/volumetric/app_raycaster.py
new file mode 100644
index 00000000..fae195dc
--- /dev/null
+++ b/examples/volumetric/app_raycaster.py
@@ -0,0 +1,6 @@
+from vedo import load, datadir
+from vedo.applications import RayCaster
+embryo = load(datadir+"embryo.slc") # vtkVolume
+embryo.mode(1).c('jet') # change properties
+plt = RayCaster(embryo) # Plotter instance
+plt.show(viewup="z", bg='black', bg2='blackboard', axes=7)
diff --git a/requirements.txt b/requirements.txt
index 6b8ee7e7..6613519c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-vtk<9.0.0
+vtk
diff --git a/vedo/__init__.py b/vedo/__init__.py
index ea11f369..948cffc4 100644
--- a/vedo/__init__.py
+++ b/vedo/__init__.py
@@ -45,7 +45,7 @@
from vedo.colors import *
import vedo.settings as settings
import vedo.addons as addons
-from vedo.addons import Ruler, Goniometer, buildRulerAxes, buildAxes
+from vedo.addons import Ruler, Goniometer, buildRulerAxes, buildAxes, Axes, Light
from vedo.settings import datadir, embedWindow
# hack: need to uncomment this to generate documentation html
diff --git a/vedo/addons.py b/vedo/addons.py
index f3b0be82..5f119285 100644
--- a/vedo/addons.py
+++ b/vedo/addons.py
@@ -22,7 +22,6 @@
)
__all__ = [
- "addLight",
"addScalarBar",
"addScalarBar3D",
"addSlider2D",
@@ -31,10 +30,12 @@
"addCutterTool",
"addIcon",
"addLegend",
+ "Light",
+ "Axes",
"buildAxes",
+ "Ruler",
"buildRulerAxes",
"Goniometer",
- "Ruler",
]
@@ -316,47 +317,53 @@ def switch(self):
#####################################################################
-def addLight(
- pos,
- focalPoint=(0, 0, 0),
- deg=180,
- c='white',
- intensity=0.4,
- removeOthers=False,
- showsource=False,
-):
+def Light(
+ pos,
+ focalPoint=(0, 0, 0),
+ angle=180,
+ c='white',
+ intensity=1,
+ removeOthers=False,
+ ):
"""
Generate a source of light placed at pos, directed to focal point.
Returns a ``vtkLight`` object.
- :param focalPoint: focal point, if this is a ``vtkActor`` use its position.
- :type fp: vtkActor, list
- :param deg: aperture angle of the light source
- :param c: set light color
- :param float intensity: intensity between 0 and 1.
+ :param focalPoint: focal point, if this is a vedo object use its position.
+ :param angle: aperture angle of the light source
+ :param c: set the light color
+ :param float intensity: intensity value between 0 and 1.
:param bool removeOthers: remove all other lights in the scene
- :param bool showsource: if `True`, will show a representation
- of the source of light as an extra Mesh
+ (in this case a Plotter object must already exist)
.. hint:: |lights.py|_
"""
- if isinstance(focalPoint, vtk.vtkActor):
- focalPoint = focalPoint.GetPosition()
+ if isinstance(pos, vedo.Base3DProp):
+ pos = pos.pos()
+ if isinstance(focalPoint, vedo.Base3DProp):
+ focalPoint = focalPoint.pos()
light = vtk.vtkLight()
light.SetLightTypeToSceneLight()
light.SetPosition(pos)
- light.SetPositional(True)
- light.SetConeAngle(deg)
+ light.SetConeAngle(angle)
light.SetFocalPoint(focalPoint)
light.SetIntensity(intensity)
light.SetColor(getColor(c))
- if showsource:
- lightActor = vtk.vtkLightActor()
- lightActor.SetLight(light)
- settings.plotter_instance.renderer.AddViewProp(lightActor)
+
+ # light.SetPositional(1) ##??
+ # if ambientColor is not None: # doesnt work anyway
+ # light.SetAmbientColor(getColor(ambientColor))
+ # if diffuseColor is not None:
+ # light.SetDiffuseColor(getColor(diffuseColor))
+ # if specularColor is not None:
+ # light.SetSpecularColor(getColor(specularColor))
+
if removeOthers:
- settings.plotter_instance.renderer.RemoveAllLights()
- settings.plotter_instance.renderer.AddLight(light)
+ if settings.plotter_instance and settings.plotter_instance.renderer:
+ settings.plotter_instance.renderer.RemoveAllLights()
+ else:
+ printc("Warning in Light(removeOthers=True): scene does not exist.", c='r')
+
return light
@@ -364,9 +371,9 @@ def addLight(
def addScalarBar(obj,
pos=(0.8,0.05),
title="",
- titleXOffset=0,
titleYOffset=15,
titleFontSize=12,
+ size=(None,None),
nlabels=None,
c=None,
horizontal=False,
@@ -374,6 +381,12 @@ def addScalarBar(obj,
):
"""Add a 2D scalar bar for the specified obj.
+ :param list pos: fractional x and y position in the 2D window
+ :param list size: size of the scalarbar in pixel units (width, heigth)
+ :param int nlabels: number of numeric labels to be shown
+ :param bool useAlpha: retain trasparency in scalarbar
+ :param bool horizontal: show in horizontal layout
+
.. hint:: |mesh_coloring| |mesh_coloring.py|_ |scalarbars.py|_
"""
plt = settings.plotter_instance
@@ -463,6 +476,9 @@ def addScalarBar(obj,
sb.SetMaximumWidthInPixels(60)
sb.SetMaximumHeightInPixels(250)
+ if size[0] is not None: sb.SetMaximumWidthInPixels(size[0])
+ if size[1] is not None: sb.SetMaximumHeightInPixels(size[1])
+
if nlabels is not None:
sb.SetNumberOfLabels(nlabels)
@@ -1182,62 +1198,68 @@ def buildRulerAxes(
#####################################################################
-def buildAxes(obj=None,
- xtitle=None, ytitle=None, ztitle=None,
- xrange=None, yrange=None, zrange=None,
- c=None,
- numberOfDivisions=None,
- digits=None,
- limitRatio=0.04,
- axesLineWidth=1,
- gridLineWidth=1,
- reorientShortTitle=True,
- htitle="",
- hTitleSize=0.03,
- hTitleFont=None,
- hTitleItalic=True,
- hTitleColor=None,
- hTitleJustify='bottom-center',
- hTitleHorizontalOffset=0,
- hTitleVerticalOffset=0.01,
- hTitleZOffset=0,
- titleDepth=0,
- titleFont="", # grab settings.defaultFont
- textScale=1.0,
- xTitlePosition=0.95, yTitlePosition=0.95, zTitlePosition=0.95,
- xTitleOffset=0.02, yTitleOffset=0.025, zTitleOffset=0.02,
- xTitleJustify="top-right", yTitleJustify="bottom-right", zTitleJustify="bottom-right",
- xTitleRotation=0, yTitleRotation=0, zTitleRotation=0,
- xTitleBox=False, yTitleBox=False,
- xTitleSize=0.025, yTitleSize=0.025, zTitleSize=0.025,
- xTitleColor=None, yTitleColor=None, zTitleColor=None,
- xTitleBackfaceColor=None, yTitleBackfaceColor=None, zTitleBackfaceColor=None,
- xTitleItalic=0, yTitleItalic=0, zTitleItalic=0,
- xyGrid=True, yzGrid=True, zxGrid=False,
- xyGrid2=False, yzGrid2=False, zxGrid2=False,
- xyGridTransparent=False, yzGridTransparent=False, zxGridTransparent=False,
- xyGrid2Transparent=False, yzGrid2Transparent=False, zxGrid2Transparent=False,
- xyPlaneColor=None, yzPlaneColor=None, zxPlaneColor=None,
- xyGridColor=None, yzGridColor=None, zxGridColor=None,
- xyAlpha=0.05, yzAlpha=0.05, zxAlpha=0.05,
- xyFrameLine=None, yzFrameLine=None, zxFrameLine=None,
- xLineColor=None, yLineColor=None, zLineColor=None,
- xHighlightZero=False, yHighlightZero=False, zHighlightZero=False,
- xHighlightZeroColor='r', yHighlightZeroColor='g', zHighlightZeroColor='b',
- showTicks=True,
- xTickLength=0.015, yTickLength=0.015, zTickLength=0.015,
- xTickThickness=0.0025, yTickThickness=0.0025, zTickThickness=0.0025,
- xMinorTicks=1, yMinorTicks=1, zMinorTicks=1,
- tipSize=None,
- labelFont="", # grab settings.defaultFont
- xLabelColor=None, yLabelColor=None, zLabelColor=None,
- xLabelSize=0.016, yLabelSize=0.016, zLabelSize=0.016,
- xLabelOffset=0.015, yLabelOffset=0.015, zLabelOffset=0.010,
- xLabelRotation=0, yLabelRotation=None, zLabelRotation=None,
- xFlipText=False, yFlipText=False, zFlipText=False,
- xValuesAndLabels=None, yValuesAndLabels=None, zValuesAndLabels=None,
- useGlobal=False,
- tol=0.0001,
+def buildAxes(*args, **kwargs):
+ """Deprecated. Use Axes() instead."""
+ printc("WARNING: deprecated buildAxes(), use Axes() instead.", c='r')
+ return Axes(*args, **kwargs)
+
+def Axes(
+ obj=None,
+ xtitle=None, ytitle=None, ztitle=None,
+ xrange=None, yrange=None, zrange=None,
+ c=None,
+ numberOfDivisions=None,
+ digits=None,
+ limitRatio=0.04,
+ axesLineWidth=1,
+ gridLineWidth=1,
+ reorientShortTitle=True,
+ htitle="",
+ hTitleSize=0.03,
+ hTitleFont=None,
+ hTitleItalic=True,
+ hTitleColor=None,
+ hTitleJustify='bottom-center',
+ hTitleHorizontalOffset=0,
+ hTitleVerticalOffset=0.01,
+ hTitleZOffset=0,
+ titleDepth=0,
+ titleFont="", # grab settings.defaultFont
+ textScale=1.0,
+ xTitlePosition=0.95, yTitlePosition=0.95, zTitlePosition=0.95,
+ xTitleOffset=0.02, yTitleOffset=0.025, zTitleOffset=0.02,
+ xTitleJustify="top-right", yTitleJustify="bottom-right", zTitleJustify="bottom-right",
+ xTitleRotation=0, yTitleRotation=0, zTitleRotation=0,
+ xTitleBox=False, yTitleBox=False,
+ xTitleSize=0.025, yTitleSize=0.025, zTitleSize=0.025,
+ xTitleColor=None, yTitleColor=None, zTitleColor=None,
+ xTitleBackfaceColor=None, yTitleBackfaceColor=None, zTitleBackfaceColor=None,
+ xTitleItalic=0, yTitleItalic=0, zTitleItalic=0,
+ xyGrid=True, yzGrid=True, zxGrid=False,
+ xyGrid2=False, yzGrid2=False, zxGrid2=False,
+ xyGridTransparent=False, yzGridTransparent=False, zxGridTransparent=False,
+ xyGrid2Transparent=False, yzGrid2Transparent=False, zxGrid2Transparent=False,
+ xyPlaneColor=None, yzPlaneColor=None, zxPlaneColor=None,
+ xyGridColor=None, yzGridColor=None, zxGridColor=None,
+ xyAlpha=0.05, yzAlpha=0.05, zxAlpha=0.05,
+ xyFrameLine=None, yzFrameLine=None, zxFrameLine=None,
+ xLineColor=None, yLineColor=None, zLineColor=None,
+ xHighlightZero=False, yHighlightZero=False, zHighlightZero=False,
+ xHighlightZeroColor='r', yHighlightZeroColor='g', zHighlightZeroColor='b',
+ showTicks=True,
+ xTickLength=0.015, yTickLength=0.015, zTickLength=0.015,
+ xTickThickness=0.0025, yTickThickness=0.0025, zTickThickness=0.0025,
+ xMinorTicks=1, yMinorTicks=1, zMinorTicks=1,
+ tipSize=None,
+ labelFont="", # grab settings.defaultFont
+ xLabelColor=None, yLabelColor=None, zLabelColor=None,
+ xLabelSize=0.016, yLabelSize=0.016, zLabelSize=0.016,
+ xLabelOffset=0.015, yLabelOffset=0.015, zLabelOffset=0.010,
+ xLabelRotation=0, yLabelRotation=None, zLabelRotation=None,
+ xFlipText=False, yFlipText=False, zFlipText=False,
+ xValuesAndLabels=None, yValuesAndLabels=None, zValuesAndLabels=None,
+ useGlobal=False,
+ tol=0.0001,
):
"""
Draw axes for the input object. Returns an ``Assembly`` object.
@@ -1304,13 +1326,17 @@ def buildAxes(obj=None,
from vedo import Box, show
b = Box(pos=(1,2,3), length=8, width=9, height=7).alpha(0)
- bax = buildAxes(b, c='k') # returns Assembly object
- show(b, bax)
+ ax = Axes(b, c='k') # returns Assembly object
+ show(b, ax)
|customAxes| |customAxes.py|_
"""
# ncolls = len(settings.collectable_actors)
+ if '9' in vtk.vtkVersion().GetVTKVersion():
+ # HACK to cope with weird VTK9 behavior
+ gridLineWidth += 1
+
if not titleFont:
titleFont = settings.defaultFont
if not labelFont:
@@ -1343,7 +1369,7 @@ def buildAxes(obj=None,
if zrange is None:
zrange=(0,0)
if xrange is None or yrange is None:
- printc("ERROR in buildAxes(): no mesh given, so must specify ranges.", c='r')
+ printc("ERROR in Axes(): no mesh given, so must specify ranges.", c='r')
raise RuntimeError()
if xrange is not None:
@@ -1987,9 +2013,9 @@ def addGlobalAxes(axtype=None, c=None):
if isinstance(plt.axes, dict):
plt.axes.update({'useGlobal':True})
- asse = buildAxes(None, **plt.axes)
+ asse = Axes(None, **plt.axes)
else:
- asse = buildAxes(None, useGlobal=True)
+ asse = Axes(None, useGlobal=True)
plt.renderer.AddActor(asse)
plt.axes_instances[r] = asse
@@ -2302,7 +2328,8 @@ def addGlobalAxes(axtype=None, c=None):
else:
printc('\bomb Keyword axes type must be in range [0-13].', c='r')
printc('''
- \target Available axes types:
+ Available axes types are:
+
0 = no axes,
1 = draw three customizable gray grid walls
2 = show cartesian axes from (0,0,0)
diff --git a/vedo/applications.py b/vedo/applications.py
index 932cf65f..966d8f72 100644
--- a/vedo/applications.py
+++ b/vedo/applications.py
@@ -433,6 +433,16 @@ def IsosurfaceBrowser(volume, c=None, alpha=1, lego=False, cmap='hot', pos=None)
"""
Generate a ``Plotter`` window for Volume isosurfacing using a slider.
Returns the ``Plotter`` object.
+
+ :Example:
+ .. code-block:: python
+
+ from vedo import datadir, Volume
+ from vedo.applications import IsosurfaceBrowser
+
+ vol = Volume(datadir+'head.vti')
+ plt = IsosurfaceBrowser(vol, c='gold')
+ plt.show(axes=7, bg2='lb')
"""
vp = settings.plotter_instance
if not vp:
diff --git a/vedo/backends.py b/vedo/backends.py
index 336db1a4..6b1a722e 100644
--- a/vedo/backends.py
+++ b/vedo/backends.py
@@ -251,8 +251,6 @@ def getNotebookBackend(actors2show, zoom, viewup):
settings.notebook_plotter += kobj
-
-
####################################################################################
elif settings.notebookBackend == 'panel' and hasattr(vp, 'window') and vp.window:
diff --git a/vedo/base.py b/vedo/base.py
index 7c4dbc1f..397939a6 100644
--- a/vedo/base.py
+++ b/vedo/base.py
@@ -154,8 +154,22 @@ def z(self, position=None):
self._updateShadow()
return self
- def rotate(self, angle, axis=(1, 0, 0), axis_point=(0, 0, 0), rad=False):
- """Rotate around an arbitrary `axis` passing through `axis_point`."""
+ def rotate(self, angle, axis=(1, 0, 0), point=(0, 0, 0), rad=False):
+ """Rotate around an arbitrary `axis` passing through `point`.
+
+ :Example:
+
+ .. code-block:: python
+
+ from vedo import *
+ c1 = Cube()
+ c2 = c1.clone().c('violet').alpha(0.5) # copy of c1
+ v = vector(0.2,1,0)
+ p = vector(1,0,0) # axis passes through this point
+ c2.rotate(90, axis=v, point=p)
+ l = Line(-v+p, v+p).lw(3).c('red')
+ show(c1, l, c2, axes=1)
+ """
if rad:
anglerad = angle
else:
@@ -172,7 +186,7 @@ def rotate(self, angle, axis=(1, 0, 0), axis_point=(0, 0, 0), rad=False):
[2 * (bd + ac), 2 * (cd - ab), aa + dd - bb - cc],
]
)
- rv = np.dot(R, self.GetPosition() - np.array(axis_point)) + axis_point
+ rv = np.dot(R, self.GetPosition() - np.asarray(point)) + point
if rad:
angle *= 180.0 / np.pi
@@ -483,8 +497,8 @@ def buildAxes(self, **kargs):
|customIndividualAxes| |customIndividualAxes.py|_
"""
- from vedo.addons import buildAxes
- a = buildAxes(self, **kargs)
+ from vedo.addons import Axes
+ a = Axes(self, **kargs)
self.axes = a
return a
@@ -1100,9 +1114,9 @@ def mapPointsToCells(self):
def addScalarBar(self,
pos=(0.8,0.05),
title="",
- titleXOffset=0,
titleYOffset=15,
titleFontSize=12,
+ size=(None,None),
nlabels=None,
c=None,
horizontal=False,
@@ -1116,9 +1130,9 @@ def addScalarBar(self,
self.scalarbar = vedo.addons.addScalarBar(self,
pos,
title,
- titleXOffset,
titleYOffset,
titleFontSize,
+ size,
nlabels,
c,
horizontal,
diff --git a/vedo/colors.py b/vedo/colors.py
index bda78577..b9d70062 100644
--- a/vedo/colors.py
+++ b/vedo/colors.py
@@ -1,5 +1,6 @@
from __future__ import division, print_function
import vtk
+from vtk.util.numpy_support import vtk_to_numpy
import numpy as np
import sys, os, time
import vedo.docs as docs
@@ -854,3 +855,27 @@ def ask(*question, **kwarg):
printc(*question, **kwarg)
resp = input()
return resp
+
+def colorPicker(xy, plt=None):
+ """Pick color of specific (x,y) pixel on the screen."""
+ w2if = vtk.vtkWindowToImageFilter()
+ if plt is None:
+ plt = settings.plotter_instance
+ w2if.SetInput(plt.window)
+ w2if.ReadFrontBufferOff()
+ w2if.Update()
+ nx, ny = plt.window.GetSize()
+ varr = w2if.GetOutput().GetPointData().GetScalars()
+ arr = vtk_to_numpy(varr).reshape(ny,nx,3)
+ return arr[int(xy[1]),int(xy[0])]
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vedo/docs.py b/vedo/docs.py
index b184f8ac..a3ec7d9c 100644
--- a/vedo/docs.py
+++ b/vedo/docs.py
@@ -45,6 +45,7 @@ def tips():
msg += "| x toggle mesh visibility |\n"
msg += "| X invoke a cutter widget tool |\n"
msg += "| 1-2 change mesh color |\n"
+ msg += "| 3 change mesh texture |\n"
msg += "| 4 use data array as colors, if present |\n"
msg += "| 5-6 change background color(s) |\n"
msg += "| 09+- (on keypad) or +/- to cycle axes style |\n"
@@ -73,11 +74,11 @@ def tips():
msg = " vedo " + __version__ + " "
colors.printc(msg, invert=1, dim=1, end="")
- try:
- vtkVers = vtk.vtkVersion().GetVTKVersion()
- # vtkVers = vtk.VTK_VERSION_NUMBER
- except AttributeError:
- vtkVers = 'unkonwn'
+ # try:
+ vtkVers = vtk.vtkVersion().GetVTKVersion()
+ # vtkVers = vtk.VTK_VERSION_NUMBER
+ # except AttributeError:
+ # vtkVers = 'unkonwn'
msg = "| vtk " + str(vtkVers)
msg += " | python " + str(sys.version_info[0]) + "." + str(sys.version_info[1])
colors.printc(msg, invert=0, dim=1)
@@ -128,1227 +129,1234 @@ def tips():
_defs = ""
####################################################################################
-_defs = """
-
-.. |tutorial_spline| image:: https://user-images.githubusercontent.com/32848391/35976041-15781de8-0cdf-11e8-997f-aeb725bc33cc.png
- :width: 300 px
-
-.. |tutorial.py| replace:: tutorial.py
-.. _tutorial.py: https://github.com/marcomusy/vedo/tree/master/examples/tutorial.py
-
-
-.. |thinplate_grid.py| replace:: thinplate_grid.py
-.. _thinplate_grid.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_grid.py
-.. |thinplate_grid| image:: https://user-images.githubusercontent.com/32848391/51433540-d188b380-1c4c-11e9-81e7-a1cf4642c54b.png
- :width: 300 px
- :target: thinplate_grid.py_
- :alt: thinplate_grid.py
-
-.. |gyroscope2.py| replace:: gyroscope2.py
-.. _gyroscope2.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope2.py
-.. |gyroscope2| image:: https://user-images.githubusercontent.com/32848391/50738942-687b5780-11d9-11e9-97f0-72bbd63f7d6e.gif
- :width: 300 px
- :target: gyroscope2.py_
- :alt: gyroscope2.py
-
-.. |trail.py| replace:: trail.py
-.. _trail.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/trail.py
-.. |trail| image:: https://user-images.githubusercontent.com/32848391/58370826-4aee2680-7f0b-11e9-91e6-3120770cfede.gif
- :width: 300 px
- :target: trail.py_
- :alt: trail.py
-
-.. |fillholes.py| replace:: fillholes.py
-.. _fillholes.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/fillholes.py
-
-.. |quadratic_morphing.py| replace:: quadratic_morphing.py
-.. _quadratic_morphing.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/quadratic_morphing.py
-.. |quadratic_morphing| image:: https://user-images.githubusercontent.com/32848391/50738890-db380300-11d8-11e9-9cef-4c1276cca334.jpg
- :width: 300 px
- :target: quadratic_morphing.py_
- :alt: quadratic_morphing.py
-
-.. |align1.py| replace:: align1.py
-.. _align1.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align1.py
-.. |align1| image:: https://user-images.githubusercontent.com/32848391/50738875-c196bb80-11d8-11e9-8bdc-b80fd01a928d.jpg
- :width: 300 px
- :target: align1.py_
- :alt: align1.py
-
-.. |align2.py| replace:: align2.py
-.. _align2.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align2.py
-.. |align2| image:: https://user-images.githubusercontent.com/32848391/50738874-c196bb80-11d8-11e9-9587-2177d1680b70.jpg
- :width: 300 px
- :target: align2.py_
- :alt: align2.py
-
-.. |mirror.py| replace:: mirror.py
-.. _mirror.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mirror.py
-.. |mirror| image:: https://user-images.githubusercontent.com/32848391/50738855-bf346180-11d8-11e9-97a0-c9aaae6ce052.jpg
- :target: mirror.py_
- :alt: mirror.py
-
-.. |shrink.py| replace:: shrink.py
-.. _shrink.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/shrink.py
-.. |shrink| image:: https://user-images.githubusercontent.com/32848391/46819143-41042280-cd83-11e8-9492-4f53679887fa.png
- :width: 300 px
- :target: shrink.py_
- :alt: shrink.py
-
-.. |aspring.py| replace:: aspring.py
-.. _aspring.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/aspring.py
-.. |aspring| image:: https://user-images.githubusercontent.com/32848391/36788885-e97e80ae-1c8f-11e8-8b8f-ffc43dad1eb1.gif
- :width: 300 px
- :target: aspring.py_
- :alt: aspring.py
-
-.. |delaunay2d.py| replace:: delaunay2d.py
-.. _delaunay2d.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/delaunay2d.py
-.. |delaunay2d| image:: https://user-images.githubusercontent.com/32848391/50738865-c0658e80-11d8-11e9-8616-b77363aa4695.jpg
- :width: 300 px
- :target: delaunay2d.py_
- :alt: delaunay2d.py
-
-.. |moving_least_squares1D.py| replace:: moving_least_squares1D.py
-.. _moving_least_squares1D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares1D.py
-.. |moving_least_squares1D| image:: https://user-images.githubusercontent.com/32848391/50738937-61544980-11d9-11e9-8be8-8826032b8baf.jpg
- :width: 300 px
- :target: moving_least_squares1D.py_
- :alt: moving_least_squares1D.py
-
-.. |recosurface.py| replace:: recosurface.py
-.. _recosurface.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/recosurface.py
-.. |recosurface| image:: https://user-images.githubusercontent.com/32848391/46817107-b3263880-cd7e-11e8-985d-f5d158992f0c.png
- :target: recosurface.py_
- :alt: recosurface.py
-
-.. |fatlimb.py| replace:: fatlimb.py
-.. _fatlimb.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fatlimb.py
-.. |fatlimb| image:: https://user-images.githubusercontent.com/32848391/50738945-7335ec80-11d9-11e9-9d3f-c6c19df8f10d.jpg
- :width: 300 px
- :target: fatlimb.py_
- :alt: fatlimb.py
-
-.. |largestregion.py| replace:: largestregion.py
-.. _largestregion.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/largestregion.py
-
-.. |fitplanes.py| replace:: fitplanes.py
-.. _fitplanes.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitplanes.py
-
-.. |mesh_coloring.py| replace:: mesh_coloring.py
-.. _mesh_coloring.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_coloring.py
-.. |mesh_coloring| image:: https://user-images.githubusercontent.com/32848391/50738856-bf346180-11d8-11e9-909c-a3f9d32c4e8c.jpg
- :width: 300 px
- :target: mesh_coloring.py_
- :alt: mesh_coloring.py
-
-.. |mesh_alphas.py| replace:: mesh_alphas.py
-.. _mesh_alphas.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_alphas.py
-.. |mesh_alphas| image:: https://user-images.githubusercontent.com/32848391/50738857-bf346180-11d8-11e9-80a1-d283aed0b305.jpg
- :width: 300 px
- :target: mesh_alphas.py_
- :alt: mesh_alphas.py
-
-.. |mesh_custom.py| replace:: mesh_custom.py
-.. _mesh_custom.py: https://github.com/marcomusy/vedo/tree/master/examples/mesh_custom.py
-.. |mesh_custom| image:: https://user-images.githubusercontent.com/32848391/51390972-20d9c180-1b31-11e9-955d-025f1ef24cb7.png
- :width: 300 px
- :target: mesh_custom.py_
- :alt: mesh_custom.py
-
-.. |connVtx.py| replace:: connVtx.py
-.. _connVtx.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/connVtx.py
-.. |connVtx| image:: https://user-images.githubusercontent.com/32848391/51558919-ec436e00-1e80-11e9-91ac-0787c35fc20e.png
- :width: 300 px
- :target: connVtx.py_
- :alt: connVtx.py
-
-.. |spherical_harmonics1.py| replace:: spherical_harmonics1.py
-.. _spherical_harmonics1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/spherical_harmonics1.py
-
-.. |spherical_harmonics2.py| replace:: spherical_harmonics2.py
-.. _spherical_harmonics2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/spherical_harmonics2.py
-
-.. |skeletonize.py| replace:: skeletonize.py
-.. _skeletonize.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/skeletonize.py
-.. |skeletonize| image:: https://user-images.githubusercontent.com/32848391/46820954-c5f13b00-cd87-11e8-87aa-286528a09de8.png
- :target: spherical_harmonics2.py_
- :alt: skeletonize.py
-
-.. |gyroscope1.py| replace:: gyroscope1.py
-.. _gyroscope1.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope1.py
-.. |gyroscope1| image:: https://user-images.githubusercontent.com/32848391/39766016-85c1c1d6-52e3-11e8-8575-d167b7ce5217.gif
- :width: 300 px
- :target: gyroscope1.py_
- :alt: gyroscope1.py
-
-.. |icon.py| replace:: icon.py
-.. _icon.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/icon.py
-.. |icon| image:: https://user-images.githubusercontent.com/32848391/50739009-2bfc2b80-11da-11e9-9e2e-a5e0e987a91a.jpg
- :width: 300 px
- :target: icon.py_
-
-.. |lights.py| replace:: lights.py
-.. _lights.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/lights.py
- :width: 300 px
- :target: lights.py_
- :alt: lights.py
-
-.. |lorenz.py| replace:: lorenz.py
-.. _lorenz.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/lorenz.py
-.. |lorenz| image:: https://user-images.githubusercontent.com/32848391/46818115-be7a6380-cd80-11e8-8ffb-60af2631bf71.png
- :width: 300 px
- :target: lorenz.py_
- :alt: lorenz.py
-
-.. |sliders1.py| replace:: sliders1.py
-.. _sliders1.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders1.py
-.. |sliders1| image:: https://user-images.githubusercontent.com/32848391/50738848-be033480-11d8-11e9-9b1a-c13105423a79.jpg
- :width: 300 px
- :target: sliders1.py_
- :alt: sliders1.py
-
-.. |sliders2.py| replace:: sliders2.py
-.. _sliders2.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders2.py
-
-.. |buttons.py| replace:: buttons.py
-.. _buttons.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/buttons.py
-.. |buttons| image:: https://user-images.githubusercontent.com/32848391/50738870-c0fe2500-11d8-11e9-9b78-92754f5c5968.jpg
- :width: 300 px
- :target: buttons.py_
- :alt: buttons.py
-
-.. |cutter.py| replace:: cutter.py
-.. _cutter.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/cutter.py
-.. |cutter| image:: https://user-images.githubusercontent.com/32848391/50738866-c0658e80-11d8-11e9-955b-551d4d8b0db5.jpg
- :width: 300 px
- :target: cutter.py_
- :alt: cutter.py
-
-.. |makeVideo.py| replace:: makeVideo.py
-.. _makeVideo.py: https://github.com/marcomusy/vedo/tree/master/examples/other/makeVideo.py
-.. |makeVideo| image:: https://user-images.githubusercontent.com/32848391/50739007-2bfc2b80-11da-11e9-97e6-620a3541a6fa.jpg
- :width: 300 px
- :target: makeVideo.py_
- :alt: makeVideo.py
-
-.. |fitspheres1.py| replace:: fitspheres1.py
-.. _fitspheres1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitspheres1.py
-
-.. |fitspheres2.py| replace:: fitspheres2.py
-.. _fitspheres2.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitspheres2.py
-.. |fitspheres2| image:: https://user-images.githubusercontent.com/32848391/50738943-687b5780-11d9-11e9-87a6-054e0fe76241.jpg
- :width: 300 px
- :target: fitspheres2.py_
- :alt: fitspheres2.py
-
-.. |plot4_fxy.py| replace:: plot4_fxy.py
-.. _plot4_fxy.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot4_fxy.py
-.. |plot4_fxy| image:: https://user-images.githubusercontent.com/32848391/36611824-fd524fac-18d4-11e8-8c76-d3d1b1bb3954.png
- :width: 300 px
- :target: plot4_fxy.py_
- :alt: plot4_fxy.py
-
-.. |histo_hexagonal.py| replace:: histo_hexagonal.py
-.. _histo_hexagonal.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_hexagonal.py
-.. |histo_hexagonal| image:: https://user-images.githubusercontent.com/32848391/72434748-b471bc80-379c-11ea-95d7-d70333770582.png
- :width: 300 px
- :target: histo_hexagonal.py_
- :alt: histo_hexagonal.py
-
-.. |histo_1D.py| replace:: histo_1D.py
-.. _histo_1D.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_1D.py
-.. |histo_1D| image:: https://user-images.githubusercontent.com/32848391/68141260-77cc4e00-ff2d-11e9-9280-0efc5b87314d.png
- :width: 300 px
- :target: histo_1D.py_
- :alt: histo_1D.py
-
-.. |histo_violin.py| replace:: histo_violin.py
-.. _histo_violin.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_violin.py
-.. |histo_violin| image:: https://user-images.githubusercontent.com/32848391/73481240-b55d3d80-439b-11ea-89a4-6c35ecc84b0d.png
- :width: 300 px
- :target: histo_violin.py_
- :alt: histo_violin.py
-
-
-.. |align3.py| replace:: align3.py
-.. _align3.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align3.py
-.. |align3| image:: https://user-images.githubusercontent.com/32848391/50738873-c196bb80-11d8-11e9-8653-a41108a5f02d.png
- :width: 300 px
- :target: align3.py_
- :alt: align3.py
-
-.. |pca.py| replace:: pca.py
-.. _pca.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/pca.py
-.. |pca| image:: https://user-images.githubusercontent.com/32848391/50738852-be9bcb00-11d8-11e9-8ac8-ad9278d9cee0.jpg
- :width: 300 px
- :target: pca.py_
- :alt: pca.py
-
-.. |cell_colony.py| replace:: cell_colony.py
-.. _cell_colony.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/cell_colony.py
-.. |cell_colony| image:: https://user-images.githubusercontent.com/32848391/50738947-7335ec80-11d9-11e9-9a45-6053b4eaf9f9.jpg
- :width: 300 px
- :target: cell_colony.py_
- :alt: cell_colony.py
-
-.. |mesh_smoother1.py| replace:: mesh_smoother1.py
-.. _mesh_smoother1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/mesh_smoother1.py
-.. |mesh_smoother1| image:: https://user-images.githubusercontent.com/32848391/50738939-67e2c100-11d9-11e9-90cb-716ff3f03f67.jpg
- :width: 300 px
- :target: mesh_smoother1.py_
- :alt: mesh_smoother1.py
-
-.. |moving_least_squares3D.py| replace:: moving_least_squares3D.py
-.. _moving_least_squares3D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares3D.py
-.. |moving_least_squares3D| image:: https://user-images.githubusercontent.com/32848391/50738935-61544980-11d9-11e9-9c20-f2ce944d2238.jpg
- :width: 300 px
- :target: moving_least_squares3D.py_
- :alt: moving_least_squares3D.py
-
-.. |moving_least_squares2D.py| replace:: moving_least_squares2D.py
-.. _moving_least_squares2D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares2D.py
-.. |moving_least_squares2D| image:: https://user-images.githubusercontent.com/32848391/50738936-61544980-11d9-11e9-9efb-e2a923762b72.jpg
- :width: 300 px
- :target: moving_least_squares2D.py_
- :alt: moving_least_squares2D.py
-
-.. |boolean.py| replace:: boolean.py
-.. _boolean.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/boolean.py
-.. |boolean| image:: https://user-images.githubusercontent.com/32848391/50738871-c0fe2500-11d8-11e9-8812-442b69be6db9.png
- :width: 300 px
- :target: boolean.py_
- :alt: boolean.py
-
-.. |surfIntersect.py| replace:: surfIntersect.py
-.. _surfIntersect.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/surfIntersect.py
-
-.. |probeLine1.py| replace:: probeLine1.py
-.. _probeLine1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/probeLine1.py
-.. |probeLine1| image:: https://user-images.githubusercontent.com/32848391/48198460-3aa0a080-e359-11e8-982d-23fadf4de66f.jpg
- :width: 300 px
- :target: probeLine1.py_
- :alt: probeLine1.py
-
-.. |probeLine2.py| replace:: probeLine2.py
-.. _probeLine2.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/probeLine2.py
-
-.. |slicePlane.py| replace:: slicePlane.py
-.. _slicePlane.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/slicePlane.py
-.. |slicePlane| image:: https://user-images.githubusercontent.com/32848391/48198461-3aa0a080-e359-11e8-8c29-18f287f105e6.jpg
- :width: 300 px
- :target: slicePlane.py_
- :alt: slicePlane.py
-
-.. |volumeOperations.py| replace:: volumeOperations.py
-.. _volumeOperations.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/volumeOperations.py
-.. |volumeOperations| image:: https://user-images.githubusercontent.com/32848391/48198940-d1ba2800-e35a-11e8-96a7-ffbff797f165.jpg
- :width: 300 px
- :alt: volumeOperations.py
-
-.. |clustering.py| replace:: clustering.py
-.. _clustering.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/clustering.py
-.. |clustering| image:: https://user-images.githubusercontent.com/32848391/46817286-2039ce00-cd7f-11e8-8b29-42925e03c974.png
- :width: 300 px
- :target: clustering.py_
- :alt: clustering.py
-
-.. |thinplate_morphing1.py| replace:: thinplate_morphing1.py
-.. _thinplate_morphing1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing1.py
-.. |thinplate_morphing1| image:: https://user-images.githubusercontent.com/32848391/51403917-34495480-1b52-11e9-956c-918c7805a9b5.png
- :width: 300 px
- :target: thinplate_morphing1.py_
- :alt: thinplate_morphing1.py
-
-.. |colorcubes.py| replace:: colorcubes.py
-.. _colorcubes.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/colorcubes.py
-.. |colorcubes| image:: https://user-images.githubusercontent.com/32848391/50738867-c0658e80-11d8-11e9-9e05-ac69b546b7ec.png
- :width: 300 px
- :target: colorcubes.py_
- :alt: colorcubes.py
-
-.. |colorpalette.py| replace:: colorpalette.py
-.. _colorpalette.py: https://github.com/marcomusy/vedo/tree/master/examples/other/colorpalette.py
-.. |colorpalette| image:: https://user-images.githubusercontent.com/32848391/50739011-2c94c200-11da-11e9-8f36-ede1b2a014a8.jpg
- :width: 300 px
- :target: colorpalette.py
- :alt: colorpalette.py
-
-.. |colormaps| image:: https://user-images.githubusercontent.com/32848391/50738804-577e1680-11d8-11e9-929e-fca17a8ac6f3.jpg
- :width: 450 px
- :alt: colormaps
-
-.. |tannerhelland| replace:: tannerhelland
-.. _tannerhelland: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code
-
-.. |colorprint.py| replace:: printc.py
-.. _colorprint.py: https://github.com/marcomusy/vedo/tree/master/examples/other/printc.py
-.. |colorprint| image:: https://user-images.githubusercontent.com/32848391/50739010-2bfc2b80-11da-11e9-94de-011e50a86e61.jpg
- :target: colorprint.py_
- :alt: colorprint.py
-
-.. |ribbon.py| replace:: ribbon.py
-.. _ribbon.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/ribbon.py
-.. |ribbon| image:: https://user-images.githubusercontent.com/32848391/50738851-be9bcb00-11d8-11e9-80ee-bd73c1c29c06.jpg
- :width: 300 px
- :target: ribbon.py_
- :alt: ribbon.py
-
-.. |manyspheres.py| replace:: manyspheres.py
-.. _manyspheres.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/manyspheres.py
-.. |manyspheres| image:: https://user-images.githubusercontent.com/32848391/46818673-1f566b80-cd82-11e8-9a61-be6a56160f1c.png
- :target: manyspheres.py_
-
-.. |manypoints.py| replace:: manypoints.py
-.. _manypoints.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/manypoints.py
-
-.. |earth.py| replace:: earth.py
-.. _earth.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/earth.py
-.. |earth| image:: https://user-images.githubusercontent.com/32848391/51031592-5a448700-159d-11e9-9b66-bee6abb18679.png
- :width: 300 px
- :target: earth.py_
- :alt: earth.py
-
-.. |brownian2D.py| replace:: brownian2D.py
-.. _brownian2D.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/brownian2D.py
-.. |brownian2D| image:: https://user-images.githubusercontent.com/32848391/50738948-73ce8300-11d9-11e9-8ef6-fc4f64c4a9ce.gif
- :width: 300 px
- :target: brownian2D.py_
-
-.. |gas.py| replace:: gas.py
-.. _gas.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gas.py
-.. |gas| image:: https://user-images.githubusercontent.com/32848391/50738954-7e891800-11d9-11e9-95aa-67c92ca6476b.gif
- :width: 300 px
- :target: gas.py_
- :alt: gas.py
-
-.. |tube.py| replace:: tube.py
-.. _tube.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/tube.py
-.. |tube| image:: https://user-images.githubusercontent.com/32848391/51801626-adc30000-2240-11e9-8866-9d9d5d8790ab.png
- :width: 300 px
- :target: tube.py_
- :alt: tube.py
-
-.. |mesh_threshold.py| replace:: mesh_threshold.py
-.. _mesh_threshold.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_threshold.py
-.. |mesh_threshold| image:: https://user-images.githubusercontent.com/32848391/51807663-4762cf80-228a-11e9-9d0c-184bb11a97bf.png
- :width: 300 px
- :target: mesh_threshold.py_
- :alt: mesh_threshold.py
-
-.. |cutWithMesh.py| replace:: cutWithMesh.py
-.. _cutWithMesh.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/cutWithMesh.py
-.. |cutWithMesh| image:: https://user-images.githubusercontent.com/32848391/51808907-e7c0f000-229a-11e9-98a7-fefc7261b3c3.png
- :width: 300 px
- :target: cutWithMesh.py_
- :alt: cutWithMesh.py
-
-.. |paraboloid| image:: https://user-images.githubusercontent.com/32848391/51211547-260ef480-1916-11e9-95f6-4a677e37e355.png
- :width: 300 px
- :alt: paraboloid
-
-.. |isosurfaces.py| replace:: isosurfaces.py
-.. _isosurfaces.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/isosurfaces.py
-.. |isosurfaces| image:: https://user-images.githubusercontent.com/32848391/51558920-ec436e00-1e80-11e9-9d96-aa9b7c72d58b.png
- :width: 300 px
- :target: isosurfaces.py_
- :alt: isosurfaces.py
-
-.. |meshquality.py| replace:: meshquality.py
-.. _meshquality.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/meshquality.py
-.. |meshquality| image:: https://user-images.githubusercontent.com/32848391/51831269-fb4b7580-22f1-11e9-81ea-13467a5649ca.png
- :width: 300 px
- :target: meshquality.py_
- :alt: meshquality.py
-
-.. |geodesic.py| replace:: geodesic.py
-.. _geodesic.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/geodesic.py
-.. |geodesic| image:: https://user-images.githubusercontent.com/32848391/51855637-015f4780-232e-11e9-92ca-053a558e7f70.png
- :width: 300 px
- :target: geodesic.py_
- :alt: geodesic.py
-
-
-.. |cutAndCap.py| replace:: cutAndCap.py
-.. _cutAndCap.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/cutAndCap.py
-.. |cutAndCap| image:: https://user-images.githubusercontent.com/32848391/51930515-16ee7300-23fb-11e9-91af-2b6b3d626246.png
- :width: 300 px
- :target: cutAndCap.py_
- :alt: cutAndCap.py
-
-
-.. |convexHull.py| replace:: convexHull.py
-.. _convexHull.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/convexHull.py
-.. |convexHull| image:: https://user-images.githubusercontent.com/32848391/51932732-068cc700-2400-11e9-9b68-30294a4fa4e3.png
- :width: 300 px
- :target: convexHull.py_
- :alt: convexHull.py
-
-.. |curvature| image:: https://user-images.githubusercontent.com/32848391/51934810-c2e88c00-2404-11e9-8e7e-ca0b7984bbb7.png
- :alt: curvature
-
-.. |progbar| image:: https://user-images.githubusercontent.com/32848391/51858823-ed1f4880-2335-11e9-8788-2d102ace2578.png
- :alt: progressbar
-
-.. |multiwindows| image:: https://user-images.githubusercontent.com/32848391/50738853-be9bcb00-11d8-11e9-9c8e-69864ad7c045.jpg
- :alt: multiwindows
-
-.. |annotations.py| replace:: annotations.py
-.. _annotations.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/annotations.py
-
-.. |Cone| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestCone.png
- :width: 300 px
-
-.. |Cylinder| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestCylinder.png
- :width: 300 px
-
-.. |Disk| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestDisk.png
- :width: 300 px
-
-.. |OrientedArrow| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestOrientedArrow.png
- :width: 300 px
-
-.. |Plane| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestPlane.png
- :width: 300 px
-
-.. |Polygon| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestRegularPolygonSource.png
- :width: 300 px
-
-.. |Sphere| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestSphere.png
- :width: 300 px
-
-
-.. |embryoslider| image:: https://user-images.githubusercontent.com/32848391/52141624-975ce000-2656-11e9-8d31-2a3c92ab79d6.png
- :width: 300 px
-
-.. |isosurfaces1| image:: https://user-images.githubusercontent.com/32848391/52141625-975ce000-2656-11e9-91fc-291e072fc4c1.png
- :width: 300 px
-
-.. |splitmesh.py| replace:: splitmesh.py
-.. _splitmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/splitmesh.py
-.. |splitmesh| image:: https://user-images.githubusercontent.com/32848391/52141626-97f57680-2656-11e9-80ea-fcd3571a6422.png
- :width: 300 px
- :target: splitmesh.py_
- :alt: splitmesh.py
-
-.. |thinplate_morphing2.py| replace:: thinplate_morphing2.py
-.. _thinplate_morphing2.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing2.py
-.. |thinplate_morphing2| image:: https://user-images.githubusercontent.com/32848391/52142303-9927a300-2658-11e9-98db-ebad4883f99f.png
- :width: 300 px
- :target: thinplate_morphing2.py_
- :alt: thinplate_morphing2.py
-
-.. |projectsphere.py| replace:: projectsphere.py
-.. _projectsphere.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/projectsphere.py
-.. |projectsphere| image:: https://user-images.githubusercontent.com/32848391/52144163-c9be0b80-265d-11e9-9ce6-d6f2b919c214.png
- :width: 300 px
- :target: projectsphere.py_
- :alt: projectsphere.py
-
-
-.. |mesh2volume.py| replace:: mesh2volume.py
-.. _mesh2volume.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/mesh2volume.py
-.. |mesh2volume| image:: https://user-images.githubusercontent.com/32848391/52168902-5638fe80-2730-11e9-8033-8e470a3d4f0f.jpg
- :width: 300 px
- :target: mesh2volume.py_
- :alt: mesh2volume.py
-
-.. |markpoint.py| replace:: markpoint.py
-.. _markpoint.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/markpoint.py
-.. |markpoint| image:: https://user-images.githubusercontent.com/32848391/52169969-1fb7af80-2741-11e9-937f-5c331d9a1d11.jpg
- :width: 300 px
- :target: markpoint.py_
- :alt: markpoint.py
-
-.. |readVolumeAsIsoSurface.py| replace:: readVolumeAsIsoSurface.py
-.. _readVolumeAsIsoSurface.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/readVolumeAsIsoSurface.py
-
-.. |read_vti.py| replace:: read_vti.py
-.. _read_vti.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/read_vti.py
-.. |read_vti| image:: https://user-images.githubusercontent.com/32848391/50739036-6bc31300-11da-11e9-89b3-04a75187f812.jpg
- :width: 300 px
- :target: read_vti.py_
- :alt: read_vti.py
-
-.. |glyphs.py| replace:: glyphs.py
-.. _glyphs.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/glyphs.py
-.. |glyphs| image:: https://user-images.githubusercontent.com/32848391/52233403-47cd1d00-28bf-11e9-86b0-cbceebbde0de.jpg
- :width: 300 px
- :target: glyphs.py_
- :alt: glyphs.py
-
-.. |glyphs_arrows.py| replace:: glyphs_arrows.py
-.. _glyphs_arrows.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/glyphs_arrows.py
-.. |glyphs_arrows| image:: https://user-images.githubusercontent.com/32848391/55897850-a1a0da80-5bc1-11e9-81e0-004c8f396b43.jpg
- :width: 300 px
- :target: glyphs_arrows.py_
- :alt: glyphs_arrows.py
-
-.. |interpolateField.py| replace:: interpolateField.py
-.. _interpolateField.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/interpolateField.py
-.. |interpolateField| image:: https://user-images.githubusercontent.com/32848391/52416117-25b6e300-2ae9-11e9-8d86-575b97e543c0.png
- :width: 300 px
- :target: interpolateField.py_
- :alt: interpolateField.py
-
-.. |rotateImage.py| replace:: rotateImage.py
-.. _rotateImage.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/rotateImage.py
-.. |rotateImage| image:: https://user-images.githubusercontent.com/32848391/52416910-fb662500-2aea-11e9-88ba-9c73128e8666.jpg
- :width: 300 px
- :target: rotateImage.py_
- :alt: rotateImage.py
-
-.. |basicshapes| image:: https://user-images.githubusercontent.com/32848391/50738811-58af4380-11d8-11e9-9bfb-378c27c9d26f.png
- :alt: basicshapes
-
-.. |lines| image:: https://user-images.githubusercontent.com/32848391/52503049-ac9cb600-2be4-11e9-86af-72a538af14ef.png
- :width: 300 px
- :alt: lines
-
-.. |vlogo_large| image:: https://user-images.githubusercontent.com/32848391/52522716-4fa70b80-2c89-11e9-92a7-0d22cbe34758.png
- :alt: vlogo_large
-
-.. |vlogo_medium| image:: https://user-images.githubusercontent.com/32848391/52522717-503fa200-2c89-11e9-87ab-67eb44652e24.png
- :alt: vlogo_medium
-
-.. |vlogo_small| image:: https://user-images.githubusercontent.com/32848391/52522718-50d83880-2c89-11e9-80ff-df1b5618a84a.png
- :alt: vlogo_small
-
-.. |vlogo_small_dark| image:: https://user-images.githubusercontent.com/32848391/52522719-50d83880-2c89-11e9-8b90-a1c21c27b007.png
- :alt: vlogo_small_dark
-
-.. |vlogo_tube| image:: https://user-images.githubusercontent.com/32848391/52522720-5170cf00-2c89-11e9-8b1d-a7a5cf75e71b.png
- :alt: vlogo_tube
-
-.. |vlogo_tube_dark| image:: https://user-images.githubusercontent.com/32848391/52522721-5170cf00-2c89-11e9-8fbb-6efa13940aa1.png
- :alt: vlogo_tube_dark
-
-.. |fitline.py| replace:: fitline.py
-.. _fitline.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/fitline.py
-.. |fitline| image:: https://user-images.githubusercontent.com/32848391/50738864-c0658e80-11d8-11e9-8754-c670f1f331d6.jpg
- :width: 300 px
- :target: fitline.py_
- :alt: fitline.py
-
-.. |sliders3d.py| replace:: sliders3d.py
-.. _sliders3d.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders3d.py
-.. |sliders3d| image:: https://user-images.githubusercontent.com/32848391/52859555-4efcf200-312d-11e9-9290-6988c8295163.png
- :width: 300 px
- :target: sliders3d.py_
- :alt: sliders3d.py
-
-.. |ex01_showmesh.py| replace:: ex01_showmesh.py
-.. _ex01_showmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex01_show-mesh.py
-.. |ex01_showmesh| image:: https://user-images.githubusercontent.com/32848391/53026243-d2d31900-3462-11e9-9dde-518218c241b6.jpg
- :width: 300 px
- :target: ex01_showmesh.py_
- :alt: ex01_showmesh.py
-
-.. |ex02_tetralize-mesh.py| replace:: ex02_tetralize-mesh.py
-.. _ex02_tetralize-mesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex02_tetralize-mesh.py
-.. |ex02_tetralize-mesh| image:: https://user-images.githubusercontent.com/32848391/53026244-d2d31900-3462-11e9-835a-1fa9d66d3dae.png
- :width: 300 px
- :target: ex02_tetralize-mesh.py_
- :alt: ex02_tetralize-mesh.py
-
-.. |ex06_elasticity1.py| replace:: ex06_elasticity1.py
-.. _ex06_elasticity1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex06_elasticity1.py
-.. |ex06_elasticity1| image:: https://user-images.githubusercontent.com/32848391/53026245-d2d31900-3462-11e9-9db4-96211569d114.jpg
- :width: 300 px
- :target: ex06_elasticity1.py_
- :alt: ex06_elasticity1.py
-
-.. |ex06_elasticity2.py| replace:: ex06_elasticity2.py
-.. _ex06_elasticity2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex06_elasticity2.py
-.. |ex06_elasticity2| image:: https://user-images.githubusercontent.com/32848391/53026246-d36baf80-3462-11e9-96a5-8eaf0bb0f9a4.jpg
- :width: 300 px
- :target: ex06_elasticity2.py_
- :alt: ex06_elasticity2.py
-
-
-.. |flatarrow.py| replace:: flatarrow.py
-.. _flatarrow.py: https://github.com/marcomusy/vedo/tree/master/examples/other/basic/flatarrow.py
-.. |flatarrow| image:: https://user-images.githubusercontent.com/32848391/54612632-97c00780-4a59-11e9-8532-940c25a5dfd8.png
- :width: 300 px
- :target: flatarrow.py_
- :alt: flatarrow.py
-
-.. |printhisto| image:: https://user-images.githubusercontent.com/32848391/55073046-03732780-508d-11e9-9bf9-c5de8631dd73.png
- :width: 300 px
-
-.. |distance2mesh.py| replace:: distance2mesh.py
-.. _distance2mesh.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/distance2mesh.py
-.. |distance2mesh| image:: https://user-images.githubusercontent.com/32848391/55965881-b5a71380-5c77-11e9-8680-5bddceab813a.png
- :width: 300 px
- :target: distance2mesh.py_
- :alt: distance2mesh.py
-
-.. |pendulum.py| replace:: pendulum.py
-.. _pendulum.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/pendulum.py
-.. |pendulum| image:: https://user-images.githubusercontent.com/32848391/55420020-51e56200-5576-11e9-8513-4a5d93913b17.png
- :width: 300 px
- :target: pendulum.py_
- :alt: pendulum.py
-
-.. |latex.py| replace:: latex.py
-.. _latex.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/latex.py
-.. |latex| image:: https://user-images.githubusercontent.com/32848391/55568648-6190b200-5700-11e9-9547-0798c588a7a5.png
- :width: 300 px
- :target: latex.py_
- :alt: latex.py
-
-.. |ft04_heat_gaussian.py| replace:: ft04_heat_gaussian.py
-.. _ft04_heat_gaussian.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ft04_heat_gaussian.py
-.. |ft04_heat_gaussian| image:: https://user-images.githubusercontent.com/32848391/55578167-88a5ae80-5715-11e9-84ea-bdab54099887.gif
- :width: 300 px
- :target: ft04_heat_gaussian.py_
- :alt: ft04_heat_gaussian.py
-
-.. |cutcube| image:: https://user-images.githubusercontent.com/32848391/55965516-08cc9680-5c77-11e9-8d23-720f6c088ea2.png
- :width: 200 px
-
-.. |intline| image:: https://user-images.githubusercontent.com/32848391/55967065-eee08300-5c79-11e9-8933-265e1bab9f7e.png
- :width: 300 px
-
-.. |cropped| image:: https://user-images.githubusercontent.com/32848391/57081955-0ef1e800-6cf6-11e9-99de-b45220939bc9.png
- :width: 300 px
-
-.. |dolfinmesh| image:: https://user-images.githubusercontent.com/32848391/53026243-d2d31900-3462-11e9-9dde-518218c241b6.jpg
- :width: 300 px
-
-.. |turing_pattern.py| replace:: turing_pattern.py
-.. _turing_pattern.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/turing_pattern.py
-.. |turing_pattern| image:: https://user-images.githubusercontent.com/32848391/56056437-77cfeb00-5d5c-11e9-9887-828e5745d547.gif
- :width: 300 px
- :target: turing_pattern.py_
- :alt: turing_pattern.py
-
-.. |demo_cahn-hilliard.py| replace:: demo_cahn-hilliard.py
-.. _demo_cahn-hilliard.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/demo_cahn-hilliard.py
-.. |demo_cahn-hilliard| image:: https://user-images.githubusercontent.com/32848391/56664730-edb34b00-66a8-11e9-9bf3-73431f2a98ac.gif
- :width: 300 px
- :target: demo_cahn-hilliard.py_
- :alt: demo_cahn-hilliard.py
-
-
-.. |navier-stokes_lshape.py| replace:: navier-stokes_lshape.py
-.. _navier-stokes_lshape.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/navier-stokes_lshape.py
-.. |navier-stokes_lshape| image:: https://user-images.githubusercontent.com/32848391/56671156-6bc91f00-66b4-11e9-8c58-e6b71e2ad1d0.gif
- :width: 300 px
- :target: navier-stokes_lshape.py_
- :alt: navier-stokes_lshape.py
-
-
-.. |mesh_map2cell.py| replace:: mesh_map2cell.py
-.. _mesh_map2cell.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_map2cell.py
-.. |mesh_map2cell| image:: https://user-images.githubusercontent.com/32848391/56600859-0153a880-65fa-11e9-88be-34fd96b18e9a.png
- :width: 300 px
- :target: mesh_map2cell.py_
- :alt: mesh_map2cell.py
-
-
-.. |ex03_poisson.py| replace:: ex03_poisson.py
-.. _ex03_poisson.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex03_poisson.py
-.. |ex03_poisson| image:: https://user-images.githubusercontent.com/32848391/54925524-bec18200-4f0e-11e9-9eab-29fd61ef3b8e.png
- :width: 300 px
- :target: ex03_poisson.py_
- :alt: ex03_poisson.py
-
-.. |elastodynamics.py| replace:: elastodynamics.py
-.. _elastodynamics.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elastodynamics.py
-.. |elastodynamics| image:: https://user-images.githubusercontent.com/32848391/54932788-bd4a8680-4f1b-11e9-9326-33645171a45e.gif
- :width: 300 px
- :target: elastodynamics.py_
- :alt: elastodynamics.py
-
-.. |ft02_poisson_membrane.py| replace:: ft02_poisson_membrane.py
-.. _ft02_poisson_membrane.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ft02_poisson_membrane.py
-.. |ft02_poisson_membrane| image:: https://user-images.githubusercontent.com/32848391/55499287-ed91d380-5645-11e9-8e9a-e31e2e3b1649.jpg
- :width: 300 px
- :target: ft02_poisson_membrane.py_
- :alt: ft02_poisson_membrane.py
-
-
-.. |stokes.py| replace:: stokes.py
-.. _stokes.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py
-.. |stokes| image:: https://user-images.githubusercontent.com/32848391/55098209-aba0e480-50bd-11e9-8842-42d3f0b2d9c8.png
- :width: 300 px
- :target: stokes.py_
- :alt: stokes.py
-
-.. |stokes1.py| replace:: stokes1.py
-.. _stokes1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py
-.. |stokes1| image:: https://user-images.githubusercontent.com/32848391/56986911-6116fa00-6b8c-11e9-83f5-5b4efe430c0c.jpg
- :width: 300 px
- :target: stokes1.py_
- :alt: stokes1.py
-
-.. |demo_submesh.py| replace:: demo_submesh.py
-.. _demo_submesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/demo_submesh.py
-.. |demo_submesh| image:: https://user-images.githubusercontent.com/32848391/56675428-4e984e80-66bc-11e9-90b0-43dde7e4cc29.png
- :width: 300 px
- :target: demo_submesh.py_
- :alt: demo_submesh.py
-
-.. |pi_estimate.py| replace:: pi_estimate.py
-.. _pi_estimate.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/pi_estimate.py
-.. |pi_estimate| image:: https://user-images.githubusercontent.com/32848391/56675429-4e984e80-66bc-11e9-9217-a0652a8e74fe.png
- :width: 300 px
- :target: pi_estimate.py_
- :alt: pi_estimate.py
-
-.. |isolines.py| replace:: isolines.py
-.. _isolines.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/isolines.py
-.. |isolines| image:: https://user-images.githubusercontent.com/32848391/72433087-f00a8780-3798-11ea-9778-991f0abeca70.png
- :width: 300 px
- :target: isolines.py_
- :alt: isolines.py
-
-.. |inset.py| replace:: inset.py
-.. _inset.py: https://github.com/marcomusy/vedo/tree/master/examples/other/inset.py
-.. |inset| image:: https://user-images.githubusercontent.com/32848391/56758560-3c3f1300-6797-11e9-9b33-49f5a4876039.jpg
- :width: 300 px
- :target: inset.py_
- :alt: inset.py
-
-.. |legosurface.py| replace:: legosurface.py
-.. _legosurface.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/legosurface.py
-.. |legosurface| image:: https://user-images.githubusercontent.com/32848391/56820682-da40e500-684c-11e9-8ea3-91cbcba24b3a.png
- :width: 300 px
- :target: legosurface.py_
- :alt: legosurface.py
-
-
-.. |streamribbons.py| replace:: streamribbons.py
-.. _streamribbons.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamribbons.py
-.. |streamribbons| image:: https://user-images.githubusercontent.com/32848391/56963999-9145a500-6b5a-11e9-9461-0037c471faab.png
- :width: 300 px
- :target: streamribbons.py_
- :alt: streamribbons.py
-
-
-.. |streamlines1.py| replace:: streamlines1.py
-.. _streamlines1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamlines1.py
-.. |streamlines1| image:: https://user-images.githubusercontent.com/32848391/56964002-9145a500-6b5a-11e9-9e3f-da712609d896.png
- :width: 300 px
- :target: streamlines1.py_
- :alt: streamlines1.py
-
-.. |streamlines2.py| replace:: streamlines2.py
-.. _streamlines2.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamlines2.py
-.. |streamlines2| image:: https://user-images.githubusercontent.com/32848391/56964001-9145a500-6b5a-11e9-935b-1b2425bd7dd2.png
- :width: 300 px
- :target: streamlines2.py_
- :alt: streamlines2.py
-
-.. |office.py| replace:: office.py
-.. _office.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/office.py
-.. |office| image:: https://user-images.githubusercontent.com/32848391/56964003-9145a500-6b5a-11e9-9d9e-9736d90e1900.png
- :width: 300 px
- :target: office.py_
- :alt: office.py
-
-.. |value-iteration.py| replace:: value-iteration.py
-.. _value-iteration.py: https://github.com/marcomusy/vedo/tree/master/examples/other/value-iteration.py
-.. |value-iteration| image:: https://user-images.githubusercontent.com/32848391/56964055-afaba080-6b5a-11e9-99cf-3fac99df9878.jpg
- :width: 300 px
- :target: value-iteration.py_
- :alt: value-iteration.py
-
-.. |magnetostatics.py| replace:: magnetostatics.py
-.. _magnetostatics.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/magnetostatics.py
-.. |magnetostatics| image:: https://user-images.githubusercontent.com/32848391/56985162-fb287380-6b87-11e9-9cf9-045bd08c3b9b.jpg
- :width: 300 px
- :target: magnetostatics.py_
- :alt: magnetostatics.py
-
-.. |export_x3d.py| replace:: export_x3d.py
-.. _export_x3d.py: https://github.com/marcomusy/vedo/tree/master/examples/other/export_x3d.py
-.. |export_x3d| image:: https://user-images.githubusercontent.com/32848391/57160341-c6ffbd80-6de8-11e9-95ff-7215ce642bc5.jpg
- :width: 300 px
- :target: export_x3d.py_
- :alt: export_x3d.py
-
-
-.. |silhouette.py| replace:: silhouette.py
-.. _silhouette.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/silhouette.py
-.. |silhouette| image:: https://user-images.githubusercontent.com/32848391/57179369-8e5df380-6e7d-11e9-99b4-3b1a120dd375.png
- :width: 300 px
- :target: silhouette.py_
- :alt: silhouette.py
-
-.. |shadow.py| replace:: shadow.py
-.. _shadow.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/shadow.py
-.. |shadow| image:: https://user-images.githubusercontent.com/32848391/57312574-1d714280-70ee-11e9-8741-04fc5386d692.png
- :width: 300 px
- :target: shadow.py_
- :alt: shadow.py
-
-.. |airplanes.py| replace:: airplanes.py
-.. _airplanes.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/.py
-.. |airplanes| image:: https://user-images.githubusercontent.com/32848391/57341963-b8910900-713c-11e9-898a-84b6d3712bce.gif
- :width: 300 px
- :target: airplanes.py_
- :alt: airplanes.py
-
-
-.. |heatconv.py| replace:: heatconv.py
-.. _heatconv.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/heatconv.py
-.. |heatconv| image:: https://user-images.githubusercontent.com/32848391/57455107-b200af80-726a-11e9-897d-9c7bcb9854ac.gif
- :width: 300 px
- :target: heatconv.py_
- :alt: heatconv.py
-
-.. |scalemesh.py| replace:: scalemesh.py
-.. _scalemesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/scalemesh.py
-.. |scalemesh| image:: https://user-images.githubusercontent.com/32848391/57393382-431c4b80-71c3-11e9-9a2c-8abb172f5468.png
- :width: 300 px
- :target: scalemesh.py_
- :alt: scalemesh.py
-
-.. |elasticbeam.py| replace:: elasticbeam.py
-.. _elasticbeam.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elasticbeam.py
-.. |elasticbeam| image:: https://user-images.githubusercontent.com/32848391/57476429-d7a3ae00-7296-11e9-9f50-8f456823ef3d.png
- :width: 300 px
- :target: elasticbeam.py_
- :alt: elasticbeam.py
-
-.. |specular.py| replace:: specular.py
-.. _specular.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/specular.py
-.. |specular| image:: https://user-images.githubusercontent.com/32848391/57543051-8c030a00-7353-11e9-84cd-b01f3449d255.jpg
- :width: 300 px
- :target: specular.py_
- :alt: specular.py
-
-.. |wavy_1d.py| replace:: wavy_1d.py
-.. _wavy_1d.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/wavy_1d.py
-.. |wavy_1d| image:: https://user-images.githubusercontent.com/32848391/57570898-70593b80-7407-11e9-87cf-ce498f499c09.gif
- :width: 300 px
- :target: wavy_1d.py_
- :alt: wavy_1d.py
-
-.. |idealpass.link| replace:: idealpass.link
-.. _idealpass.link: https://lorensen.github.io/VTKExamples/site/Cxx/ImageProcessing/IdealHighPass
-.. |idealpass| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/ImageProcessing/TestIdealHighPass.png
- :width: 300 px
- :target: idealpass.link_
-
-.. |buildmesh.py| replace:: buildmesh.py
-.. _buildmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/buildmesh.py
-.. |buildmesh| image:: https://user-images.githubusercontent.com/32848391/57858625-b0e2fb80-77f1-11e9-94f0-1973ed86ae70.png
- :width: 300 px
- :target: buildmesh.py_
- :alt: buildmesh.py
-
-.. |customAxes.py| replace:: customAxes.py
-.. _customAxes.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/customAxes.py
-.. |customAxes| image:: https://user-images.githubusercontent.com/32848391/58181826-c605d180-7cac-11e9-9786-11b5eb278f20.png
- :target: customAxes.py_
- :alt: customAxes.py
-
-.. |awefem.py| replace:: awefem.py
-.. _awefem.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/awefem.py
-.. |awefem| image:: https://user-images.githubusercontent.com/32848391/58368591-8b3fab80-7eef-11e9-882f-8b8eaef43567.gif
- :width: 300 px
- :target: awefem.py_
- :alt: awefem.py
-
-.. |fenics_logo| image:: https://user-images.githubusercontent.com/32848391/58764910-3940fa80-856d-11e9-8160-af89a5ab5d02.gif
-
-.. |thinplate_morphing_2d.py| replace:: thinplate_morphing_2d.py
-.. _thinplate_morphing_2d.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing_2d.py
-.. |thinplate_morphing_2d| image:: https://user-images.githubusercontent.com/32848391/59032715-385ae200-8867-11e9-9b07-7f4f8fbfa5bd.png
- :width: 300 px
- :target: thinplate_morphing_2d.py_
- :alt: thinplate_morphing_2d.py
-
-.. |interpolateVolume.py| replace:: interpolateVolume.py
-.. _interpolateVolume.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/interpolateVolume.py
-.. |interpolateVolume| image:: https://user-images.githubusercontent.com/32848391/59095175-1ec5a300-8918-11e9-8bc0-fd35c8981e2b.jpg
- :width: 300 px
- :target: interpolateVolume.py_
- :alt: interpolateVolume.py
-
-.. |deleteMeshPoints.py| replace:: deleteMeshPoints.py
-.. _deleteMeshPoints.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/deleteMeshPoints.py
-.. |deleteMeshPoints| image:: https://user-images.githubusercontent.com/32848391/59768041-e9b83980-92a3-11e9-94f4-ca1f92540e9f.png
- :width: 300 px
- :target: deleteMeshPoints.py_
- :alt: deleteMeshPoints.py
-
-.. |gray_scott.ipynb| replace:: gray_scott.ipynb
-.. _gray_scott.ipynb: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gray_scott.ipynb
-.. |gray_scott| image:: https://user-images.githubusercontent.com/32848391/59788744-aaeaa980-92cc-11e9-825d-58da26ca21ff.gif
- :width: 300 px
- :target: gray_scott.ipynb_
- :alt: gray_scott.ipynb
-
-.. |volterra.py| replace:: volterra.py
-.. _volterra.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/volterra.py
-.. |volterra| image:: https://user-images.githubusercontent.com/32848391/59788745-aaeaa980-92cc-11e9-93d5-f6a577ba5e4d.png
- :width: 300 px
- :target: volterra.py_
- :alt: volterra.py
-
-.. |tensors.py| replace:: tensors.py
-.. _tensors.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/tensors.py
-.. |tensors| image:: https://user-images.githubusercontent.com/32848391/59944747-e2d92480-9465-11e9-8012-1fc34a2e30c6.png
- :width: 300 px
- :target: tensors.py_
- :alt: tensors.py
-
-.. |tensor_grid.py| replace:: tensor_grid.py
-.. _tensor_grid.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/tensor_grid.py
-
-.. |scalarbars.py| replace:: scalarbars.py
-.. _scalarbars.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/scalarbars.py
-.. |scalarbars| image:: https://user-images.githubusercontent.com/32848391/62940174-4bdc7900-bdd3-11e9-9713-e4f3e2fdab63.png
- :width: 300 px
- :target: scalarbars.py_
- :alt: scalarbars.py
-
-.. |erode_dilate.py| replace:: erode_dilate.py
-.. _erode_dilate.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/erode_dilate.py
-
-.. |vol2points.py| replace:: vol2points.py
-.. _vol2points.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/vol2points.py
-
-.. |euclDist.py| replace:: euclDist.py
-.. _euclDist.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/euclDist.py
-
-.. |volumeFromMesh.py| replace:: volumeFromMesh.py
-.. _volumeFromMesh.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/volumeFromMesh.py
-
-.. |numpy2volume1.py| replace:: numpy2volume1.py
-.. _numpy2volume1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/numpy2volume1.py
-
-.. |G_Of_Omega| image:: https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4d02a66b6ff279aae0c4bf07c25e5727d192e4
-
-.. |wikiphong| image:: https://upload.wikimedia.org/wikipedia/commons/6/6b/Phong_components_version_4.png
-
-.. |animation1.py| replace:: animation1.py
-.. _animation1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/animation1.py
-.. |animation1| image:: https://user-images.githubusercontent.com/32848391/64273764-4b528080-cf42-11e9-90aa-2d88df239871.gif
- :width: 300 px
- :target: animation1.py_
- :alt: animation1.py
-
-.. |animation2.py| replace:: animation2.py
-.. _animation2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/animation2.py
-.. |animation2| image:: https://user-images.githubusercontent.com/32848391/64273191-1a258080-cf41-11e9-8a18-f192f05f11a9.gif
- :width: 300 px
- :target: animation2.py_
- :alt: animation2.py
-
-.. |polarHisto.py| replace:: polarHisto.py
-.. _polarHisto.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/polarHisto.py
-.. |polarHisto| image:: https://user-images.githubusercontent.com/32848391/64912717-5754f400-d733-11e9-8a1f-612165955f23.png
- :width: 300 px
- :target: polarHisto.py_
- :alt: polarHisto.py
-
-.. |histo_polar.py| replace:: histo_polar.py
-.. _histo_polar.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_polar.py
-.. |histo_polar| image:: https://user-images.githubusercontent.com/32848391/64992590-7fc82400-d8d4-11e9-9c10-795f4756a73f.png
- :width: 300 px
- :target: histo_polar.py_
- :alt: histo_polar.py
-
-.. |donut.py| replace:: donut.py
-.. _donut.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/donut.py
-.. |donut| image:: https://user-images.githubusercontent.com/32848391/64998178-6f6b7580-d8e3-11e9-9bd8-8dfb9ccd90e4.png
- :width: 300 px
- :target: donut.py_
- :alt: donut.py
-
-.. |extrude.py| replace:: extrude.py
-.. _extrude.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/extrude.py
-.. |extrude| image:: https://user-images.githubusercontent.com/32848391/65963682-971e1a00-e45b-11e9-9f29-05522ae4a800.png
- :width: 300 px
- :target: extrude.py_
- :alt: extrude.py
-
-.. |kspline| image:: https://user-images.githubusercontent.com/32848391/65975805-73fd6580-e46f-11e9-8957-75eddb28fa72.png
- :width: 300 px
-
-.. |mesh_lut.py| replace:: mesh_lut.py
-.. _mesh_lut.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_lut.py
-
-.. |elevation| image:: https://user-images.githubusercontent.com/32848391/68478872-3986a580-0231-11ea-8245-b68a683aa295.png
- :width: 300 px
-
-.. |paramshapes| image:: https://user-images.githubusercontent.com/32848391/69181075-bb6aae80-0b0e-11ea-92f7-d0cd3b9087bf.png
- :width: 300 px
-
-.. |warpto| image:: https://user-images.githubusercontent.com/32848391/69259878-3c817e80-0bbf-11ea-9025-03b9f6affccc.png
- :width: 300 px
-
-.. |linInterpolate.py| replace:: linInterpolate.py
-.. _linInterpolate.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/linInterpolate.py
-.. |linInterpolate| image:: https://user-images.githubusercontent.com/32848391/70559826-a621f680-1b87-11ea-89f3-e6b74d8953d9.png
- :width: 300 px
- :target: linInterpolate.py_
- :alt: linInterpolate.py
-
-.. |plot1_errbars.py| replace:: plot1_errbars.py
-.. _plot1_errbars.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot1_errbars.py
-.. |plot1_errbars| image:: https://user-images.githubusercontent.com/32848391/69158509-d6c1c380-0ae6-11ea-9dbf-ff5cd396a9a6.png
- :width: 300 px
- :target: plot1_errbars.py_
- :alt: plot1_errbars.py
-
-.. |quiver.py| replace:: quiver.py
-.. _quiver.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/quiver.py
-.. |quiver| image:: https://user-images.githubusercontent.com/32848391/72261438-199aa600-3615-11ea-870e-e44ca4c4b8d3.png
- :width: 300 px
- :target: quiver.py_
- :alt: quiver.py
-
-.. |plot5_spheric.py| replace:: plot5_spheric.py
-.. _plot5_spheric.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot5_spheric.py
-.. |plot5_spheric| image:: https://user-images.githubusercontent.com/32848391/72433091-f0a31e00-3798-11ea-86bd-6c522e23ec61.png
- :width: 300 px
- :target: plot5_spheric.py_
- :alt: plot5_spheric.py
-
-.. |fcomplex| image:: https://user-images.githubusercontent.com/32848391/73392962-1709a300-42db-11ea-9278-30c9d6e5eeaa.png
- :width: 300 px
-
-.. |histo_spheric.py| replace:: histo_spheric.py
-.. _histo_spheric.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_spheric.py
-.. |histo_spheric| image:: https://user-images.githubusercontent.com/32848391/73392901-fccfc500-42da-11ea-828a-9bad6982a823.png
- :width: 300 px
- :target: histo_spheric.py_
- :alt: histo_spheric.py
-
-.. |sphericgrid| image:: https://user-images.githubusercontent.com/32848391/72433092-f0a31e00-3798-11ea-85f7-b2f5fcc31568.png
- :width: 300 px
-
-.. |histo_2D.py| replace:: histo_2D.py
-.. _histo_2D.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_2D.py
-.. |histo_2D| image:: https://user-images.githubusercontent.com/32848391/74361190-c019c880-4dc6-11ea-9c72-0f2a890e6664.png
- :width: 300 px
- :target: histo_2D.py_
- :alt: histo_2D.py
-
-.. |plot2_errband.py| replace:: plot2_errband.py
-.. _plot2_errband.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot2_errband.py
-.. |plot2_errband| image:: https://user-images.githubusercontent.com/32848391/73483464-c019d180-439f-11ea-9a8c-59fa49e9ecf4.png
- :width: 300 px
- :target: plot2_errband.py_
- :alt: plot2_errband.py
-
-.. |plot3_pip.py| replace:: plot3_pip.py
-.. _plot3_pip.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot3_pip.py
-.. |plot3_pip| image:: https://user-images.githubusercontent.com/32848391/73393632-4ff64780-42dc-11ea-8798-45a81c067f45.png
- :width: 300 px
- :target: plot3_pip.py_
- :alt: plot3_pip.py
-
-.. |scatter1.py| replace:: scatter1.py
-.. _scatter1.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter1.py
-.. |scatter1| image:: https://user-images.githubusercontent.com/32848391/72615028-013bcb80-3934-11ea-8ab8-823f1916bc6c.png
- :width: 300 px
- :target: scatter1.py_
- :alt: scatter1.py
-
-.. |scatter2.py| replace:: scatter2.py
-.. _scatter2.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter2.py
-.. |scatter2| image:: https://user-images.githubusercontent.com/32848391/72446102-2d7c0e80-37b3-11ea-8fe4-b27526af574f.png
- :width: 300 px
- :target: scatter2.py_
- :alt: scatter2.py
-
-.. |customIndividualAxes.py| replace:: customIndividualAxes.py
-.. _customIndividualAxes.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/customIndividualAxes.py
-.. |customIndividualAxes| image:: https://user-images.githubusercontent.com/32848391/72752870-ab7d5280-3bc3-11ea-8911-9ace00211e23.png
- :target: customIndividualAxes.py_
- :alt: customIndividualAxes.py
-
-.. |plot7_stream.py| replace:: plot7_stream.py
-.. _plot7_stream.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot7_stream.py
-.. |plot7_stream| image:: https://user-images.githubusercontent.com/32848391/73614123-93162a80-45fc-11ea-969b-9a3293b26f35.png
- :target: plot7_stream.py_
- :alt: plot7_stream.py
-
-.. |simpleplot| image:: https://user-images.githubusercontent.com/32848391/74363882-c3638300-4dcb-11ea-8a78-eb492ad9711f.png
- :width: 300 px
-
-.. |warpv| image:: https://user-images.githubusercontent.com/32848391/77864546-7a577900-7229-11ea-84ce-4e8e6eeff27f.png
- :width: 300 px
-
-.. |lineage_graph.py| replace:: lineage_graph.py
-.. _lineage_graph.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/lineage_graph.py
-.. |lineage_graph| image:: https://user-images.githubusercontent.com/32848391/80291851-8152a800-8751-11ea-893e-4a0bb85397b1.png
- :width: 350 px
- :target: lineage_graph.py_
- :alt: lineage_graph.py
-
-.. |bezier| image:: https://user-images.githubusercontent.com/32848391/90437534-dafd2a80-e0d2-11ea-9b93-9ecb3f48a3ff.png
- :width: 300 px
-
-.. |goniometer.py| replace:: goniometer.py
-.. _goniometer.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/goniometer.py
-.. |goniometer| image:: https://user-images.githubusercontent.com/32848391/90437544-dd5f8480-e0d2-11ea-8321-b52d073444c4.png
- :width: 350 px
- :target: goniometer.py_
- :alt: goniometer.py
-
-.. |intersect2d.py| replace:: intersect2d.py
-.. _intersect2d.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/intersect2d.py
-.. |intersect2d| image:: https://user-images.githubusercontent.com/32848391/90437548-de90b180-e0d2-11ea-8e0c-d821db4da8a9.png
- :width: 350 px
- :target: intersect2d.py_
- :alt: intersect2d.py
-
-.. |fonts.py| replace:: fonts.py
-.. _fonts.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/fonts.py
-.. |fonts| image:: https://user-images.githubusercontent.com/32848391/90437539-dcc6ee00-e0d2-11ea-8381-93d211b1bc85.png
- :width: 350 px
- :target: fonts.py_
- :alt: fonts.py
-
-.. |graph_network.py| replace:: graph_network.py
-.. _graph_network.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/graph_network.py
-.. |graph_network| image:: https://user-images.githubusercontent.com/32848391/90437546-ddf81b00-e0d2-11ea-84d5-e4356a5c5f85.png
- :width: 350 px
- :target: graph_network.py_
- :alt: graph_network.py
-
-.. |plot_density3d.py| replace:: plot_density3d.py
-.. _plot_density3d.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot_density3d.py
-.. |plot_density3d| image:: https://user-images.githubusercontent.com/32848391/90437537-dc2e5780-e0d2-11ea-982c-8dafd467c3cd.png
- :width: 350 px
- :target: plot_density3d.py_
- :alt: plot_density3d.py
-
-.. |fonts3d| image:: https://user-images.githubusercontent.com/32848391/90437540-dd5f8480-e0d2-11ea-8ddc-8839688979d0.png
- :width: 350 px
-
-.. |fontlist| image:: https://user-images.githubusercontent.com/32848391/90437539-dcc6ee00-e0d2-11ea-8381-93d211b1bc85.png
- :width: 350 px
-
-.. |caption.py| replace:: captions.py
-.. _caption.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/caption.py
-.. |caption| image:: https://user-images.githubusercontent.com/32848391/90437536-dc2e5780-e0d2-11ea-8951-f905ffb54f54.png
- :width: 350 px
- :target: caption.py_
- :alt: caption.py
-
-.. |flag_labels.py| replace:: flag_labels.py
-.. _flag_labels.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/flag_labels.py
-.. |flag_labels| image:: https://user-images.githubusercontent.com/32848391/90620799-3b938100-e213-11ea-80b1-e05ce2949d3a.png
- :width: 350 px
- :target: flag_labels.py_
- :alt: flag_labels.py
-
-.. |whiskers.py| replace:: whiskers.py
-.. _whiskers.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/whiskers.py
-.. |whiskers| image:: https://user-images.githubusercontent.com/32848391/95772479-170cd000-0cbd-11eb-98c4-20c5ca342cb8.png
- :width: 350 px
- :target: whiskers.py_
- :alt: whiskers.py
-"""
+# _defs = """
+
+# .. |tutorial_spline| image:: https://user-images.githubusercontent.com/32848391/35976041-15781de8-0cdf-11e8-997f-aeb725bc33cc.png
+# :width: 300 px
+
+# .. |tutorial.py| replace:: tutorial.py
+# .. _tutorial.py: https://github.com/marcomusy/vedo/tree/master/examples/tutorial.py
+
+
+# .. |thinplate_grid.py| replace:: thinplate_grid.py
+# .. _thinplate_grid.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_grid.py
+# .. |thinplate_grid| image:: https://user-images.githubusercontent.com/32848391/51433540-d188b380-1c4c-11e9-81e7-a1cf4642c54b.png
+# :width: 300 px
+# :target: thinplate_grid.py_
+# :alt: thinplate_grid.py
+
+# .. |gyroscope2.py| replace:: gyroscope2.py
+# .. _gyroscope2.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope2.py
+# .. |gyroscope2| image:: https://user-images.githubusercontent.com/32848391/50738942-687b5780-11d9-11e9-97f0-72bbd63f7d6e.gif
+# :width: 300 px
+# :target: gyroscope2.py_
+# :alt: gyroscope2.py
+
+# .. |trail.py| replace:: trail.py
+# .. _trail.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/trail.py
+# .. |trail| image:: https://user-images.githubusercontent.com/32848391/58370826-4aee2680-7f0b-11e9-91e6-3120770cfede.gif
+# :width: 300 px
+# :target: trail.py_
+# :alt: trail.py
+
+# .. |fillholes.py| replace:: fillholes.py
+# .. _fillholes.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/fillholes.py
+
+# .. |quadratic_morphing.py| replace:: quadratic_morphing.py
+# .. _quadratic_morphing.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/quadratic_morphing.py
+# .. |quadratic_morphing| image:: https://user-images.githubusercontent.com/32848391/50738890-db380300-11d8-11e9-9cef-4c1276cca334.jpg
+# :width: 300 px
+# :target: quadratic_morphing.py_
+# :alt: quadratic_morphing.py
+
+# .. |align1.py| replace:: align1.py
+# .. _align1.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align1.py
+# .. |align1| image:: https://user-images.githubusercontent.com/32848391/50738875-c196bb80-11d8-11e9-8bdc-b80fd01a928d.jpg
+# :width: 300 px
+# :target: align1.py_
+# :alt: align1.py
+
+# .. |align2.py| replace:: align2.py
+# .. _align2.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align2.py
+# .. |align2| image:: https://user-images.githubusercontent.com/32848391/50738874-c196bb80-11d8-11e9-9587-2177d1680b70.jpg
+# :width: 300 px
+# :target: align2.py_
+# :alt: align2.py
+
+# .. |mirror.py| replace:: mirror.py
+# .. _mirror.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mirror.py
+# .. |mirror| image:: https://user-images.githubusercontent.com/32848391/50738855-bf346180-11d8-11e9-97a0-c9aaae6ce052.jpg
+# :target: mirror.py_
+# :alt: mirror.py
+
+# .. |shrink.py| replace:: shrink.py
+# .. _shrink.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/shrink.py
+# .. |shrink| image:: https://user-images.githubusercontent.com/32848391/46819143-41042280-cd83-11e8-9492-4f53679887fa.png
+# :width: 300 px
+# :target: shrink.py_
+# :alt: shrink.py
+
+# .. |aspring.py| replace:: aspring.py
+# .. _aspring.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/aspring.py
+# .. |aspring| image:: https://user-images.githubusercontent.com/32848391/36788885-e97e80ae-1c8f-11e8-8b8f-ffc43dad1eb1.gif
+# :width: 300 px
+# :target: aspring.py_
+# :alt: aspring.py
+
+# .. |delaunay2d.py| replace:: delaunay2d.py
+# .. _delaunay2d.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/delaunay2d.py
+# .. |delaunay2d| image:: https://user-images.githubusercontent.com/32848391/50738865-c0658e80-11d8-11e9-8616-b77363aa4695.jpg
+# :width: 300 px
+# :target: delaunay2d.py_
+# :alt: delaunay2d.py
+
+# .. |moving_least_squares1D.py| replace:: moving_least_squares1D.py
+# .. _moving_least_squares1D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares1D.py
+# .. |moving_least_squares1D| image:: https://user-images.githubusercontent.com/32848391/50738937-61544980-11d9-11e9-8be8-8826032b8baf.jpg
+# :width: 300 px
+# :target: moving_least_squares1D.py_
+# :alt: moving_least_squares1D.py
+
+# .. |recosurface.py| replace:: recosurface.py
+# .. _recosurface.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/recosurface.py
+# .. |recosurface| image:: https://user-images.githubusercontent.com/32848391/46817107-b3263880-cd7e-11e8-985d-f5d158992f0c.png
+# :target: recosurface.py_
+# :alt: recosurface.py
+
+# .. |fatlimb.py| replace:: fatlimb.py
+# .. _fatlimb.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fatlimb.py
+# .. |fatlimb| image:: https://user-images.githubusercontent.com/32848391/50738945-7335ec80-11d9-11e9-9d3f-c6c19df8f10d.jpg
+# :width: 300 px
+# :target: fatlimb.py_
+# :alt: fatlimb.py
+
+# .. |largestregion.py| replace:: largestregion.py
+# .. _largestregion.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/largestregion.py
+
+# .. |fitplanes.py| replace:: fitplanes.py
+# .. _fitplanes.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitplanes.py
+
+# .. |mesh_coloring.py| replace:: mesh_coloring.py
+# .. _mesh_coloring.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_coloring.py
+# .. |mesh_coloring| image:: https://user-images.githubusercontent.com/32848391/50738856-bf346180-11d8-11e9-909c-a3f9d32c4e8c.jpg
+# :width: 300 px
+# :target: mesh_coloring.py_
+# :alt: mesh_coloring.py
+
+# .. |mesh_alphas.py| replace:: mesh_alphas.py
+# .. _mesh_alphas.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_alphas.py
+# .. |mesh_alphas| image:: https://user-images.githubusercontent.com/32848391/50738857-bf346180-11d8-11e9-80a1-d283aed0b305.jpg
+# :width: 300 px
+# :target: mesh_alphas.py_
+# :alt: mesh_alphas.py
+
+# .. |mesh_custom.py| replace:: mesh_custom.py
+# .. _mesh_custom.py: https://github.com/marcomusy/vedo/tree/master/examples/mesh_custom.py
+# .. |mesh_custom| image:: https://user-images.githubusercontent.com/32848391/51390972-20d9c180-1b31-11e9-955d-025f1ef24cb7.png
+# :width: 300 px
+# :target: mesh_custom.py_
+# :alt: mesh_custom.py
+
+# .. |connVtx.py| replace:: connVtx.py
+# .. _connVtx.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/connVtx.py
+# .. |connVtx| image:: https://user-images.githubusercontent.com/32848391/51558919-ec436e00-1e80-11e9-91ac-0787c35fc20e.png
+# :width: 300 px
+# :target: connVtx.py_
+# :alt: connVtx.py
+
+# .. |spherical_harmonics1.py| replace:: spherical_harmonics1.py
+# .. _spherical_harmonics1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/spherical_harmonics1.py
+
+# .. |spherical_harmonics2.py| replace:: spherical_harmonics2.py
+# .. _spherical_harmonics2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/spherical_harmonics2.py
+
+# .. |skeletonize.py| replace:: skeletonize.py
+# .. _skeletonize.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/skeletonize.py
+# .. |skeletonize| image:: https://user-images.githubusercontent.com/32848391/46820954-c5f13b00-cd87-11e8-87aa-286528a09de8.png
+# :target: spherical_harmonics2.py_
+# :alt: skeletonize.py
+
+# .. |gyroscope1.py| replace:: gyroscope1.py
+# .. _gyroscope1.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope1.py
+# .. |gyroscope1| image:: https://user-images.githubusercontent.com/32848391/39766016-85c1c1d6-52e3-11e8-8575-d167b7ce5217.gif
+# :width: 300 px
+# :target: gyroscope1.py_
+# :alt: gyroscope1.py
+
+# .. |icon.py| replace:: icon.py
+# .. _icon.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/icon.py
+# .. |icon| image:: https://user-images.githubusercontent.com/32848391/50739009-2bfc2b80-11da-11e9-9e2e-a5e0e987a91a.jpg
+# :width: 300 px
+# :target: icon.py_
+
+# .. |lights.py| replace:: lights.py
+# .. _lights.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/lights.py
+# :width: 300 px
+# :target: lights.py_
+# :alt: lights.py
+
+# .. |lorenz.py| replace:: lorenz.py
+# .. _lorenz.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/lorenz.py
+# .. |lorenz| image:: https://user-images.githubusercontent.com/32848391/46818115-be7a6380-cd80-11e8-8ffb-60af2631bf71.png
+# :width: 300 px
+# :target: lorenz.py_
+# :alt: lorenz.py
+
+# .. |sliders1.py| replace:: sliders1.py
+# .. _sliders1.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders1.py
+# .. |sliders1| image:: https://user-images.githubusercontent.com/32848391/50738848-be033480-11d8-11e9-9b1a-c13105423a79.jpg
+# :width: 300 px
+# :target: sliders1.py_
+# :alt: sliders1.py
+
+# .. |sliders2.py| replace:: sliders2.py
+# .. _sliders2.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders2.py
+
+# .. |buttons.py| replace:: buttons.py
+# .. _buttons.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/buttons.py
+# .. |buttons| image:: https://user-images.githubusercontent.com/32848391/50738870-c0fe2500-11d8-11e9-9b78-92754f5c5968.jpg
+# :width: 300 px
+# :target: buttons.py_
+# :alt: buttons.py
+
+# .. |cutter.py| replace:: cutter.py
+# .. _cutter.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/cutter.py
+# .. |cutter| image:: https://user-images.githubusercontent.com/32848391/50738866-c0658e80-11d8-11e9-955b-551d4d8b0db5.jpg
+# :width: 300 px
+# :target: cutter.py_
+# :alt: cutter.py
+
+# .. |makeVideo.py| replace:: makeVideo.py
+# .. _makeVideo.py: https://github.com/marcomusy/vedo/tree/master/examples/other/makeVideo.py
+# .. |makeVideo| image:: https://user-images.githubusercontent.com/32848391/50739007-2bfc2b80-11da-11e9-97e6-620a3541a6fa.jpg
+# :width: 300 px
+# :target: makeVideo.py_
+# :alt: makeVideo.py
+
+# .. |fitspheres1.py| replace:: fitspheres1.py
+# .. _fitspheres1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitspheres1.py
+
+# .. |fitspheres2.py| replace:: fitspheres2.py
+# .. _fitspheres2.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/fitspheres2.py
+# .. |fitspheres2| image:: https://user-images.githubusercontent.com/32848391/50738943-687b5780-11d9-11e9-87a6-054e0fe76241.jpg
+# :width: 300 px
+# :target: fitspheres2.py_
+# :alt: fitspheres2.py
+
+# .. |plot4_fxy.py| replace:: plot4_fxy.py
+# .. _plot4_fxy.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot4_fxy.py
+# .. |plot4_fxy| image:: https://user-images.githubusercontent.com/32848391/36611824-fd524fac-18d4-11e8-8c76-d3d1b1bb3954.png
+# :width: 300 px
+# :target: plot4_fxy.py_
+# :alt: plot4_fxy.py
+
+# .. |histo_hexagonal.py| replace:: histo_hexagonal.py
+# .. _histo_hexagonal.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_hexagonal.py
+# .. |histo_hexagonal| image:: https://user-images.githubusercontent.com/32848391/72434748-b471bc80-379c-11ea-95d7-d70333770582.png
+# :width: 300 px
+# :target: histo_hexagonal.py_
+# :alt: histo_hexagonal.py
+
+# .. |histo_1D.py| replace:: histo_1D.py
+# .. _histo_1D.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_1D.py
+# .. |histo_1D| image:: https://user-images.githubusercontent.com/32848391/68141260-77cc4e00-ff2d-11e9-9280-0efc5b87314d.png
+# :width: 300 px
+# :target: histo_1D.py_
+# :alt: histo_1D.py
+
+# .. |histo_violin.py| replace:: histo_violin.py
+# .. _histo_violin.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_violin.py
+# .. |histo_violin| image:: https://user-images.githubusercontent.com/32848391/73481240-b55d3d80-439b-11ea-89a4-6c35ecc84b0d.png
+# :width: 300 px
+# :target: histo_violin.py_
+# :alt: histo_violin.py
+
+
+# .. |align3.py| replace:: align3.py
+# .. _align3.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/align3.py
+# .. |align3| image:: https://user-images.githubusercontent.com/32848391/50738873-c196bb80-11d8-11e9-8653-a41108a5f02d.png
+# :width: 300 px
+# :target: align3.py_
+# :alt: align3.py
+
+# .. |pca.py| replace:: pca.py
+# .. _pca.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/pca.py
+# .. |pca| image:: https://user-images.githubusercontent.com/32848391/50738852-be9bcb00-11d8-11e9-8ac8-ad9278d9cee0.jpg
+# :width: 300 px
+# :target: pca.py_
+# :alt: pca.py
+
+# .. |cell_colony.py| replace:: cell_colony.py
+# .. _cell_colony.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/cell_colony.py
+# .. |cell_colony| image:: https://user-images.githubusercontent.com/32848391/50738947-7335ec80-11d9-11e9-9a45-6053b4eaf9f9.jpg
+# :width: 300 px
+# :target: cell_colony.py_
+# :alt: cell_colony.py
+
+# .. |mesh_smoother1.py| replace:: mesh_smoother1.py
+# .. _mesh_smoother1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/mesh_smoother1.py
+# .. |mesh_smoother1| image:: https://user-images.githubusercontent.com/32848391/50738939-67e2c100-11d9-11e9-90cb-716ff3f03f67.jpg
+# :width: 300 px
+# :target: mesh_smoother1.py_
+# :alt: mesh_smoother1.py
+
+# .. |moving_least_squares3D.py| replace:: moving_least_squares3D.py
+# .. _moving_least_squares3D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares3D.py
+# .. |moving_least_squares3D| image:: https://user-images.githubusercontent.com/32848391/50738935-61544980-11d9-11e9-9c20-f2ce944d2238.jpg
+# :width: 300 px
+# :target: moving_least_squares3D.py_
+# :alt: moving_least_squares3D.py
+
+# .. |moving_least_squares2D.py| replace:: moving_least_squares2D.py
+# .. _moving_least_squares2D.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/moving_least_squares2D.py
+# .. |moving_least_squares2D| image:: https://user-images.githubusercontent.com/32848391/50738936-61544980-11d9-11e9-9efb-e2a923762b72.jpg
+# :width: 300 px
+# :target: moving_least_squares2D.py_
+# :alt: moving_least_squares2D.py
+
+# .. |boolean.py| replace:: boolean.py
+# .. _boolean.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/boolean.py
+# .. |boolean| image:: https://user-images.githubusercontent.com/32848391/50738871-c0fe2500-11d8-11e9-8812-442b69be6db9.png
+# :width: 300 px
+# :target: boolean.py_
+# :alt: boolean.py
+
+# .. |surfIntersect.py| replace:: surfIntersect.py
+# .. _surfIntersect.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/surfIntersect.py
+
+# .. |probeLine1.py| replace:: probeLine1.py
+# .. _probeLine1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/probeLine1.py
+# .. |probeLine1| image:: https://user-images.githubusercontent.com/32848391/48198460-3aa0a080-e359-11e8-982d-23fadf4de66f.jpg
+# :width: 300 px
+# :target: probeLine1.py_
+# :alt: probeLine1.py
+
+# .. |probeLine2.py| replace:: probeLine2.py
+# .. _probeLine2.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/probeLine2.py
+
+# .. |slicePlane.py| replace:: slicePlane.py
+# .. _slicePlane.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/slicePlane.py
+# .. |slicePlane| image:: https://user-images.githubusercontent.com/32848391/48198461-3aa0a080-e359-11e8-8c29-18f287f105e6.jpg
+# :width: 300 px
+# :target: slicePlane.py_
+# :alt: slicePlane.py
+
+# .. |volumeOperations.py| replace:: volumeOperations.py
+# .. _volumeOperations.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/volumeOperations.py
+# .. |volumeOperations| image:: https://user-images.githubusercontent.com/32848391/48198940-d1ba2800-e35a-11e8-96a7-ffbff797f165.jpg
+# :width: 300 px
+# :alt: volumeOperations.py
+
+# .. |clustering.py| replace:: clustering.py
+# .. _clustering.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/clustering.py
+# .. |clustering| image:: https://user-images.githubusercontent.com/32848391/46817286-2039ce00-cd7f-11e8-8b29-42925e03c974.png
+# :width: 300 px
+# :target: clustering.py_
+# :alt: clustering.py
+
+# .. |thinplate_morphing1.py| replace:: thinplate_morphing1.py
+# .. _thinplate_morphing1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing1.py
+# .. |thinplate_morphing1| image:: https://user-images.githubusercontent.com/32848391/51403917-34495480-1b52-11e9-956c-918c7805a9b5.png
+# :width: 300 px
+# :target: thinplate_morphing1.py_
+# :alt: thinplate_morphing1.py
+
+# .. |colorcubes.py| replace:: colorcubes.py
+# .. _colorcubes.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/colorcubes.py
+# .. |colorcubes| image:: https://user-images.githubusercontent.com/32848391/50738867-c0658e80-11d8-11e9-9e05-ac69b546b7ec.png
+# :width: 300 px
+# :target: colorcubes.py_
+# :alt: colorcubes.py
+
+# .. |colorpalette.py| replace:: colorpalette.py
+# .. _colorpalette.py: https://github.com/marcomusy/vedo/tree/master/examples/other/colorpalette.py
+# .. |colorpalette| image:: https://user-images.githubusercontent.com/32848391/50739011-2c94c200-11da-11e9-8f36-ede1b2a014a8.jpg
+# :width: 300 px
+# :target: colorpalette.py
+# :alt: colorpalette.py
+
+# .. |colormaps| image:: https://user-images.githubusercontent.com/32848391/50738804-577e1680-11d8-11e9-929e-fca17a8ac6f3.jpg
+# :width: 450 px
+# :alt: colormaps
+
+# .. |tannerhelland| replace:: tannerhelland
+# .. _tannerhelland: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code
+
+# .. |colorprint.py| replace:: printc.py
+# .. _colorprint.py: https://github.com/marcomusy/vedo/tree/master/examples/other/printc.py
+# .. |colorprint| image:: https://user-images.githubusercontent.com/32848391/50739010-2bfc2b80-11da-11e9-94de-011e50a86e61.jpg
+# :target: colorprint.py_
+# :alt: colorprint.py
+
+# .. |ribbon.py| replace:: ribbon.py
+# .. _ribbon.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/ribbon.py
+# .. |ribbon| image:: https://user-images.githubusercontent.com/32848391/50738851-be9bcb00-11d8-11e9-80ee-bd73c1c29c06.jpg
+# :width: 300 px
+# :target: ribbon.py_
+# :alt: ribbon.py
+
+# .. |manyspheres.py| replace:: manyspheres.py
+# .. _manyspheres.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/manyspheres.py
+# .. |manyspheres| image:: https://user-images.githubusercontent.com/32848391/46818673-1f566b80-cd82-11e8-9a61-be6a56160f1c.png
+# :target: manyspheres.py_
+
+# .. |manypoints.py| replace:: manypoints.py
+# .. _manypoints.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/manypoints.py
+
+# .. |earth.py| replace:: earth.py
+# .. _earth.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/earth.py
+# .. |earth| image:: https://user-images.githubusercontent.com/32848391/51031592-5a448700-159d-11e9-9b66-bee6abb18679.png
+# :width: 300 px
+# :target: earth.py_
+# :alt: earth.py
+
+# .. |brownian2D.py| replace:: brownian2D.py
+# .. _brownian2D.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/brownian2D.py
+# .. |brownian2D| image:: https://user-images.githubusercontent.com/32848391/50738948-73ce8300-11d9-11e9-8ef6-fc4f64c4a9ce.gif
+# :width: 300 px
+# :target: brownian2D.py_
+
+# .. |gas.py| replace:: gas.py
+# .. _gas.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gas.py
+# .. |gas| image:: https://user-images.githubusercontent.com/32848391/50738954-7e891800-11d9-11e9-95aa-67c92ca6476b.gif
+# :width: 300 px
+# :target: gas.py_
+# :alt: gas.py
+
+# .. |tube.py| replace:: tube.py
+# .. _tube.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/tube.py
+# .. |tube| image:: https://user-images.githubusercontent.com/32848391/51801626-adc30000-2240-11e9-8866-9d9d5d8790ab.png
+# :width: 300 px
+# :target: tube.py_
+# :alt: tube.py
+
+# .. |mesh_threshold.py| replace:: mesh_threshold.py
+# .. _mesh_threshold.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_threshold.py
+# .. |mesh_threshold| image:: https://user-images.githubusercontent.com/32848391/51807663-4762cf80-228a-11e9-9d0c-184bb11a97bf.png
+# :width: 300 px
+# :target: mesh_threshold.py_
+# :alt: mesh_threshold.py
+
+# .. |cutWithMesh.py| replace:: cutWithMesh.py
+# .. _cutWithMesh.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/cutWithMesh.py
+# .. |cutWithMesh| image:: https://user-images.githubusercontent.com/32848391/51808907-e7c0f000-229a-11e9-98a7-fefc7261b3c3.png
+# :width: 300 px
+# :target: cutWithMesh.py_
+# :alt: cutWithMesh.py
+
+# .. |paraboloid| image:: https://user-images.githubusercontent.com/32848391/51211547-260ef480-1916-11e9-95f6-4a677e37e355.png
+# :width: 300 px
+# :alt: paraboloid
+
+# .. |isosurfaces.py| replace:: isosurfaces.py
+# .. _isosurfaces.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/isosurfaces.py
+# .. |isosurfaces| image:: https://user-images.githubusercontent.com/32848391/51558920-ec436e00-1e80-11e9-9d96-aa9b7c72d58b.png
+# :width: 300 px
+# :target: isosurfaces.py_
+# :alt: isosurfaces.py
+
+# .. |meshquality.py| replace:: meshquality.py
+# .. _meshquality.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/meshquality.py
+# .. |meshquality| image:: https://user-images.githubusercontent.com/32848391/51831269-fb4b7580-22f1-11e9-81ea-13467a5649ca.png
+# :width: 300 px
+# :target: meshquality.py_
+# :alt: meshquality.py
+
+# .. |geodesic.py| replace:: geodesic.py
+# .. _geodesic.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/geodesic.py
+# .. |geodesic| image:: https://user-images.githubusercontent.com/32848391/51855637-015f4780-232e-11e9-92ca-053a558e7f70.png
+# :width: 300 px
+# :target: geodesic.py_
+# :alt: geodesic.py
+
+
+# .. |cutAndCap.py| replace:: cutAndCap.py
+# .. _cutAndCap.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/cutAndCap.py
+# .. |cutAndCap| image:: https://user-images.githubusercontent.com/32848391/51930515-16ee7300-23fb-11e9-91af-2b6b3d626246.png
+# :width: 300 px
+# :target: cutAndCap.py_
+# :alt: cutAndCap.py
+
+
+# .. |convexHull.py| replace:: convexHull.py
+# .. _convexHull.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/convexHull.py
+# .. |convexHull| image:: https://user-images.githubusercontent.com/32848391/51932732-068cc700-2400-11e9-9b68-30294a4fa4e3.png
+# :width: 300 px
+# :target: convexHull.py_
+# :alt: convexHull.py
+
+# .. |curvature| image:: https://user-images.githubusercontent.com/32848391/51934810-c2e88c00-2404-11e9-8e7e-ca0b7984bbb7.png
+# :alt: curvature
+
+# .. |progbar| image:: https://user-images.githubusercontent.com/32848391/51858823-ed1f4880-2335-11e9-8788-2d102ace2578.png
+# :alt: progressbar
+
+# .. |multiwindows| image:: https://user-images.githubusercontent.com/32848391/50738853-be9bcb00-11d8-11e9-9c8e-69864ad7c045.jpg
+# :alt: multiwindows
+
+# .. |annotations.py| replace:: annotations.py
+# .. _annotations.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/annotations.py
+
+# .. |Cone| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestCone.png
+# :width: 300 px
+
+# .. |Cylinder| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestCylinder.png
+# :width: 300 px
+
+# .. |Disk| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestDisk.png
+# :width: 300 px
+
+# .. |OrientedArrow| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestOrientedArrow.png
+# :width: 300 px
+
+# .. |Plane| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestPlane.png
+# :width: 300 px
+
+# .. |Polygon| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestRegularPolygonSource.png
+# :width: 300 px
+
+# .. |Sphere| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/GeometricObjects/TestSphere.png
+# :width: 300 px
+
+
+# .. |embryoslider| image:: https://user-images.githubusercontent.com/32848391/52141624-975ce000-2656-11e9-8d31-2a3c92ab79d6.png
+# :width: 300 px
+
+# .. |isosurfaces1| image:: https://user-images.githubusercontent.com/32848391/52141625-975ce000-2656-11e9-91fc-291e072fc4c1.png
+# :width: 300 px
+
+# .. |splitmesh.py| replace:: splitmesh.py
+# .. _splitmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/splitmesh.py
+# .. |splitmesh| image:: https://user-images.githubusercontent.com/32848391/52141626-97f57680-2656-11e9-80ea-fcd3571a6422.png
+# :width: 300 px
+# :target: splitmesh.py_
+# :alt: splitmesh.py
+
+# .. |thinplate_morphing2.py| replace:: thinplate_morphing2.py
+# .. _thinplate_morphing2.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing2.py
+# .. |thinplate_morphing2| image:: https://user-images.githubusercontent.com/32848391/52142303-9927a300-2658-11e9-98db-ebad4883f99f.png
+# :width: 300 px
+# :target: thinplate_morphing2.py_
+# :alt: thinplate_morphing2.py
+
+# .. |projectsphere.py| replace:: projectsphere.py
+# .. _projectsphere.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/projectsphere.py
+# .. |projectsphere| image:: https://user-images.githubusercontent.com/32848391/52144163-c9be0b80-265d-11e9-9ce6-d6f2b919c214.png
+# :width: 300 px
+# :target: projectsphere.py_
+# :alt: projectsphere.py
+
+
+# .. |mesh2volume.py| replace:: mesh2volume.py
+# .. _mesh2volume.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/mesh2volume.py
+# .. |mesh2volume| image:: https://user-images.githubusercontent.com/32848391/52168902-5638fe80-2730-11e9-8033-8e470a3d4f0f.jpg
+# :width: 300 px
+# :target: mesh2volume.py_
+# :alt: mesh2volume.py
+
+# .. |markpoint.py| replace:: markpoint.py
+# .. _markpoint.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/markpoint.py
+# .. |markpoint| image:: https://user-images.githubusercontent.com/32848391/52169969-1fb7af80-2741-11e9-937f-5c331d9a1d11.jpg
+# :width: 300 px
+# :target: markpoint.py_
+# :alt: markpoint.py
+
+# .. |readVolumeAsIsoSurface.py| replace:: readVolumeAsIsoSurface.py
+# .. _readVolumeAsIsoSurface.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/readVolumeAsIsoSurface.py
+
+# .. |read_vti.py| replace:: read_vti.py
+# .. _read_vti.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/read_vti.py
+# .. |read_vti| image:: https://user-images.githubusercontent.com/32848391/50739036-6bc31300-11da-11e9-89b3-04a75187f812.jpg
+# :width: 300 px
+# :target: read_vti.py_
+# :alt: read_vti.py
+
+# .. |glyphs.py| replace:: glyphs.py
+# .. _glyphs.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/glyphs.py
+# .. |glyphs| image:: https://user-images.githubusercontent.com/32848391/52233403-47cd1d00-28bf-11e9-86b0-cbceebbde0de.jpg
+# :width: 300 px
+# :target: glyphs.py_
+# :alt: glyphs.py
+
+# .. |glyphs_arrows.py| replace:: glyphs_arrows.py
+# .. _glyphs_arrows.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/glyphs_arrows.py
+# .. |glyphs_arrows| image:: https://user-images.githubusercontent.com/32848391/55897850-a1a0da80-5bc1-11e9-81e0-004c8f396b43.jpg
+# :width: 300 px
+# :target: glyphs_arrows.py_
+# :alt: glyphs_arrows.py
+
+# .. |interpolateField.py| replace:: interpolateField.py
+# .. _interpolateField.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/interpolateField.py
+# .. |interpolateField| image:: https://user-images.githubusercontent.com/32848391/52416117-25b6e300-2ae9-11e9-8d86-575b97e543c0.png
+# :width: 300 px
+# :target: interpolateField.py_
+# :alt: interpolateField.py
+
+# .. |rotateImage.py| replace:: rotateImage.py
+# .. _rotateImage.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/rotateImage.py
+# .. |rotateImage| image:: https://user-images.githubusercontent.com/32848391/52416910-fb662500-2aea-11e9-88ba-9c73128e8666.jpg
+# :width: 300 px
+# :target: rotateImage.py_
+# :alt: rotateImage.py
+
+# .. |basicshapes| image:: https://user-images.githubusercontent.com/32848391/50738811-58af4380-11d8-11e9-9bfb-378c27c9d26f.png
+# :alt: basicshapes
+
+# .. |lines| image:: https://user-images.githubusercontent.com/32848391/52503049-ac9cb600-2be4-11e9-86af-72a538af14ef.png
+# :width: 300 px
+# :alt: lines
+
+# .. |vlogo_large| image:: https://user-images.githubusercontent.com/32848391/52522716-4fa70b80-2c89-11e9-92a7-0d22cbe34758.png
+# :alt: vlogo_large
+
+# .. |vlogo_medium| image:: https://user-images.githubusercontent.com/32848391/52522717-503fa200-2c89-11e9-87ab-67eb44652e24.png
+# :alt: vlogo_medium
+
+# .. |vlogo_small| image:: https://user-images.githubusercontent.com/32848391/52522718-50d83880-2c89-11e9-80ff-df1b5618a84a.png
+# :alt: vlogo_small
+
+# .. |vlogo_small_dark| image:: https://user-images.githubusercontent.com/32848391/52522719-50d83880-2c89-11e9-8b90-a1c21c27b007.png
+# :alt: vlogo_small_dark
+
+# .. |vlogo_tube| image:: https://user-images.githubusercontent.com/32848391/52522720-5170cf00-2c89-11e9-8b1d-a7a5cf75e71b.png
+# :alt: vlogo_tube
+
+# .. |vlogo_tube_dark| image:: https://user-images.githubusercontent.com/32848391/52522721-5170cf00-2c89-11e9-8fbb-6efa13940aa1.png
+# :alt: vlogo_tube_dark
+
+# .. |fitline.py| replace:: fitline.py
+# .. _fitline.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/fitline.py
+# .. |fitline| image:: https://user-images.githubusercontent.com/32848391/50738864-c0658e80-11d8-11e9-8754-c670f1f331d6.jpg
+# :width: 300 px
+# :target: fitline.py_
+# :alt: fitline.py
+
+# .. |sliders3d.py| replace:: sliders3d.py
+# .. _sliders3d.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/sliders3d.py
+# .. |sliders3d| image:: https://user-images.githubusercontent.com/32848391/52859555-4efcf200-312d-11e9-9290-6988c8295163.png
+# :width: 300 px
+# :target: sliders3d.py_
+# :alt: sliders3d.py
+
+# .. |ex01_showmesh.py| replace:: ex01_showmesh.py
+# .. _ex01_showmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex01_show-mesh.py
+# .. |ex01_showmesh| image:: https://user-images.githubusercontent.com/32848391/53026243-d2d31900-3462-11e9-9dde-518218c241b6.jpg
+# :width: 300 px
+# :target: ex01_showmesh.py_
+# :alt: ex01_showmesh.py
+
+# .. |ex02_tetralize-mesh.py| replace:: ex02_tetralize-mesh.py
+# .. _ex02_tetralize-mesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex02_tetralize-mesh.py
+# .. |ex02_tetralize-mesh| image:: https://user-images.githubusercontent.com/32848391/53026244-d2d31900-3462-11e9-835a-1fa9d66d3dae.png
+# :width: 300 px
+# :target: ex02_tetralize-mesh.py_
+# :alt: ex02_tetralize-mesh.py
+
+# .. |ex06_elasticity1.py| replace:: ex06_elasticity1.py
+# .. _ex06_elasticity1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex06_elasticity1.py
+# .. |ex06_elasticity1| image:: https://user-images.githubusercontent.com/32848391/53026245-d2d31900-3462-11e9-9db4-96211569d114.jpg
+# :width: 300 px
+# :target: ex06_elasticity1.py_
+# :alt: ex06_elasticity1.py
+
+# .. |ex06_elasticity2.py| replace:: ex06_elasticity2.py
+# .. _ex06_elasticity2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex06_elasticity2.py
+# .. |ex06_elasticity2| image:: https://user-images.githubusercontent.com/32848391/53026246-d36baf80-3462-11e9-96a5-8eaf0bb0f9a4.jpg
+# :width: 300 px
+# :target: ex06_elasticity2.py_
+# :alt: ex06_elasticity2.py
+
+
+# .. |flatarrow.py| replace:: flatarrow.py
+# .. _flatarrow.py: https://github.com/marcomusy/vedo/tree/master/examples/other/basic/flatarrow.py
+# .. |flatarrow| image:: https://user-images.githubusercontent.com/32848391/54612632-97c00780-4a59-11e9-8532-940c25a5dfd8.png
+# :width: 300 px
+# :target: flatarrow.py_
+# :alt: flatarrow.py
+
+# .. |printhisto| image:: https://user-images.githubusercontent.com/32848391/55073046-03732780-508d-11e9-9bf9-c5de8631dd73.png
+# :width: 300 px
+
+# .. |distance2mesh.py| replace:: distance2mesh.py
+# .. _distance2mesh.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/distance2mesh.py
+# .. |distance2mesh| image:: https://user-images.githubusercontent.com/32848391/55965881-b5a71380-5c77-11e9-8680-5bddceab813a.png
+# :width: 300 px
+# :target: distance2mesh.py_
+# :alt: distance2mesh.py
+
+# .. |pendulum.py| replace:: pendulum.py
+# .. _pendulum.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/pendulum.py
+# .. |pendulum| image:: https://user-images.githubusercontent.com/32848391/55420020-51e56200-5576-11e9-8513-4a5d93913b17.png
+# :width: 300 px
+# :target: pendulum.py_
+# :alt: pendulum.py
+
+# .. |latex.py| replace:: latex.py
+# .. _latex.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/latex.py
+# .. |latex| image:: https://user-images.githubusercontent.com/32848391/55568648-6190b200-5700-11e9-9547-0798c588a7a5.png
+# :width: 300 px
+# :target: latex.py_
+# :alt: latex.py
+
+# .. |ft04_heat_gaussian.py| replace:: ft04_heat_gaussian.py
+# .. _ft04_heat_gaussian.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ft04_heat_gaussian.py
+# .. |ft04_heat_gaussian| image:: https://user-images.githubusercontent.com/32848391/55578167-88a5ae80-5715-11e9-84ea-bdab54099887.gif
+# :width: 300 px
+# :target: ft04_heat_gaussian.py_
+# :alt: ft04_heat_gaussian.py
+
+# .. |cutcube| image:: https://user-images.githubusercontent.com/32848391/55965516-08cc9680-5c77-11e9-8d23-720f6c088ea2.png
+# :width: 200 px
+
+# .. |intline| image:: https://user-images.githubusercontent.com/32848391/55967065-eee08300-5c79-11e9-8933-265e1bab9f7e.png
+# :width: 300 px
+
+# .. |cropped| image:: https://user-images.githubusercontent.com/32848391/57081955-0ef1e800-6cf6-11e9-99de-b45220939bc9.png
+# :width: 300 px
+
+# .. |dolfinmesh| image:: https://user-images.githubusercontent.com/32848391/53026243-d2d31900-3462-11e9-9dde-518218c241b6.jpg
+# :width: 300 px
+
+# .. |turing_pattern.py| replace:: turing_pattern.py
+# .. _turing_pattern.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/turing_pattern.py
+# .. |turing_pattern| image:: https://user-images.githubusercontent.com/32848391/56056437-77cfeb00-5d5c-11e9-9887-828e5745d547.gif
+# :width: 300 px
+# :target: turing_pattern.py_
+# :alt: turing_pattern.py
+
+# .. |demo_cahn-hilliard.py| replace:: demo_cahn-hilliard.py
+# .. _demo_cahn-hilliard.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/demo_cahn-hilliard.py
+# .. |demo_cahn-hilliard| image:: https://user-images.githubusercontent.com/32848391/56664730-edb34b00-66a8-11e9-9bf3-73431f2a98ac.gif
+# :width: 300 px
+# :target: demo_cahn-hilliard.py_
+# :alt: demo_cahn-hilliard.py
+
+
+# .. |navier-stokes_lshape.py| replace:: navier-stokes_lshape.py
+# .. _navier-stokes_lshape.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/navier-stokes_lshape.py
+# .. |navier-stokes_lshape| image:: https://user-images.githubusercontent.com/32848391/56671156-6bc91f00-66b4-11e9-8c58-e6b71e2ad1d0.gif
+# :width: 300 px
+# :target: navier-stokes_lshape.py_
+# :alt: navier-stokes_lshape.py
+
+
+# .. |mesh_map2cell.py| replace:: mesh_map2cell.py
+# .. _mesh_map2cell.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_map2cell.py
+# .. |mesh_map2cell| image:: https://user-images.githubusercontent.com/32848391/56600859-0153a880-65fa-11e9-88be-34fd96b18e9a.png
+# :width: 300 px
+# :target: mesh_map2cell.py_
+# :alt: mesh_map2cell.py
+
+
+# .. |ex03_poisson.py| replace:: ex03_poisson.py
+# .. _ex03_poisson.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ex03_poisson.py
+# .. |ex03_poisson| image:: https://user-images.githubusercontent.com/32848391/54925524-bec18200-4f0e-11e9-9eab-29fd61ef3b8e.png
+# :width: 300 px
+# :target: ex03_poisson.py_
+# :alt: ex03_poisson.py
+
+# .. |elastodynamics.py| replace:: elastodynamics.py
+# .. _elastodynamics.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elastodynamics.py
+# .. |elastodynamics| image:: https://user-images.githubusercontent.com/32848391/54932788-bd4a8680-4f1b-11e9-9326-33645171a45e.gif
+# :width: 300 px
+# :target: elastodynamics.py_
+# :alt: elastodynamics.py
+
+# .. |ft02_poisson_membrane.py| replace:: ft02_poisson_membrane.py
+# .. _ft02_poisson_membrane.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/ft02_poisson_membrane.py
+# .. |ft02_poisson_membrane| image:: https://user-images.githubusercontent.com/32848391/55499287-ed91d380-5645-11e9-8e9a-e31e2e3b1649.jpg
+# :width: 300 px
+# :target: ft02_poisson_membrane.py_
+# :alt: ft02_poisson_membrane.py
+
+
+# .. |stokes.py| replace:: stokes.py
+# .. _stokes.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py
+# .. |stokes| image:: https://user-images.githubusercontent.com/32848391/55098209-aba0e480-50bd-11e9-8842-42d3f0b2d9c8.png
+# :width: 300 px
+# :target: stokes.py_
+# :alt: stokes.py
+
+# .. |stokes1.py| replace:: stokes1.py
+# .. _stokes1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/stokes.py
+# .. |stokes1| image:: https://user-images.githubusercontent.com/32848391/56986911-6116fa00-6b8c-11e9-83f5-5b4efe430c0c.jpg
+# :width: 300 px
+# :target: stokes1.py_
+# :alt: stokes1.py
+
+# .. |demo_submesh.py| replace:: demo_submesh.py
+# .. _demo_submesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/demo_submesh.py
+# .. |demo_submesh| image:: https://user-images.githubusercontent.com/32848391/56675428-4e984e80-66bc-11e9-90b0-43dde7e4cc29.png
+# :width: 300 px
+# :target: demo_submesh.py_
+# :alt: demo_submesh.py
+
+# .. |pi_estimate.py| replace:: pi_estimate.py
+# .. _pi_estimate.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/pi_estimate.py
+# .. |pi_estimate| image:: https://user-images.githubusercontent.com/32848391/56675429-4e984e80-66bc-11e9-9217-a0652a8e74fe.png
+# :width: 300 px
+# :target: pi_estimate.py_
+# :alt: pi_estimate.py
+
+# .. |isolines.py| replace:: isolines.py
+# .. _isolines.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/isolines.py
+# .. |isolines| image:: https://user-images.githubusercontent.com/32848391/72433087-f00a8780-3798-11ea-9778-991f0abeca70.png
+# :width: 300 px
+# :target: isolines.py_
+# :alt: isolines.py
+
+# .. |inset.py| replace:: inset.py
+# .. _inset.py: https://github.com/marcomusy/vedo/tree/master/examples/other/inset.py
+# .. |inset| image:: https://user-images.githubusercontent.com/32848391/56758560-3c3f1300-6797-11e9-9b33-49f5a4876039.jpg
+# :width: 300 px
+# :target: inset.py_
+# :alt: inset.py
+
+# .. |legosurface.py| replace:: legosurface.py
+# .. _legosurface.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/legosurface.py
+# .. |legosurface| image:: https://user-images.githubusercontent.com/32848391/56820682-da40e500-684c-11e9-8ea3-91cbcba24b3a.png
+# :width: 300 px
+# :target: legosurface.py_
+# :alt: legosurface.py
+
+
+# .. |streamribbons.py| replace:: streamribbons.py
+# .. _streamribbons.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamribbons.py
+# .. |streamribbons| image:: https://user-images.githubusercontent.com/32848391/56963999-9145a500-6b5a-11e9-9461-0037c471faab.png
+# :width: 300 px
+# :target: streamribbons.py_
+# :alt: streamribbons.py
+
+
+# .. |streamlines1.py| replace:: streamlines1.py
+# .. _streamlines1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamlines1.py
+# .. |streamlines1| image:: https://user-images.githubusercontent.com/32848391/56964002-9145a500-6b5a-11e9-9e3f-da712609d896.png
+# :width: 300 px
+# :target: streamlines1.py_
+# :alt: streamlines1.py
+
+# .. |streamlines2.py| replace:: streamlines2.py
+# .. _streamlines2.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/streamlines2.py
+# .. |streamlines2| image:: https://user-images.githubusercontent.com/32848391/56964001-9145a500-6b5a-11e9-935b-1b2425bd7dd2.png
+# :width: 300 px
+# :target: streamlines2.py_
+# :alt: streamlines2.py
+
+# .. |office.py| replace:: office.py
+# .. _office.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/office.py
+# .. |office| image:: https://user-images.githubusercontent.com/32848391/56964003-9145a500-6b5a-11e9-9d9e-9736d90e1900.png
+# :width: 300 px
+# :target: office.py_
+# :alt: office.py
+
+# .. |value-iteration.py| replace:: value-iteration.py
+# .. _value-iteration.py: https://github.com/marcomusy/vedo/tree/master/examples/other/value-iteration.py
+# .. |value-iteration| image:: https://user-images.githubusercontent.com/32848391/56964055-afaba080-6b5a-11e9-99cf-3fac99df9878.jpg
+# :width: 300 px
+# :target: value-iteration.py_
+# :alt: value-iteration.py
+
+# .. |magnetostatics.py| replace:: magnetostatics.py
+# .. _magnetostatics.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/magnetostatics.py
+# .. |magnetostatics| image:: https://user-images.githubusercontent.com/32848391/56985162-fb287380-6b87-11e9-9cf9-045bd08c3b9b.jpg
+# :width: 300 px
+# :target: magnetostatics.py_
+# :alt: magnetostatics.py
+
+# .. |export_x3d.py| replace:: export_x3d.py
+# .. _export_x3d.py: https://github.com/marcomusy/vedo/tree/master/examples/other/export_x3d.py
+# .. |export_x3d| image:: https://user-images.githubusercontent.com/32848391/57160341-c6ffbd80-6de8-11e9-95ff-7215ce642bc5.jpg
+# :width: 300 px
+# :target: export_x3d.py_
+# :alt: export_x3d.py
+
+
+# .. |silhouette.py| replace:: silhouette.py
+# .. _silhouette.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/silhouette.py
+# .. |silhouette| image:: https://user-images.githubusercontent.com/32848391/57179369-8e5df380-6e7d-11e9-99b4-3b1a120dd375.png
+# :width: 300 px
+# :target: silhouette.py_
+# :alt: silhouette.py
+
+# .. |shadow.py| replace:: shadow.py
+# .. _shadow.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/shadow.py
+# .. |shadow| image:: https://user-images.githubusercontent.com/32848391/57312574-1d714280-70ee-11e9-8741-04fc5386d692.png
+# :width: 300 px
+# :target: shadow.py_
+# :alt: shadow.py
+
+# .. |airplanes.py| replace:: airplanes.py
+# .. _airplanes.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/.py
+# .. |airplanes| image:: https://user-images.githubusercontent.com/32848391/57341963-b8910900-713c-11e9-898a-84b6d3712bce.gif
+# :width: 300 px
+# :target: airplanes.py_
+# :alt: airplanes.py
+
+
+# .. |heatconv.py| replace:: heatconv.py
+# .. _heatconv.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/heatconv.py
+# .. |heatconv| image:: https://user-images.githubusercontent.com/32848391/57455107-b200af80-726a-11e9-897d-9c7bcb9854ac.gif
+# :width: 300 px
+# :target: heatconv.py_
+# :alt: heatconv.py
+
+# .. |scalemesh.py| replace:: scalemesh.py
+# .. _scalemesh.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/scalemesh.py
+# .. |scalemesh| image:: https://user-images.githubusercontent.com/32848391/57393382-431c4b80-71c3-11e9-9a2c-8abb172f5468.png
+# :width: 300 px
+# :target: scalemesh.py_
+# :alt: scalemesh.py
+
+# .. |elasticbeam.py| replace:: elasticbeam.py
+# .. _elasticbeam.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/elasticbeam.py
+# .. |elasticbeam| image:: https://user-images.githubusercontent.com/32848391/57476429-d7a3ae00-7296-11e9-9f50-8f456823ef3d.png
+# :width: 300 px
+# :target: elasticbeam.py_
+# :alt: elasticbeam.py
+
+# .. |specular.py| replace:: specular.py
+# .. _specular.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/specular.py
+# .. |specular| image:: https://user-images.githubusercontent.com/32848391/57543051-8c030a00-7353-11e9-84cd-b01f3449d255.jpg
+# :width: 300 px
+# :target: specular.py_
+# :alt: specular.py
+
+# .. |wavy_1d.py| replace:: wavy_1d.py
+# .. _wavy_1d.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/wavy_1d.py
+# .. |wavy_1d| image:: https://user-images.githubusercontent.com/32848391/57570898-70593b80-7407-11e9-87cf-ce498f499c09.gif
+# :width: 300 px
+# :target: wavy_1d.py_
+# :alt: wavy_1d.py
+
+# .. |idealpass.link| replace:: idealpass.link
+# .. _idealpass.link: https://lorensen.github.io/VTKExamples/site/Cxx/ImageProcessing/IdealHighPass
+# .. |idealpass| image:: https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/Testing/Baseline/Cxx/ImageProcessing/TestIdealHighPass.png
+# :width: 300 px
+# :target: idealpass.link_
+
+# .. |buildmesh.py| replace:: buildmesh.py
+# .. _buildmesh.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/buildmesh.py
+# .. |buildmesh| image:: https://user-images.githubusercontent.com/32848391/57858625-b0e2fb80-77f1-11e9-94f0-1973ed86ae70.png
+# :width: 300 px
+# :target: buildmesh.py_
+# :alt: buildmesh.py
+
+# .. |customAxes.py| replace:: customAxes.py
+# .. _customAxes.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/customAxes.py
+# .. |customAxes| image:: https://user-images.githubusercontent.com/32848391/58181826-c605d180-7cac-11e9-9786-11b5eb278f20.png
+# :target: customAxes.py_
+# :alt: customAxes.py
+
+# .. |awefem.py| replace:: awefem.py
+# .. _awefem.py: https://github.com/marcomusy/vedo/tree/master/examples/other/dolfin/awefem.py
+# .. |awefem| image:: https://user-images.githubusercontent.com/32848391/58368591-8b3fab80-7eef-11e9-882f-8b8eaef43567.gif
+# :width: 300 px
+# :target: awefem.py_
+# :alt: awefem.py
+
+# .. |fenics_logo| image:: https://user-images.githubusercontent.com/32848391/58764910-3940fa80-856d-11e9-8160-af89a5ab5d02.gif
+
+# .. |thinplate_morphing_2d.py| replace:: thinplate_morphing_2d.py
+# .. _thinplate_morphing_2d.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing_2d.py
+# .. |thinplate_morphing_2d| image:: https://user-images.githubusercontent.com/32848391/59032715-385ae200-8867-11e9-9b07-7f4f8fbfa5bd.png
+# :width: 300 px
+# :target: thinplate_morphing_2d.py_
+# :alt: thinplate_morphing_2d.py
+
+# .. |interpolateVolume.py| replace:: interpolateVolume.py
+# .. _interpolateVolume.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/interpolateVolume.py
+# .. |interpolateVolume| image:: https://user-images.githubusercontent.com/32848391/59095175-1ec5a300-8918-11e9-8bc0-fd35c8981e2b.jpg
+# :width: 300 px
+# :target: interpolateVolume.py_
+# :alt: interpolateVolume.py
+
+# .. |deleteMeshPoints.py| replace:: deleteMeshPoints.py
+# .. _deleteMeshPoints.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/deleteMeshPoints.py
+# .. |deleteMeshPoints| image:: https://user-images.githubusercontent.com/32848391/59768041-e9b83980-92a3-11e9-94f4-ca1f92540e9f.png
+# :width: 300 px
+# :target: deleteMeshPoints.py_
+# :alt: deleteMeshPoints.py
+
+# .. |gray_scott.ipynb| replace:: gray_scott.ipynb
+# .. _gray_scott.ipynb: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gray_scott.ipynb
+# .. |gray_scott| image:: https://user-images.githubusercontent.com/32848391/59788744-aaeaa980-92cc-11e9-825d-58da26ca21ff.gif
+# :width: 300 px
+# :target: gray_scott.ipynb_
+# :alt: gray_scott.ipynb
+
+# .. |volterra.py| replace:: volterra.py
+# .. _volterra.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/volterra.py
+# .. |volterra| image:: https://user-images.githubusercontent.com/32848391/59788745-aaeaa980-92cc-11e9-93d5-f6a577ba5e4d.png
+# :width: 300 px
+# :target: volterra.py_
+# :alt: volterra.py
+
+# .. |tensors.py| replace:: tensors.py
+# .. _tensors.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/tensors.py
+# .. |tensors| image:: https://user-images.githubusercontent.com/32848391/59944747-e2d92480-9465-11e9-8012-1fc34a2e30c6.png
+# :width: 300 px
+# :target: tensors.py_
+# :alt: tensors.py
+
+# .. |tensor_grid.py| replace:: tensor_grid.py
+# .. _tensor_grid.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/tensor_grid.py
+
+# .. |scalarbars.py| replace:: scalarbars.py
+# .. _scalarbars.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/scalarbars.py
+# .. |scalarbars| image:: https://user-images.githubusercontent.com/32848391/62940174-4bdc7900-bdd3-11e9-9713-e4f3e2fdab63.png
+# :width: 300 px
+# :target: scalarbars.py_
+# :alt: scalarbars.py
+
+# .. |erode_dilate.py| replace:: erode_dilate.py
+# .. _erode_dilate.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/erode_dilate.py
+
+# .. |vol2points.py| replace:: vol2points.py
+# .. _vol2points.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/vol2points.py
+
+# .. |euclDist.py| replace:: euclDist.py
+# .. _euclDist.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/euclDist.py
+
+# .. |volumeFromMesh.py| replace:: volumeFromMesh.py
+# .. _volumeFromMesh.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/volumeFromMesh.py
+
+# .. |numpy2volume1.py| replace:: numpy2volume1.py
+# .. _numpy2volume1.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/numpy2volume1.py
+
+# .. |G_Of_Omega| image:: https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4d02a66b6ff279aae0c4bf07c25e5727d192e4
+
+# .. |wikiphong| image:: https://upload.wikimedia.org/wikipedia/commons/6/6b/Phong_components_version_4.png
+
+# .. |animation1.py| replace:: animation1.py
+# .. _animation1.py: https://github.com/marcomusy/vedo/tree/master/examples/other/animation1.py
+# .. |animation1| image:: https://user-images.githubusercontent.com/32848391/64273764-4b528080-cf42-11e9-90aa-2d88df239871.gif
+# :width: 300 px
+# :target: animation1.py_
+# :alt: animation1.py
+
+# .. |animation2.py| replace:: animation2.py
+# .. _animation2.py: https://github.com/marcomusy/vedo/tree/master/examples/other/animation2.py
+# .. |animation2| image:: https://user-images.githubusercontent.com/32848391/64273191-1a258080-cf41-11e9-8a18-f192f05f11a9.gif
+# :width: 300 px
+# :target: animation2.py_
+# :alt: animation2.py
+
+# .. |polarHisto.py| replace:: polarHisto.py
+# .. _polarHisto.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/polarHisto.py
+# .. |polarHisto| image:: https://user-images.githubusercontent.com/32848391/64912717-5754f400-d733-11e9-8a1f-612165955f23.png
+# :width: 300 px
+# :target: polarHisto.py_
+# :alt: polarHisto.py
+
+# .. |histo_polar.py| replace:: histo_polar.py
+# .. _histo_polar.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_polar.py
+# .. |histo_polar| image:: https://user-images.githubusercontent.com/32848391/64992590-7fc82400-d8d4-11e9-9c10-795f4756a73f.png
+# :width: 300 px
+# :target: histo_polar.py_
+# :alt: histo_polar.py
+
+# .. |donut.py| replace:: donut.py
+# .. _donut.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/donut.py
+# .. |donut| image:: https://user-images.githubusercontent.com/32848391/64998178-6f6b7580-d8e3-11e9-9bd8-8dfb9ccd90e4.png
+# :width: 300 px
+# :target: donut.py_
+# :alt: donut.py
+
+# .. |extrude.py| replace:: extrude.py
+# .. _extrude.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/extrude.py
+# .. |extrude| image:: https://user-images.githubusercontent.com/32848391/65963682-971e1a00-e45b-11e9-9f29-05522ae4a800.png
+# :width: 300 px
+# :target: extrude.py_
+# :alt: extrude.py
+
+# .. |kspline| image:: https://user-images.githubusercontent.com/32848391/65975805-73fd6580-e46f-11e9-8957-75eddb28fa72.png
+# :width: 300 px
+
+# .. |mesh_lut.py| replace:: mesh_lut.py
+# .. _mesh_lut.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/mesh_lut.py
+
+# .. |elevation| image:: https://user-images.githubusercontent.com/32848391/68478872-3986a580-0231-11ea-8245-b68a683aa295.png
+# :width: 300 px
+
+# .. |paramshapes| image:: https://user-images.githubusercontent.com/32848391/69181075-bb6aae80-0b0e-11ea-92f7-d0cd3b9087bf.png
+# :width: 300 px
+
+# .. |warpto| image:: https://user-images.githubusercontent.com/32848391/69259878-3c817e80-0bbf-11ea-9025-03b9f6affccc.png
+# :width: 300 px
+
+# .. |linInterpolate.py| replace:: linInterpolate.py
+# .. _linInterpolate.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/linInterpolate.py
+# .. |linInterpolate| image:: https://user-images.githubusercontent.com/32848391/70559826-a621f680-1b87-11ea-89f3-e6b74d8953d9.png
+# :width: 300 px
+# :target: linInterpolate.py_
+# :alt: linInterpolate.py
+
+# .. |plot1_errbars.py| replace:: plot1_errbars.py
+# .. _plot1_errbars.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot1_errbars.py
+# .. |plot1_errbars| image:: https://user-images.githubusercontent.com/32848391/69158509-d6c1c380-0ae6-11ea-9dbf-ff5cd396a9a6.png
+# :width: 300 px
+# :target: plot1_errbars.py_
+# :alt: plot1_errbars.py
+
+# .. |quiver.py| replace:: quiver.py
+# .. _quiver.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/quiver.py
+# .. |quiver| image:: https://user-images.githubusercontent.com/32848391/72261438-199aa600-3615-11ea-870e-e44ca4c4b8d3.png
+# :width: 300 px
+# :target: quiver.py_
+# :alt: quiver.py
+
+# .. |plot5_spheric.py| replace:: plot5_spheric.py
+# .. _plot5_spheric.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot5_spheric.py
+# .. |plot5_spheric| image:: https://user-images.githubusercontent.com/32848391/72433091-f0a31e00-3798-11ea-86bd-6c522e23ec61.png
+# :width: 300 px
+# :target: plot5_spheric.py_
+# :alt: plot5_spheric.py
+
+# .. |fcomplex| image:: https://user-images.githubusercontent.com/32848391/73392962-1709a300-42db-11ea-9278-30c9d6e5eeaa.png
+# :width: 300 px
+
+# .. |histo_spheric.py| replace:: histo_spheric.py
+# .. _histo_spheric.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_spheric.py
+# .. |histo_spheric| image:: https://user-images.githubusercontent.com/32848391/73392901-fccfc500-42da-11ea-828a-9bad6982a823.png
+# :width: 300 px
+# :target: histo_spheric.py_
+# :alt: histo_spheric.py
+
+# .. |sphericgrid| image:: https://user-images.githubusercontent.com/32848391/72433092-f0a31e00-3798-11ea-85f7-b2f5fcc31568.png
+# :width: 300 px
+
+# .. |histo_2D.py| replace:: histo_2D.py
+# .. _histo_2D.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/histo_2D.py
+# .. |histo_2D| image:: https://user-images.githubusercontent.com/32848391/74361190-c019c880-4dc6-11ea-9c72-0f2a890e6664.png
+# :width: 300 px
+# :target: histo_2D.py_
+# :alt: histo_2D.py
+
+# .. |plot2_errband.py| replace:: plot2_errband.py
+# .. _plot2_errband.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot2_errband.py
+# .. |plot2_errband| image:: https://user-images.githubusercontent.com/32848391/73483464-c019d180-439f-11ea-9a8c-59fa49e9ecf4.png
+# :width: 300 px
+# :target: plot2_errband.py_
+# :alt: plot2_errband.py
+
+# .. |plot3_pip.py| replace:: plot3_pip.py
+# .. _plot3_pip.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot3_pip.py
+# .. |plot3_pip| image:: https://user-images.githubusercontent.com/32848391/73393632-4ff64780-42dc-11ea-8798-45a81c067f45.png
+# :width: 300 px
+# :target: plot3_pip.py_
+# :alt: plot3_pip.py
+
+# .. |scatter1.py| replace:: scatter1.py
+# .. _scatter1.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter1.py
+# .. |scatter1| image:: https://user-images.githubusercontent.com/32848391/72615028-013bcb80-3934-11ea-8ab8-823f1916bc6c.png
+# :width: 300 px
+# :target: scatter1.py_
+# :alt: scatter1.py
+
+# .. |scatter2.py| replace:: scatter2.py
+# .. _scatter2.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter2.py
+# .. |scatter2| image:: https://user-images.githubusercontent.com/32848391/72446102-2d7c0e80-37b3-11ea-8fe4-b27526af574f.png
+# :width: 300 px
+# :target: scatter2.py_
+# :alt: scatter2.py
+
+# .. |scatter3.py| replace:: scatter3.py
+# .. _scatter3.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/scatter3.py
+# .. |scatter3| image:: https://user-images.githubusercontent.com/32848391/72446102-2d7c0e80-37b3-11ea-8fe4-b27526af574f.png
+# :width: 300 px
+# :target: scatter3.py_
+# :alt: scatter3.py
+
+# .. |customIndividualAxes.py| replace:: customIndividualAxes.py
+# .. _customIndividualAxes.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/customIndividualAxes.py
+# .. |customIndividualAxes| image:: https://user-images.githubusercontent.com/32848391/72752870-ab7d5280-3bc3-11ea-8911-9ace00211e23.png
+# :target: customIndividualAxes.py_
+# :alt: customIndividualAxes.py
+
+# .. |plot7_stream.py| replace:: plot7_stream.py
+# .. _plot7_stream.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot7_stream.py
+# .. |plot7_stream| image:: https://user-images.githubusercontent.com/32848391/73614123-93162a80-45fc-11ea-969b-9a3293b26f35.png
+# :target: plot7_stream.py_
+# :alt: plot7_stream.py
+
+# .. |simpleplot| image:: https://user-images.githubusercontent.com/32848391/74363882-c3638300-4dcb-11ea-8a78-eb492ad9711f.png
+# :width: 300 px
+
+# .. |warpv| image:: https://user-images.githubusercontent.com/32848391/77864546-7a577900-7229-11ea-84ce-4e8e6eeff27f.png
+# :width: 300 px
+
+# .. |lineage_graph.py| replace:: lineage_graph.py
+# .. _lineage_graph.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/lineage_graph.py
+# .. |lineage_graph| image:: https://user-images.githubusercontent.com/32848391/80291851-8152a800-8751-11ea-893e-4a0bb85397b1.png
+# :width: 350 px
+# :target: lineage_graph.py_
+# :alt: lineage_graph.py
+
+# .. |bezier| image:: https://user-images.githubusercontent.com/32848391/90437534-dafd2a80-e0d2-11ea-9b93-9ecb3f48a3ff.png
+# :width: 300 px
+
+# .. |goniometer.py| replace:: goniometer.py
+# .. _goniometer.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/goniometer.py
+# .. |goniometer| image:: https://user-images.githubusercontent.com/32848391/90437544-dd5f8480-e0d2-11ea-8321-b52d073444c4.png
+# :width: 350 px
+# :target: goniometer.py_
+# :alt: goniometer.py
+
+# .. |intersect2d.py| replace:: intersect2d.py
+# .. _intersect2d.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/intersect2d.py
+# .. |intersect2d| image:: https://user-images.githubusercontent.com/32848391/90437548-de90b180-e0d2-11ea-8e0c-d821db4da8a9.png
+# :width: 350 px
+# :target: intersect2d.py_
+# :alt: intersect2d.py
+
+# .. |fonts.py| replace:: fonts.py
+# .. _fonts.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/fonts.py
+# .. |fonts| image:: https://user-images.githubusercontent.com/32848391/90437539-dcc6ee00-e0d2-11ea-8381-93d211b1bc85.png
+# :width: 350 px
+# :target: fonts.py_
+# :alt: fonts.py
+
+# .. |graph_network.py| replace:: graph_network.py
+# .. _graph_network.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/graph_network.py
+# .. |graph_network| image:: https://user-images.githubusercontent.com/32848391/90437546-ddf81b00-e0d2-11ea-84d5-e4356a5c5f85.png
+# :width: 350 px
+# :target: graph_network.py_
+# :alt: graph_network.py
+
+# .. |plot_density3d.py| replace:: plot_density3d.py
+# .. _plot_density3d.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/plot_density3d.py
+# .. |plot_density3d| image:: https://user-images.githubusercontent.com/32848391/90437537-dc2e5780-e0d2-11ea-982c-8dafd467c3cd.png
+# :width: 350 px
+# :target: plot_density3d.py_
+# :alt: plot_density3d.py
+
+# .. |fonts3d| image:: https://user-images.githubusercontent.com/32848391/90437540-dd5f8480-e0d2-11ea-8ddc-8839688979d0.png
+# :width: 350 px
+
+# .. |fontlist| image:: https://user-images.githubusercontent.com/32848391/90437539-dcc6ee00-e0d2-11ea-8381-93d211b1bc85.png
+# :width: 350 px
+
+# .. |caption.py| replace:: captions.py
+# .. _caption.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/caption.py
+# .. |caption| image:: https://user-images.githubusercontent.com/32848391/90437536-dc2e5780-e0d2-11ea-8951-f905ffb54f54.png
+# :width: 350 px
+# :target: caption.py_
+# :alt: caption.py
+
+# .. |flag_labels.py| replace:: flag_labels.py
+# .. _flag_labels.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/flag_labels.py
+# .. |flag_labels| image:: https://user-images.githubusercontent.com/32848391/90620799-3b938100-e213-11ea-80b1-e05ce2949d3a.png
+# :width: 350 px
+# :target: flag_labels.py_
+# :alt: flag_labels.py
+
+# .. |whiskers.py| replace:: whiskers.py
+# .. _whiskers.py: https://github.com/marcomusy/vedo/tree/master/examples/pyplot/whiskers.py
+# .. |whiskers| image:: https://user-images.githubusercontent.com/32848391/95772479-170cd000-0cbd-11eb-98c4-20c5ca342cb8.png
+# :width: 350 px
+# :target: whiskers.py_
+# :alt: whiskers.py
+# """
######################################################################## template
# .. |.py| replace:: .py
diff --git a/vedo/io.py b/vedo/io.py
index 226623c4..a04bf289 100644
--- a/vedo/io.py
+++ b/vedo/io.py
@@ -1683,6 +1683,7 @@ def __init__(self,
self.backend = backend
self.fps = float(fps)
self.command = "ffmpeg -loglevel panic -y -r"
+ self.options = "-b:v 8000k"
self.frames = []
self.tmp_dir = TemporaryDirectory()
@@ -1784,7 +1785,8 @@ def close(self):
########################################
if self.backend == 'ffmpeg':
out = os.system(self.command + " " + str(self.fps)
- + " -i " + self.tmp_dir.name + os.sep + "%01d.png " + self.name)
+ + " -i " + self.tmp_dir.name + os.sep
+ + "%01d.png " + self.options + " " + self.name)
if out:
colors.printc("ffmpeg returning error", c='r')
else:
diff --git a/vedo/mesh.py b/vedo/mesh.py
index dc5627e6..3772cbfe 100644
--- a/vedo/mesh.py
+++ b/vedo/mesh.py
@@ -87,6 +87,8 @@ def __init__(
):
Points.__init__(self)
+ self._current_texture_name = '' # used by plotter._keypress
+
self._mapper.SetInterpolateScalarsBeforeMapping(settings.interpolateScalarsBeforeMapping)
if settings.usePolygonOffset:
@@ -973,9 +975,23 @@ def cutWithMesh(self, mesh, invert=False):
:param bool invert: if True return cut off part of Mesh.
- .. hint:: |cutWithMesh.py|_ |cutAndCap.py|_
+ :Example:
+ .. code-block:: python
+
+ from vedo import *
+ import numpy as np
+ x, y, z = np.mgrid[:30, :30, :30] / 15
+ U = sin(6*x)*cos(6*y) + sin(6*y)*cos(6*z) + sin(6*z)*cos(6*x)
+ iso = Volume(U).isosurface(0).smoothLaplacian().c('silver').lw(1)
+ cube = CubicGrid(n=(29,29,29), spacing=(1,1,1))
+ cube.cutWithMesh(iso).c('silver').alpha(1)
+ show(iso, cube)
+
+ |cutWithMesh2|
+
+ .. hint:: |cutWithMesh1.py|_ |cutAndCap.py|_
- |cutWithMesh| |cutAndCap|
+ |cutWithMesh1| |cutAndCap|
"""
polymesh = mesh.polydata()
poly = self.polydata()
diff --git a/vedo/plotter.py b/vedo/plotter.py
index e5520684..b1c57d48 100644
--- a/vedo/plotter.py
+++ b/vedo/plotter.py
@@ -916,11 +916,6 @@ def render(self):
self.interactor.Render()
return self
- def resetCamera(self):
- """Reset the camera position and zooming."""
- self.interactor.ResetCamera()
- return self
-
def backgroundColor(self, c1=None, c2=None, at=None):
"""Set the color of the background for the current renderer.
A different renderer index can be specified by keyword ``at``.
@@ -1093,6 +1088,10 @@ def getMeshes(self, obj=None, renderer=None):
printc("Warning in getMeshes(): unexpected input type", obj, c='r')
return []
+ def resetCamera(self):
+ """Reset the camera position and zooming."""
+ self.interactor.ResetCamera()
+ return self
def moveCamera(self, camstart, camstop, fraction):
"""
@@ -1162,32 +1161,8 @@ def parallelProjection(self, value=True):
r.Modified()
return self
- # def freeze(self, value=True, at=0):
- # """Freeze renderer's camera. Set to argument to False to unfreeze."""
- # return self.renderers[at].SetInteractive(value)
-
##################################################################
- def addLight(self, pos, focalPoint=(0, 0, 0), deg=180, c='white',
- intensity=0.4, removeOthers=False, showsource=False):
- """
- Generate a source of light placed at pos, directed to focal point.
- Returns a ``vtkLight`` object.
-
- :param focalPoint: focal point, if this is a ``vtkActor`` use its position.
- :type fp: vtkActor, list
- :param deg: aperture angle of the light source
- :param c: set light color
- :param float intensity: intensity between 0 and 1.
- :param bool removeOthers: remove all other lights in the scene
- :param bool showsource: if `True`, will show a representation
- of the source of light as an extra Mesh
-
- .. hint:: |lights.py|_
- """
- return addons.addLight(pos, focalPoint, deg, c,
- intensity, removeOthers, showsource)
-
def addSlider2D(self, sliderfunc, xmin, xmax,
value=None, pos=4, title="", font='arial', titleSize=1, c=None,
showValue=True):
@@ -1491,8 +1466,22 @@ def show(self, *actors, **options):
bg_ = options.pop("bg", None)
bg2_ = options.pop("bg2", None)
axes_ = options.pop("axes", None)
+ size_ = options.pop("size", None)
q = options.pop("q", False)
+
+ if size_ is not None:
+ self.size = size_
+ if self.size[0] == 'f': # full screen
+ self.size = 'fullscreen'
+ self.window.SetFullScreen(True)
+ self.window.BordersOn()
+ else:
+ self.window.SetSize(int(self.size[0]), int(self.size[1]))
+
+ if at is not None and len(self.renderers)>at:
+ self.renderer = self.renderers[at]
+
if not settings.notebookBackend:
if bg_ is not None:
self.backgrcol = getColor(bg_)
@@ -1584,6 +1573,9 @@ def scan(wannabeacts):
elif isinstance(a, vtk.vtkBillboardTextActor3D):
scannedacts.append(a)
+ elif isinstance(a, vtk.vtkLight):
+ self.renderer.AddLight(a)
+
elif isinstance(a, str): # assume a filepath or 2D comment was given
import os.path
if a.startswith('https'):
@@ -1825,7 +1817,7 @@ def scan(wannabeacts):
elif viewup == "2d":
interactorStyle = 7
- if camera is not None:
+ if isinstance(camera, dict):
cm_pos = camera.pop("pos", None)
cm_focalPoint = camera.pop("focalPoint", None)
cm_viewup = camera.pop("viewup", None)
@@ -1834,6 +1826,9 @@ def scan(wannabeacts):
cm_parallelScale = camera.pop("parallelScale", None)
cm_thickness = camera.pop("thickness", None)
cm_viewAngle = camera.pop("viewAngle", None)
+ if len(camera.keys()):
+ printc("Warning in show(cam=...), key(s) not recognized:",
+ *(camera.keys()), c='y')
if cm_pos is not None: self.camera.SetPosition(cm_pos)
if cm_focalPoint is not None: self.camera.SetFocalPoint(cm_focalPoint)
if cm_viewup is not None: self.camera.SetViewUp(cm_viewup)
@@ -1925,6 +1920,8 @@ def showInset(self, *actors, **options):
|inset| |inset.py|_
"""
+ if not self.interactor:
+ return None
pos = options.pop("pos", 0)
size = options.pop("size", 0.1)
c = options.pop("c", 'r')
@@ -2150,7 +2147,7 @@ def _keypress(self, iren, event):
# qt creates and passes a vtkGenericRenderWindowInteractor
key = iren.GetKeySym()
- #print('Pressed key:', key)
+ # print('Pressed key:', key)
if key in ["q", "space", "Return"]:
iren.ExitCallback()
@@ -2325,7 +2322,7 @@ def _keypress(self, iren, event):
elif key == "C":
cam = self.renderer.GetActiveCamera()
printc('\n###################################################', c='y')
- printc('### Template python code to position this camera: ###', c='y')
+ printc('## Template python code to position this camera: ##', c='y')
printc('cam = dict(pos=' +utils.precision(cam.GetPosition(),3)+',', c='y')
printc(' focalPoint=' +utils.precision(cam.GetFocalPoint(),3)+',', c='y')
printc(' viewup=' +utils.precision(cam.GetViewUp(),3)+',', c='y')
@@ -2353,42 +2350,28 @@ def _keypress(self, iren, event):
elif key == "1":
self.icol += 1
- if self.clickedActor and hasattr(self.clickedActor, "GetProperty"):
+ if isinstance(self.clickedActor, vedo.Points):
self.clickedActor.GetMapper().ScalarVisibilityOff()
self.clickedActor.GetProperty().SetColor(vedo.colors.colors1[(self.icol) % 10])
- else:
- for i, ia in enumerate(self.getMeshes()):
- if not ia.GetPickable():
- continue
- ia.GetProperty().SetColor(vedo.colors.colors1[(i + self.icol) % 10])
- ia.GetMapper().ScalarVisibilityOff()
addons.addLegend()
elif key == "2":
self.icol += 1
- if self.clickedActor and hasattr(self.clickedActor, "GetProperty"):
+ if isinstance(self.clickedActor, vedo.Points):
self.clickedActor.GetMapper().ScalarVisibilityOff()
self.clickedActor.GetProperty().SetColor(vedo.colors.colors2[(self.icol) % 10])
- else:
- for i, ia in enumerate(self.getMeshes()):
- if not ia.GetPickable():
- continue
- ia.GetProperty().SetColor(vedo.colors.colors2[(i + self.icol) % 10])
- ia.GetMapper().ScalarVisibilityOff()
addons.addLegend()
elif key == "3":
- c = getColor("gold")
- acs = self.getMeshes()
- if len(acs) == 0: return
- alpha = 1.0 / len(acs)
- for ia in acs:
- if not ia.GetPickable():
- continue
- ia.GetProperty().SetColor(c)
- ia.GetProperty().SetOpacity(alpha)
- ia.GetMapper().ScalarVisibilityOff()
- addons.addLegend()
+ if isinstance(self.clickedActor, vedo.Mesh):
+ if self.clickedActor._current_texture_name in settings.textures:
+ i = settings.textures.index(self.clickedActor._current_texture_name)
+ i = (i+1) % len(settings.textures)
+ self.clickedActor.texture(settings.textures[i])
+ self.clickedActor._current_texture_name = settings.textures[i]
+ elif not self.clickedActor._current_texture_name:
+ self.clickedActor.texture(settings.textures[0])
+ self.clickedActor._current_texture_name = settings.textures[0]
elif key == "4":
for ia in self.getMeshes():
@@ -2496,7 +2479,7 @@ def _keypress(self, iren, event):
self.interactor.Render()
if key == "O":
- settings.plotter_instance.renderer.RemoveLight(self.extralight)
+ self.renderer.RemoveLight(self.extralight)
self.extralight = None
elif key == "o":
@@ -2505,7 +2488,8 @@ def _keypress(self, iren, event):
if not self.extralight:
vup = self.renderer.GetActiveCamera().GetViewUp()
pos = cm + utils.vector(vup)*utils.mag(sizes)
- self.extralight = addons.addLight(pos, focalPoint=cm)
+ self.extralight = addons.Light(pos, focalPoint=cm)
+ self.renderer.AddLight(self.extralight)
print("Press again o to rotate light source, or O to remove it.")
else:
cpos = utils.vector(self.extralight.GetPosition())
@@ -2632,16 +2616,12 @@ def _keypress(self, iren, event):
elif key == "I": # print color under the mouse
x, y = iren.GetEventPosition()
- w2if = vtk.vtkWindowToImageFilter()
- w2if.SetInput(self.window)
- w2if.ReadFrontBufferOff()
- w2if.Update()
- nx, ny = self.window.GetSize()
- arr = vtk_to_numpy(w2if.GetOutput().GetPointData().GetScalars()).reshape(ny,nx,3)
- printc('Pixel =', [x,y], ' RGB =', arr[y,x].tolist(), end='')
- cnm = getColorName(arr[y,x])
+ rgb = vedo.colors.colorPicker([x,y], self)
+ printc('Pixel', [x,y], ' has RGB =', rgb.tolist(), end='')
+ cnm = getColorName(rgb)
printc(' ('+cnm+')', c=cnm)
+
if iren:
iren.Render()
diff --git a/vedo/pyplot.py b/vedo/pyplot.py
index 4572c8f7..677e939e 100644
--- a/vedo/pyplot.py
+++ b/vedo/pyplot.py
@@ -485,8 +485,6 @@ def _plotxy(
pad=0.05,
axes={},
):
- # ncolls = len(settings.collectable_actors)
-
line=False
if lw>0:
line=True
@@ -695,7 +693,7 @@ def _plotxy(
axes["yrange"] = (y0lim, y1lim)
axes["zrange"] = (0, 0)
axes["c"] = "k"
- axs = addons.buildAxes(**axes)
+ axs = addons.Axes(**axes)
axs.name = "axes"
asse = Plot(acts, axs)
asse.axes = axs
@@ -722,9 +720,6 @@ def _plotxy(
asse._y1lim = y1lim
asse.zmax = offs * 3 # z-order
asse.name = "plotxy"
-
- # settings.collectable_actors = settings.collectable_actors[:ncolls]
- # settings.collectable_actors.append(asse)
return asse
@@ -849,7 +844,7 @@ def _plotFxy(
acts.append(nansact)
if axes:
- axs = addons.buildAxes(mesh)
+ axs = addons.Axes(mesh)
acts.append(axs)
asse = Assembly(acts)
asse.name = "plotFxy"
@@ -912,7 +907,7 @@ def _plotFz(
acts = [mesh]
if axes:
- axs = addons.buildAxes(mesh, ztitle="Real part")
+ axs = addons.Axes(mesh, ztitle="Real part")
acts.append(axs)
asse = Assembly(acts)
asse.name = "plotFz"
@@ -1111,8 +1106,8 @@ def _plotSpheric(rfunc, normalize=True, res=33, scalarbar=True, c="grey", alpha=
asse.name = "plotSpheric"
return asse
-#########################################################################################
+#########################################################################################
def _histogram1D(
data,
format=None,
@@ -1142,8 +1137,6 @@ def _histogram1D(
axes={},
bc="k",
):
- # ncolls = len(settings.collectable_actors)
-
# purge NaN from data
validIds = np.all(np.logical_not(np.isnan(data)))
data = data[validIds]
@@ -1345,7 +1338,7 @@ def _histogram1D(
axes["yrange"] = (y0lim, y1lim)
axes["zrange"] = (0, 0)
axes["c"] = bc
- axs = addons.buildAxes(**axes)
+ axs = addons.Axes(**axes)
axs.name = "axes"
asse = Plot(rs, axs)
asse.axes = axs
@@ -1371,9 +1364,6 @@ def _histogram1D(
asse.bins = edges
asse.freqs = fs
asse.name = "histogram1D"
-
- # settings.collectable_actors = settings.collectable_actors[:ncolls]
- # settings.collectable_actors.append(asse)
return asse
@@ -1399,7 +1389,6 @@ def _histogram2D(
axes=True,
bc="k",
):
- # ncolls = len(settings.collectable_actors)
offs = 0 # z offset
if format is not None: # reset to allow meaningful overlap
@@ -1496,7 +1485,7 @@ def _histogram2D(
axes["yrange"] = (y0lim, y1lim)
axes["zrange"] = (0, 0)
axes["c"] = bc
- axs = addons.buildAxes(**axes)
+ axs = addons.Axes(**axes)
axs.name = "axes"
asse = Plot(acts, axs)
asse.axes = axs
@@ -1521,9 +1510,6 @@ def _histogram2D(
asse.bins = (xedges, yedges)
asse.zmax = offs * 3 # z-order
asse.name = "histogram2D"
-
- # settings.collectable_actors = settings.collectable_actors[:ncolls]
- # settings.collectable_actors.append(asse)
return asse
@@ -1989,7 +1975,7 @@ def violin(
lw=3,
):
"""
- Violin histogram.
+ Violin style histogram.
:param int bins: number of bins
:param list vlim: input value limits. Crop values outside range.
@@ -2003,8 +1989,6 @@ def violin(
|histo_violin| |histo_violin.py|_
"""
- # ncolls = len(settings.collectable_actors)
-
fs, edges = np.histogram(values, bins=bins, range=vlim)
mine, maxe = np.min(edges), np.max(edges)
fs = fs.astype(float) / len(values) * width
@@ -2064,8 +2048,6 @@ def violin(
asse.base = np.array([0, 0, 0])
asse.top = np.array([0, 1, 0])
asse.name = "violin"
- # settings.collectable_actors = settings.collectable_actors[:ncolls]
- # settings.collectable_actors.append(asse)
return asse
@@ -2114,7 +2096,7 @@ def whisker(data,
l1 = shapes.Line([0,dq05,0], [0,dq25,0], c=c, lw=lw)
l2 = shapes.Line([0,dq75,0], [0,dq95,0], c=c, lw=lw)
lm = shapes.Line([-s/2, dmean], [s/2, dmean])
- lns = merge(l1,l2,lm,rl)
+ lns = merge(l1, l2, lm, rl)
asse = Assembly([lns, rec, pts])
if horizontal:
asse.rotateZ(-90)
diff --git a/vedo/settings.py b/vedo/settings.py
index 10768258..fb50de61 100644
--- a/vedo/settings.py
+++ b/vedo/settings.py
@@ -125,7 +125,7 @@
Cube().color('green').show()
"""
-import os
+import os, vtk
__all__ = ['datadir', 'embedWindow']
@@ -196,7 +196,9 @@
# Turn on/off rendering of translucent material with depth peeling technique.
#https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/CorrectlyRenderTranslucentGeometry
useDepthPeeling = False
-alphaBitPlanes = True # only active if useDepthPeeling
+if '9' in vtk.vtkVersion().GetVTKVersion():
+ useDepthPeeling = True
+alphaBitPlanes = True # only relevant if useDepthPeeling
multiSamples = 0
maxNumberOfPeels= 8
occlusionRatio = 0.0
@@ -218,7 +220,7 @@
# In multirendering mode set the position of the horizontal of vertical splitting [0,1]
windowSplittingPosition = None
-# AnnotatedCube axis type 5 customization:
+# AnnotatedCube axis (type 5) customization:
annotatedCubeColor = (0.75, 0.75, 0.75)
annotatedCubeTextColor = None # use default, otherwise specify a single color
annotatedCubeTextScale = 0.2
@@ -264,7 +266,7 @@
plotter_instances = []
plotter_instance = None
-collectable_actors = [] # OBSOLETE
+collectable_actors = [] # OBSOLETE and void
####################################################################################
def embedWindow(backend='k3d', verbose=True):
@@ -332,13 +334,12 @@ def embedWindow(backend='k3d', verbose=True):
#####################
def _init():
- global plotter_instance, plotter_instances, collectable_actors
+ global plotter_instance, plotter_instances
global textures, fonts
global notebookBackend, notebook_plotter
plotter_instance = None
plotter_instances = []
- collectable_actors = [] # OBSOLETE
for f in os.listdir(textures_path):
tfn = f.split(".")[0]
diff --git a/vedo/shapes.py b/vedo/shapes.py
index 980f3bbb..70ad00f5 100644
--- a/vedo/shapes.py
+++ b/vedo/shapes.py
@@ -19,12 +19,14 @@
"Marker",
"Line",
"DashedLine",
+ "RoundedLine",
"Tube",
"Lines",
"Spline",
"KSpline",
"CSpline",
"Bezier",
+ "Brace",
"NormalLines",
"Ribbon",
"Arrow",
@@ -535,6 +537,68 @@ def length(self):
return distance
+ def sweep(self, direction=(1,0,0), res=1):
+ """
+ Sweep the Line along the specified vector direction.
+
+ Returns a Mesh surface.
+ Line position is updated to allow for additional sweepings.
+
+ :Example:
+ .. code-block:: python
+
+ from vedo import Line, show
+ aline = Line([(0,0,0),(1,3,0),(2,4,0)])
+ surf1 = aline.sweep((1,0.2,0), res=3)
+ surf2 = aline.sweep((0.2,0,1))
+ aline.color('r').lineWidth(4)
+ show(surf1, surf2, aline, axes=1)
+ """
+ line = self.polydata()
+ rows = line.GetNumberOfPoints()
+
+ spacing = 1 / res
+ surface = vtk.vtkPolyData()
+
+ res += 1
+ numberOfPoints = rows * res
+ numberOfPolys = (rows - 1) * (res - 1)
+ points = vtk.vtkPoints()
+ points.Allocate(numberOfPoints)
+
+ cnt = 0
+ x = [0.,0.,0.]
+ for row in range(rows):
+ for col in range(res):
+ p = [0.,0.,0.]
+ line.GetPoint(row, p)
+ x[0] = p[0] + direction[0] * col * spacing
+ x[1] = p[1] + direction[1] * col * spacing
+ x[2] = p[2] + direction[2] * col * spacing
+ points.InsertPoint(cnt, x)
+ cnt += 1
+
+ # Generate the quads
+ polys = vtk.vtkCellArray()
+ polys.Allocate(numberOfPolys*4)
+ pts = [0,0,0,0]
+ for row in range(rows-1):
+ for col in range(res-1):
+ pts[0] = col + row * res
+ pts[1] = pts[0] + 1
+ pts[2] = pts[0] + res + 1
+ pts[3] = pts[0] + res
+ polys.InsertNextCell(4, pts)
+ surface.SetPoints(points)
+ surface.SetPolys(polys)
+ asurface = vedo.Mesh(surface)
+ prop = vtk.vtkProperty()
+ prop.DeepCopy(self.GetProperty())
+ asurface.SetProperty(prop)
+ asurface.lighting('default')
+ self.points(self.points()+direction)
+ return asurface
+
class DashedLine(Line):
"""
Build a dashed line segment between points `p0` and `p1`.
@@ -634,6 +698,87 @@ def __init__(self, p0, p1=None, spacing=0.1, closed=False, c="grey", alpha=1, lw
self.name = "DashedLine"
+def RoundedLine(pts, lw, c='grey', alpha=1, res=10):
+ """
+ Create a 2D line of specified thickness (in absolute units) passing through
+ a list of input points. Borders of the line are rounded.
+
+ Parameters
+ ----------
+ pts : list
+ a list of points in 2D or 3D (z will be ignored).
+ lw : float
+ thickness of the line.
+ res : int, optional
+ resolution of the rounded regions. The default is 10.
+
+ :Example:
+ .. code-block:: python
+
+ from vedo import *
+ pts = [(-4,-3),(1,1),(2,4),(4,1),(3,-1),(2,-5),(9,-3)]
+ ln = Line(pts, c='r', lw=2).z(0.01)
+ rl = RoundedLine(pts, 0.6)
+ show(Points(pts), ln, rl, axes=1)
+ """
+ pts = np.asarray(pts)
+ if len(pts[0]) == 2: # make it 3d
+ pts = np.c_[pts, np.zeros(len(pts))]
+
+ def _getpts(pts, revd=False):
+
+ if revd:
+ pts = list(reversed(pts))
+
+ if len(pts)==2:
+ p0, p1 = pts
+ v = p1-p0
+ dv = np.linalg.norm(v)
+ nv = np.cross(v, (0,0,-1))
+ nv = nv/np.linalg.norm(nv)*lw
+ return [p0+nv, p1+nv]
+
+ ptsnew = []
+ for k in range(len(pts)-2):
+ p0 = pts[k]
+ p1 = pts[k+1]
+ p2 = pts[k+2]
+ v = p1-p0
+ u = p2-p1
+ du = np.linalg.norm(u)
+ dv = np.linalg.norm(v)
+ nv = np.cross(v, (0,0,-1))
+ nv = nv/np.linalg.norm(nv)*lw
+ nu = np.cross(u, (0,0,-1))
+ nu = nu/np.linalg.norm(nu)*lw
+ uv = np.cross(u,v)
+ if k==0:
+ ptsnew.append(p0+nv)
+ if uv[2]<=0:
+ alpha = np.arccos(np.dot(u,v)/du/dv)
+ db = lw*np.tan(alpha/2)
+ p1new = p1+nv -v/dv * db
+ ptsnew.append(p1new)
+ else:
+ p1a = p1+nv
+ p1b = p1+nu
+ for i in range(0,res+1):
+ pab = p1a*(res-i)/res + p1b*i/res
+ vpab = pab-p1
+ vpab = vpab/np.linalg.norm(vpab)*lw
+ ptsnew.append(p1+vpab)
+ if k == len(pts)-3:
+ ptsnew.append(p2+nu)
+ if revd:
+ ptsnew.append(p2-nu)
+ return ptsnew
+
+ ptsnew = _getpts(pts) + _getpts(pts, revd=True)
+ lk = Line(ptsnew).triangulate().lw(0).lighting('off')
+ lk.name = "RoundedLine"
+ return lk
+
+
class Lines(Line):
"""
Build the line segments between two lists of points `startPoints` and `endPoints`.
@@ -886,6 +1031,88 @@ def _bpoly(x):
return ln
+def Brace(q1, q2, style='}', pad=0.2, thickness=1,
+ font='Kanopus', comment='', s=1, c='black', alpha=1):
+ """
+ Create a brace (bracket) shape which spans from point q1 to point q2.
+
+ Parameters
+ ----------
+ q1 : list
+ point 1.
+ q2 : list
+ point 2.
+ style : str, optional
+ style of the bracket, eg. {}, [], (), <>. The default is '{'.
+ pad : float, optional
+ padding space in percent. The default is 0.2.
+ thickness : float, optional
+ thickness factor for the bracket. The default is 1.
+ font : str, optional
+ font type. The default is 'Kanopus'.
+ comment : str, optional
+ additional text to appear next to the bracket. The default is ''.
+ s : float, optional
+ scale factor for the comment
+
+ |scatter3| |scatter3.py|_
+ """
+ if isinstance(q1, vtk.vtkActor):
+ q1 = q1.GetPosition()
+ if isinstance(q2, vtk.vtkActor):
+ q2 = q2.GetPosition()
+ if len(q1)==2:
+ q1 = [q1[0],q1[1],0.0]
+ if len(q2)==2:
+ q2 = [q2[0],q2[1],0.0]
+ q1 = np.array(q1)
+ q2 = np.array(q2)
+ q2[2] = q1[2]
+
+ if style not in '{}[]()<>|I':
+ printc("Warning in Brace(): unknown style", style, c='y')
+
+ br = Text(style, c=c, alpha=alpha, font=font)
+ x0,x1, y0,y1, _,_ = br.bounds()
+
+ flip = False
+ if style in ['}',']',')','>']:
+ flip = True
+ if flip:
+ br.origin(x0-pad*(x1-x0),y0,0)
+ else:
+ br.origin(x1+pad*(x1-x0),y0,0)
+
+ angle = np.arctan2( q2[1]-q1[1], q2[0]-q1[0] )*57.3 - 90
+ br.rotateZ(angle)
+ fy = 1/(y1-y0)*np.linalg.norm(q1-q2)
+ fx = fy*0.3*thickness
+ br.scale([fx,fy,1])
+ br.pos(q1-br.origin())
+
+ if comment:
+ extra_angle = 90
+ just = 'center-bottom'
+ if q2[0]-q1[0] < 0:
+ extra_angle = -90
+ just = 'center-top'
+ if flip:
+ just = 'center-top'
+ if q2[0]-q1[0] < 0:
+ just = 'center-bottom'
+ cmt = Text(comment, c=c, alpha=alpha, font=font, justify=just)
+ cx0,cx1, cy0,cy1, _,_ = cmt.bounds()
+ if len(comment)>1:
+ cmt.rotateZ(angle+extra_angle)
+ cmt.scale(1/(cy1-cy0)*np.linalg.norm(q1-q2)/6*s)
+ cm = br.centerOfMass()
+ cmt.pos(cm+(cm-(q1+q2)/2)*1.4)
+ br = merge(br, cmt)
+
+ br.name = "Brace"
+ return br
+
+
def NormalLines(mesh, ratio=1, atCells=True, scale=1):
"""
Build an ``Mesh`` made of the normals at cells shown as lines.
@@ -1015,10 +1242,13 @@ class Ribbon(Mesh):
def __init__(self, line1, line2=None, mode=0, closed=False, width=None,
c="m", alpha=1, res=(200,5)):
- if isinstance(line1, Mesh):
+ if isinstance(line1, Points):
line1 = line1.points()
- if line2 is None:
+ if isinstance(line2, Points):
+ line2 = line2.points()
+
+ elif line2 is None:
RibbonFilter = vtk.vtkRibbonFilter()
aline = Line(line1)
RibbonFilter.SetInputData(aline.polydata(False))
@@ -1028,10 +1258,7 @@ def __init__(self, line1, line2=None, mode=0, closed=False, width=None,
RibbonFilter.Update()
Mesh.__init__(self, RibbonFilter.GetOutput(), c, alpha)
self.name = "Ribbon"
- return
-
- if isinstance(line2, Mesh):
- line2 = line2.points()
+ return #######################
if closed:
line1 = line1.tolist()
@@ -1039,6 +1266,11 @@ def __init__(self, line1, line2=None, mode=0, closed=False, width=None,
line2 = line2.tolist()
line2 += [line2[0]]
+ if len(line1[0]) == 2:
+ line1 = np.c_[np.asarray(line1), np.zeros(len(line1))]
+ if len(line2[0]) == 2:
+ line2 = np.c_[np.asarray(line2), np.zeros(len(line2))]
+
ppoints1 = vtk.vtkPoints() # Generate the polyline1
ppoints1.SetData(numpy_to_vtk(np.ascontiguousarray(line1), deep=True))
lines1 = vtk.vtkCellArray()
@@ -2027,7 +2259,7 @@ def Cube(pos=(0, 0, 0), side=1, c="g", alpha=1):
mesh.name = "Cube"
return mesh
-def CubicGrid(pos=(0, 0, 0), n=(10,10,10), spacing=(), c="lightgrey", alpha=0.1):
+def CubicGrid(pos=(0, 0, 0), n=(10,10,10), spacing=(), c="lightgrey", alpha=0.5):
"""Build a cubic Mesh made o `n` small quads in the 3 axis directions.
:param list pos: position of the left bottom corner
@@ -2429,6 +2661,7 @@ def __init__(self,
mono = False
fscale = 0.75
lspacing = 0.15
+ hspacing *= 0.75
dotsep = '~ยท'
elif font=='LionelOfParis':
mono = False
diff --git a/vedo/version.py b/vedo/version.py
index 7b100d18..d2dc9984 100644
--- a/vedo/version.py
+++ b/vedo/version.py
@@ -1 +1 @@
-_version='2020.4.1'
+_version='2020.4.2'
diff --git a/vedo/volume.py b/vedo/volume.py
index ede30d6a..b4742673 100644
--- a/vedo/volume.py
+++ b/vedo/volume.py
@@ -449,6 +449,10 @@ def mode(self, mode=None):
self.jittering(True)
return self
+ def cmap(self, c):
+ """Same as color() or c()."""
+ return self.c(c)
+
def clone(self):
"""Return a clone copy of the Volume."""
newimg = vtk.vtkImageData()