Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
rtgs 0.1.0 documentation
rtgs 0.1.0 documentation
  • Get Started
  • Technical Blogs
    • Coordinate System
    • Quaternion
    • Fast GPU Parallel BVH
    • Spherical Harmonics
  • API Reference
    • rtgs
      • rtgs.utils
        • rtgs.utils.ti_math
        • rtgs.utils.quaternion
        • rtgs.utils.math
        • rtgs.utils.types
      • rtgs.rasterizer
      • rtgs.gaussian
      • rtgs.bounding_box
      • rtgs.bvh
      • rtgs.__main__
      • rtgs.camera
      • rtgs.scene
      • rtgs.solver
      • rtgs.ray
      • rtgs.ray_tracer
Back to top
View this page

Quaternion¶

Quaternion Representation¶

All the quaternion in this project are represented using scalar-last vec4 ordered as (x, y, z, w). This is different from the order in numpy-quaternion library as we are following the order defined in Taichi.

Quaternion Math¶

The quaternion math implemented in this project follows the CS 348A Lecture Notes.

We implemented following quaternion math in Taichi:

  • mul

  • conj

  • inv

  • from_axis_angle

  • as_axis_angle

  • rot_vec3

  • as_rotation_mat3

  • as_rotation_mat4

Next
Fast GPU Parallel BVH
Previous
Coordinate System
Copyright © 2025, Fangjun Zhou, Coco Xu
Made with Sphinx and @pradyunsg's Furo
On this page
  • Quaternion
    • Quaternion Representation
    • Quaternion Math