PyTorusThreePoints
Draw a torus passing through three given points.
Usage
import numpy as np
import pyvista as pv
from torus_three_points.main import torusThreePoints
plotter = pv.Plotter()
torusThreePoints(
plotter, p1, p2, p3, r, S=64, s=32, show=False, ....
)
Arguments
plotter
: PyVista plotter regionp1, p2, p3
: three points (numpy arrays)r
: minor radiusS,s
: numbers of subdivisions for the torus meshshow
: whether to show the figure (ifTrue
, this closes the plotter)...
: parameters passed on topyvista.add_mesh
, such assmooth_shading=True, color="red", specular=0.9
Instead of setting show=True
, you can run plotter.show()
once you're done.