Asy-Atoms
An asymptote package for rendering atomic structures
Public Member Functions | Data Fields
Basis Struct Reference

Vector basis object. More...

Public Member Functions

void operator init (triple a, triple b, triple c)
 
void normalise ()
 
real[][] getMatrix ()
 
bool isComplete ()
 
triple getCoordinates (triple coordinates)
 
triple getCartesian (triple coordinates)
 
void draw (bool unit_vectors=false, bool draw_label=true)
 Draw a "repere".
 

Data Fields

triple a
 Vector 1.
 
triple b
 Vector 2.
 
triple c
 Vector 3.
 
Label a_label = Label("a",1)
 Label for vector a.
 
Label b_label = Label("b",1)
 Label for vector b.
 
Label c_label = Label("c",1)
 Label for vector c.
 
triple origin = (0,0,0)
 Origin point for drawing.
 

Detailed Description

Vector basis object.

This structure is used to define a Basis from 3 vectors. These vectors needn't be orthogonal.

Member Function Documentation

triple Basis::getCartesian ( triple  coordinates)
inline

Get usual cartesian coordinates from a vector in the basis coordinates.

Parameters
coordinatesGeneric vector expressed in the coordinates of the basis.
triple Basis::getCoordinates ( triple  coordinates)
inline

Get usual cartesian coordinates from a vector in the basis coordinates.

Parameters
coordinatesof a vector expressed in cartesian (canonical coordinates).
Returns
Coordinates of the vector expressed in the basis.
bool Basis::isComplete ( )
inline

Returns true if the basis spans \(\mathbf R^3\).

void Basis::normalise ( )
inline

Normalise the basis

This function changes the basis vectors into unit vectors along the same direction

void Basis::operator init ( triple  a,
triple  b,
triple  c 
)
inline

Constructor of the Basis structure.

Parameters
aThe first vector
bThe second vector
cThe third vector

The documentation for this struct was generated from the following file: