Quaternion (hypercomplex number) This implementation of quaternions is not complete; only the features needed for representing rotation matrices by quaternions are implemented. Constructor: - Quaternion(|q0|, |q1|, |q2|, |q3|) (from four real components) - Quaternion(|q|) (from a sequence containing the four components) Quaternions support addition, subtraction, and multiplication, as well as multiplication and division by scalars. Division by quaternions is not provided, because quaternion multiplication is not associative. Use multiplication by the inverse instead. The four components can be extracted by indexing.

Definition at line 11 of file Quaternion.py.

## Public Member Functions | |

def | __add__ |

def | __div__ |

def | __getitem__ |

def | __init__ |

def | __mul__ |

def | __rdiv__ |

def | __repr__ |

def | __rmul__ |

def | __sub__ |

def | asMatrix |

def | asRotation |

def | dot |

def | inverse |

def | norm |

def | normalized |

## Public Attributes | |

array | |

## Static Public Attributes | |

int | is_quaternion = 1 |

## Static Private Attributes | |

tuple | _matrix = Numeric.zeros((4,4,4)) |

tuple | _rot = Numeric.zeros((3,3,4,4)) |

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

- ScientificPython-2.4.11/Scientific/Geometry/Quaternion.py

Generated by Doxygen 1.6.0 Back to index