Documentation
¶
Overview ¶
Package vtk wraps the visualisation tool kit (VTK) for drawing 3D surfaces (scalar fields, vector fields, etc.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arrow ¶
type Arrow struct { // options X0 []float64 // origin of arrow V []float64 // vector defining arrow ConePct float64 // percentage of length to draw tip cone ConeRad float64 // radius of cone CyliRad float64 // cylinder radius Resolution int // resolution of cross-section Color []float64 // {red, green, blue, opacity} // contains filtered or unexported fields }
Arrow adds an arrow to Scene
type IsoSurf ¶
type IsoSurf struct { // options Limits []float64 // {xmin,xmax, ymin,ymax, zmin,zmax} Ndiv []int // {nx, ny, nz}. all must be >= 2 Frange []float64 // {fmin, fmax}. min and max values of isosurface levels OctRotate bool // apply rotation to octahedral reference system Nlevels int // number of isosurface levels (0 or 1 => just one @ Levelmin) CmapType string // colormap type. e.g. "warm" CmapNclrs int // colormap number of colors CmapRangeType int // colormap range type CmapFrange []float64 // colormap fmin and fmax Color []float64 // {red, green, blue, opacity} ShowWire bool // show wireframe of main object GridShowPts bool // show underlying grid // contains filtered or unexported fields }
IsoSurf holds data to generate isosurfaces
CmapNclrs: 0 => use fixed color CmapRangeType: 0 => [default] use sgrid range values (automatic) 1 => use Frange 2 => use CmapFrange
type Scene ¶
type Scene struct { // options AxesLen float64 // length of x-y-z axes HydroLine bool // show hydrostatic line Reverse bool // reverse direction for default camera FullAxes bool // show negative and positive portions of axes WithPlanes bool // show transparent auxiliary planes Interact bool // run interactive mode SaveEps bool // save eps figure upon exit SavePng bool // save png figure upon exit PngMag int // magnification for png file Fnk string // file name key (without .png) LblX string // label for x-axis LblY string // label for y-axis LblZ string // label for z-axis LblSz int // size of labels in points LblClr []float64 // r,g,b color components for labels // window Zoom float64 // zoom Width int // width of window Height int // height of window // contains filtered or unexported fields }
Scene holds essential data to draw and interact with the x-y-z Cartesian system
type Sphere ¶
type Sphere struct { // options Cen []float64 // centre x-y-z coordinates R float64 // radius Color []float64 // {red, green, blue, opacity} // contains filtered or unexported fields }
Sphere adds a sphere to Scene
type Spheres ¶
type Spheres struct { // options X []float64 // x coordinates Y []float64 // y coordinates Z []float64 // z coordinates R []float64 // radii Color []float64 // {red, green, blue, opacity} // contains filtered or unexported fields }
Spheres adds a set of spheres (e.g. particles) to Scene
func NewSpheresFromFile ¶
NewSpheresFromFile add spheres (e.g. particles) by reading a file in the following format
x y z r 0.0 0.0 0.0 0.1 1.0 0.0 0.0 0.1 ...
Click to show internal directories.
Click to hide internal directories.