Skip to content

Python random rotation matrix generators (currently in 2D and 3D)

License

Notifications You must be signed in to change notification settings

andreyzhitnikov/randrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randrot

Build Status

Python random rotation matrix generators (currently in 2D and 3D).

Generate uniformly distributed random rotation matrices in 2D and 3D. The 2D case is trivial. The 3D case is based on an algorithm described in Arvo 1992.

Installation

pip install git+https://github.com/qobilidop/randrot.git#egg=randrot

Usage

>>> import numpy as np
>>> import randrot
>>> np.random.seed(0)
>>> randrot.generate(2)
matrix([[-0.95333378,  0.30191837],
        [-0.30191837, -0.95333378]])
>>> np.random.seed(0)
>>> randrot.generate(3)
matrix([[ 0.97631838,  0.04135264, -0.21234968],
        [-0.19851343, -0.21892019, -0.95533574],
        [-0.08599329,  0.9748661 , -0.20552675]])

Roadmap

See also

This project does solve the problem it aims to solve. But it's rather simple and feature-poor. Actually it also serves as a laboratory for me to learn to make a Python package. There are other Python packages you might be interested to check out:

About

Python random rotation matrix generators (currently in 2D and 3D)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages