See also

This page was generated from examples/example14.ipynb.

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

https://colab.research.google.com/assets/colab-badge.svg https://mybinder.org/badge_logo.svg

The sGFRD Method

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

[1]:
# !pip install numpy-stl
import stl
/home/kaizu/.local/share/virtualenvs/python-eSbFG-Wg/lib/python3.7/importlib/_bootstrap.py:219: 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.

[2]:
from ecell4.prelude import *
[3]:
import ecell4.plotting
import ecell4.plotting._plotly
ecell4.plotting.BACKEND = ecell4.plotting._plotly
from ecell4.plotting._plotly import plot_stl
[4]:
f = sgfrd.Factory()

Diffusion on a Triangle Mesh

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

[5]:
plot_stl("stanford_bunny.stl")