{ "info": { "author": "NOhs", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": "|test| |coverage| |documentation| |pypi| |license| |codacy|\n\n.. |test| image:: https://travis-ci.org/NOhs/mgen.svg?branch=master\n :target: https://travis-ci.org/NOhs/mgen\n.. |coverage| image:: https://coveralls.io/repos/github/NOhs/mgen/badge.svg\n :target: https://coveralls.io/github/NOhs/mgen\n.. |documentation| image:: https://readthedocs.org/projects/mgen/badge/?version=latest\n :target: http://mgen.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. |pypi| image:: https://badge.fury.io/py/mgen.svg\n :target: https://badge.fury.io/py/mgen\n\n.. |license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg\n :target: https://opensource.org/licenses/BSD-3-Clause\n \n.. |codacy| image:: https://api.codacy.com/project/badge/Grade/ab622cde22a24af4b9bcb62a49002936 \n :target: https://www.codacy.com/app/NOhs/mgen?utm_source=github.com&utm_medium=referral&utm_content=NOhs/mgen&utm_campaign=Badge_Grade\n\nMGen: Convenient matrix generation functions\n============================================\n\nPython and its most popular packages do not offer out-of-the-box convenient\nfunctions to generate rotation matrices. While there are other projects\nthat offer rotation and vector classes, or offer rotations via the use of quaternions,\nif you simply want a rotation matrix, for example if other packages require them\nas an input, or you do not wish to change your current data structure to use\nspecial rotation classes, the common suggestion is to implement them yourself\n(see for example this discussion on SE:\nhttps://stackoverflow.com/questions/6802577/rotation-of-3d-vector). However,\neverybody implementing their own version of the same thing can hardly be seen as\nideal.\n\nTherefore, this package provides simple functions to generate rotation matrices\nin 2d for a given angle or in 3d for a given axis and angle, or for three given\nangles (proper Euler angles or Tait-Bryan angles).\n\nAdditionally, n-dimensional rotations can be generated using an angle and two\northogonal vectors that span the plane of rotation.\n\nTrivial example usage\n----------------------\n\nBelow you see examples of how to use mgen to generate rotation matrices. For further\ndocumentation please have a look here: https://mgen.readthedocs.io\n\n.. code:: python\n\n import numpy as np\n np.set_printoptions(suppress=True)\n\n from mgen import rotation_around_axis\n from mgen import rotation_from_angles\n from mgen import rotation_around_x\n from mgen import rotation_from_angle_and_plane\n from mgen import rotation_from_angle\n from mgen import random_matrix\n\n # 2D example\n matrix = rotation_from_angle(np.pi/2)\n matrix.dot([1, 0])\n # array([0., 1.])\n\n #3D examples\n matrix = rotation_from_angles([np.pi/2, 0, 0], 'XYX')\n matrix.dot([0, 1, 0])\n # array([0., 0., 1.])\n\n matrix = rotation_around_axis([1, 0, 0], np.pi/2)\n matrix.dot([0, 1, 0])\n # array([0., 0., 1.])\n\n matrix = rotation_around_x(np.pi/2)\n matrix.dot([0, 1, 0])\n # array([0., 0., 1.])\n\n # n-dimensional example\n matrix = rotation_from_angle_and_plane(np.pi/2, (0, 1, 0, 0), (0, 0, 1, 0))\n matrix.dot([0, 1, 0, 0])\n # array([0., 0., 1., 0.])\n\n # n-dimensional random matrix O(n), e.g. n=27\n matrix = random_matrix(27)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/NOhs/mgen", "keywords": "matrix,rotations,Euler angles", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "mgen", "package_url": "https://pypi.org/project/mgen/", "platform": "", "project_url": "https://pypi.org/project/mgen/", "project_urls": { "Homepage": "https://github.com/NOhs/mgen" }, "release_url": "https://pypi.org/project/mgen/1.2.0/", "requires_dist": null, "requires_python": "", "summary": "Package to generate rotation matrices", "version": "1.2.0" }, "last_serial": 3774091, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "48b95a9836536bcb157b054a5c47c554", "sha256": "ef2da0e87cc7e63332f95bf27175b1a1952bc38e16284ef3878a965a83e8935f" }, "downloads": -1, "filename": "mgen-1.0.0.tar.gz", "has_sig": false, "md5_digest": "48b95a9836536bcb157b054a5c47c554", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10497, "upload_time": "2018-02-03T18:52:15", "url": "https://files.pythonhosted.org/packages/71/10/ef7145631080b152544e87e029e731ad466a0e9679ebca885038b1aa83ca/mgen-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b7055033bf65f8daf7085bc76edef84c", "sha256": "191a5ae5c903719abfcc71f5c781f140056f736c5938666d0739d0c06b4061ac" }, "downloads": -1, "filename": "mgen-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b7055033bf65f8daf7085bc76edef84c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13634, "upload_time": "2018-02-17T01:25:57", "url": "https://files.pythonhosted.org/packages/1f/49/45851a8fb3190031d2b7b666bd0b37d7f32e0318afd60bd2783ad58409a1/mgen-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "bcf66539534b5ba7ca50f46e563af6ec", "sha256": "02a44e92d51e72db643bf2e081fd913accea22e5dd65784edebc68d15b0297d5" }, "downloads": -1, "filename": "mgen-1.1.1.tar.gz", "has_sig": false, "md5_digest": "bcf66539534b5ba7ca50f46e563af6ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13651, "upload_time": "2018-04-11T16:47:21", "url": "https://files.pythonhosted.org/packages/ba/bc/d9d369490b0b048678dcd363fb405210638363bde6b9847bce3b0d88895a/mgen-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "650a8633e5b1445f89b33be42ae1f7f5", "sha256": "e1e621bcf82d1676cbe38eadb1084be9827d83e050076fbedb9d617f8f058848" }, "downloads": -1, "filename": "mgen-1.2.0.tar.gz", "has_sig": false, "md5_digest": "650a8633e5b1445f89b33be42ae1f7f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13794, "upload_time": "2018-04-17T17:19:26", "url": "https://files.pythonhosted.org/packages/88/71/c28f42dd68760e1daabcdf33e79a69af7face57e0128c2b001783e28ca1f/mgen-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "650a8633e5b1445f89b33be42ae1f7f5", "sha256": "e1e621bcf82d1676cbe38eadb1084be9827d83e050076fbedb9d617f8f058848" }, "downloads": -1, "filename": "mgen-1.2.0.tar.gz", "has_sig": false, "md5_digest": "650a8633e5b1445f89b33be42ae1f7f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13794, "upload_time": "2018-04-17T17:19:26", "url": "https://files.pythonhosted.org/packages/88/71/c28f42dd68760e1daabcdf33e79a69af7face57e0128c2b001783e28ca1f/mgen-1.2.0.tar.gz" } ] }