Table Of Contents

Previous topic

pyviblib.gui.main

Next topic

pyviblib.gui.resources

This Page

pyviblib.gui.rendering

Module for 3D rendering implemented with VTK

Classes

BaseNode
base class for 3D objects used in PyVib2
AtomNode
atoms
BondNode
bonds
VibratingAtomNode
vibrational motion on atoms
TriangleNode
triangle
ScalarSphereNode
sphere whose size is dependent on scalar a value
TextFollowerNode
text which follows a camera

Functions

create_sphere()
create a sphere
create_cylinder()
create a cylinder
orient_actor()
orientate an actor in a certain direction
Author:Maxim Fedorovsky
pyviblib.gui.rendering.create_sphere(r, pos, resolution, start_theta=0.0, end_theta=360.0, start_phi=0.0, end_phi=180.0)

Create a sphere.

Parameters:
  • r – radius
  • pos – position (null-based array)
  • resolution – number of points in the longitude and latitude directions
  • start_theta – the starting longitude angle
  • end_theta – the ending longitude angle
  • start_phi – the starting latitude angle
  • end_phi – the ending latitude angle
Returns:the sphere source and sphere actor
pyviblib.gui.rendering.create_cylinder(c, r, height, resolution)

Create a cylinder.

Parameters:
  • c – cylinder center (null-based array)
  • r – radius
  • height – height
  • resolution – the number of facets used to define the cylinder
Returns:the cylinder source and cylinder actor
pyviblib.gui.rendering.orient_actor(actor, dir_vector)

Orientate an actor in a cerain direction.

Parameter:dir_vector – direction of the actor(zerp-based array)

SourceForge.net Logo