See also

This page was generated from examples/example14.ipynb.

Download the Jupyter Notebook for this section: example14.ipynb. View in nbviewer.

The sGFRD Method

The numpy-stl module is required for visualizations of a STL mesh.

# !pip install numpy-stl
import stl
/home/kaizu/.local/share/virtualenvs/python-eSbFG-Wg/lib/python3.7/importlib/ FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  return f(*args, **kwds)

Set Plotly as the default backend.

from ecell4.prelude import *
import ecell4.plotting
import ecell4.plotting._plotly
ecell4.plotting.BACKEND = ecell4.plotting._plotly
from ecell4.plotting._plotly import plot_stl
f = sgfrd.Factory()

Diffusion on a Triangle Mesh

Here is a STL-format file named stanford_bunny.stl: