Skip to content

stla/PyTorusThreePoints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 region
  • p1, p2, p3: three points (numpy arrays)
  • r: minor radius
  • S,s: numbers of subdivisions for the torus mesh
  • show: whether to show the figure (if True, this closes the plotter)
  • ...: parameters passed on to pyvista.add_mesh, such as smooth_shading=True, color="red", specular=0.9

Instead of setting show=True, you can run plotter.show() once you're done.

About

Draw a torus passing through three given points.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages