{"id":23430843,"url":"https://github.com/ivy-llc/mech","last_synced_at":"2026-01-08T12:08:37.208Z","repository":{"id":37366218,"uuid":"330921165","full_name":"ivy-llc/mech","owner":"ivy-llc","description":"Mechanics functions with end-to-end support for deep learning developers, written in Ivy.","archived":false,"fork":false,"pushed_at":"2023-08-28T09:33:50.000Z","size":1839,"stargazers_count":14,"open_issues_count":1,"forks_count":9,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-26T17:21:16.433Z","etag":null,"topics":["deep-learning","jax","machine-learning","mechanics","mxnet","numpy","orientation","pose","python","pytorch","tensorflow","transformations"],"latest_commit_sha":null,"homepage":"https://unify.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivy-llc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-19T09:03:19.000Z","updated_at":"2024-10-26T06:02:51.000Z","dependencies_parsed_at":"2024-06-23T08:42:07.971Z","dependency_job_id":"8169be27-0b55-42c0-a7e5-6473ca3a5530","html_url":"https://github.com/ivy-llc/mech","commit_stats":null,"previous_names":["ivy-dl/mech","ivy-llc/mech"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fmech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fmech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fmech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fmech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivy-llc","download_url":"https://codeload.github.com/ivy-llc/mech/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643861,"owners_count":21138515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","jax","machine-learning","mechanics","mxnet","numpy","orientation","pose","python","pytorch","tensorflow","transformations"],"created_at":"2024-12-23T09:47:29.617Z","updated_at":"2026-01-08T12:08:37.179Z","avatar_url":"https://github.com/ivy-llc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/unifyai/unifyai.github.io/blob/main/img/externally_linked/logo.png?raw=true#gh-light-mode-only\n   :width: 100%\n   :class: only-light\n\n.. image:: https://github.com/unifyai/unifyai.github.io/blob/main/img/externally_linked/logo_dark.png?raw=true#gh-dark-mode-only\n   :width: 100%\n   :class: only-dark\n\n.. raw:: html\n\n    \u003cbr/\u003e\n    \u003ca href=\"https://pypi.org/project/ivy-mech/0.0.1.post0/\"\u003e\n        \u003cimg class=\"dark-light\" style=\"float: left; padding-right: 4px; padding-bottom: 4px;\" src=\"https://badge.fury.io/py/ivy-mech.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/unifyai/mech/actions?query=workflow%3Adocs\"\u003e\n        \u003cimg class=\"dark-light\" style=\"float: left; padding-right: 4px; padding-bottom: 4px;\" src=\"https://github.com/unifyai/mech/actions/workflows/docs.yml/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/unifyai/mech/actions?query=workflow%3Anightly-tests\"\u003e\n        \u003cimg class=\"dark-light\" style=\"float: left; padding-right: 4px; padding-bottom: 4px;\" src=\"https://github.com/unifyai/mech/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/G4aR9Q7DTN\"\u003e\n        \u003cimg class=\"dark-light\" style=\"float: left; padding-right: 4px; padding-bottom: 4px;\" src=\"https://img.shields.io/discord/799879767196958751?color=blue\u0026label=%20\u0026logo=discord\u0026logoColor=white\"\u003e\n    \u003c/a\u003e\n    \u003cbr clear=\"all\" /\u003e\n\n**Mechanics functions with end-to-end support for machine learning developers, written in Ivy.**\n\n.. raw:: html\n\n    \u003cdiv style=\"display: block;\" align=\"center\"\u003e\n        \u003cimg class=\"dark-light\" width=\"6%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/empty.png\"\u003e\n        \u003ca href=\"https://jax.readthedocs.io\"\u003e\n            \u003cimg class=\"dark-light\" width=\"13%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/jax_logo.png\"\u003e\n        \u003c/a\u003e\n        \u003cimg class=\"dark-light\" width=\"12%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/empty.png\"\u003e\n        \u003ca href=\"https://www.tensorflow.org\"\u003e\n            \u003cimg class=\"dark-light\" width=\"13%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/tensorflow_logo.png\"\u003e\n        \u003c/a\u003e\n        \u003cimg class=\"dark-light\" width=\"12%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/empty.png\"\u003e\n        \u003ca href=\"https://pytorch.org\"\u003e\n            \u003cimg class=\"dark-light\" width=\"13%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/pytorch_logo.png\"\u003e\n        \u003c/a\u003e\n        \u003cimg class=\"dark-light\" width=\"12%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/empty.png\"\u003e\n        \u003ca href=\"https://numpy.org\"\u003e\n            \u003cimg class=\"dark-light\" width=\"13%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/numpy_logo.png\"\u003e\n        \u003c/a\u003e\n        \u003cimg class=\"dark-light\" width=\"6%\" style=\"float: left;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/supported/empty.png\"\u003e\n    \u003c/div\u003e\n\nContents\n--------\n\n* `Overview`_\n* `Run Through`_\n* `Interactive Demos`_\n* `Get Involved`_\n\nOverview\n--------\n\n.. _docs: https://unify.ai/docs/mech/\n\n**What is Ivy Mechanics?**\n\nIvy mechanics provides functions for conversions of orientation, pose, and positional representations,\nas well as frame-of-reference transformations, and other more applied functions. Check out the docs_ for more info!\n\nThe library is built on top of the Ivy machine learning framework.\nThis means all functions simultaneously support:\nJax, Tensorflow, PyTorch, MXNet, and Numpy.\n\n**Ivy Libraries**\n\nThere are a host of derived libraries written in Ivy, in the areas of mechanics, 3D vision, robotics, gym environments,\nneural memory, pre-trained models + implementations, and builder tools with trainers, data loaders and more. Click on the icons below to learn more!\n\n.. raw:: html\n\n    \u003cdiv style=\"display: block;\"\u003e\n        \u003ca href=\"https://github.com/unifyai/mech\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_mech_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_mech.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/vision\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_vision_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_vision.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/robot\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_robot_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_robot.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/gym\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_gym_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_gym.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n        \u003ca href=\"https://pypi.org/project/ivy-mech/0.0.1.post0/\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-mech.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://pypi.org/project/ivy-vision/0.0.1.post0/\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-vision.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://pypi.org/project/ivy-robot/0.0.1.post0/\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-robot.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://pypi.org/project/ivy-gym\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\"width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-gym.svg\"\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n        \u003ca href=\"https://github.com/unifyai/mech/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\"src=\"https://github.com/unifyai/mech/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/vision/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/vision/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/robot/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/robot/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/gym/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/gym/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n        \u003ca href=\"https://github.com/unifyai/memory\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_memory_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_memory.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/builder\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_builder_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_builder.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/models\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_models_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_models.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/ecosystem\"\u003e\n            \u003cpicture\u003e\n                \u003csource class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_ecosystem_dark.png\"\u003e\n                \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_ecosystem.png\"\u003e\n            \u003c/picture\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n        \u003ca href=\"https://pypi.org/project/ivy-memory/0.0.1.post0/\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-memory.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://pypi.org/project/ivy-builder/0.0.1.post0/\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-builder.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://pypi.org/project/ivy-models\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://badge.fury.io/py/ivy-models.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/ecosystem/actions?query=workflow%3Adocs\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/ecosystem/actions/workflows/docs.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n        \u003ca href=\"https://github.com/unifyai/memory/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/memory/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/builder/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/builder/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/unifyai/models/actions?query=workflow%3Anightly-tests\"\u003e\n            \u003cimg class=\"dark-light\" width=\"15%\" style=\"float: left; margin: 0% 5%;\" src=\"https://github.com/unifyai/models/actions/workflows/nightly-tests.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n\n        \u003cbr clear=\"all\" /\u003e\n\n    \u003c/div\u003e\n    \u003cbr clear=\"all\" /\u003e\n\n\n**Quick Start**\n\nIvy mechanics can be installed like so: ``pip install ivy-mech==0.0.1.post0``\n\n.. _demos: https://github.com/unifyai/mech/tree/main/ivy_mech_demos\n.. _interactive: https://github.com/unifyai/mech/tree/main/ivy_mech_demos/interactive\n\nTo quickly see the different aspects of the library, we suggest you check out the demos_!\nWe suggest you start by running the script ``run_through.py``,\nand read the \"Run Through\" section below which explains this script.\n\nFor more interactive demos, we suggest you run either\n``target_facing_rotation_matrix.py`` or ``polar_to_cartesian_coords.py`` in the interactive_ demos folder.\n\nRun Through\n-----------\n\nWe run through some of the different parts of the library via a simple ongoing example script.\nThe full script is available in the demos_ folder, as file ``run_through.py``.\nFirst, we select a random backend framework to use for the examples, from the options\n``ivy.jax``, ``ivy.tensorflow``, ``ivy.torch``, ``ivy.mxnd`` or ``ivy.numpy``,\nand use this to set the ivy backend framework.\n\n.. code-block:: python\n\n    import ivy\n    ivy.set_backend(ivy.choose_random_backend())\n\n**Orientation Module**\n\nThe orientation module is the most comprehensive, with conversions to and from all euler conventions, quaternions,\nrotation matrices, rotation vectors, and axis-angle representations.\n\nA few of the orientation functions are outlined below.\n\n.. code-block:: python\n\n    # rotation representations\n\n    # 3\n    rot_vec = ivy.array([0., 1., 0.])\n\n    # 3 x 3\n    rot_mat = ivy_mech.rot_vec_to_rot_mat(rot_vec)\n\n    # 3\n    euler_angles = ivy_mech.rot_mat_to_euler(rot_mat, 'zyx')\n\n    # 4\n    quat = ivy_mech.euler_to_quaternion(euler_angles)\n\n    # 3, 1\n    axis, angle = ivy_mech.quaternion_to_axis_and_angle(quat)\n\n    # 3\n    rot_vec_again = axis * angle\n\n**Pose Module**\n\nThe pose representations mirror the orientation representations, with the addition of 3 values to\nrepresent the cartesian position. Again, we give some examples below.\n\n.. code-block:: python\n\n    # pose representations\n\n    # 3\n    position = ivy.ones_like(rot_vec)\n\n    # 6\n    rot_vec_pose = ivy.concat((position, rot_vec), axis=0)\n\n    # 3 x 4\n    mat_pose = ivy_mech.rot_vec_pose_to_mat_pose(rot_vec_pose)\n\n    # 6\n    euler_pose = ivy_mech.mat_pose_to_euler_pose(mat_pose)\n\n    # 7\n    quat_pose = ivy_mech.euler_pose_to_quaternion_pose(euler_pose)\n\n    # 6\n    rot_vec_pose_again = ivy_mech.quaternion_pose_to_rot_vec_pose(quat_pose)\n\n**Position Module**\n\nThe position module includes functions for converting between positional representations,\nsuch as cartesian and polar conventions,\nand for applying frame-of-reference transformations to cartesian co-ordinates.\n\nWe give some examples for conversion of positional representation below.\n\n.. code-block:: python\n\n    # conversions of positional representation\n\n    # 3\n    cartesian_coord = ivy.random_uniform(low=0., high=1., shape=(3,))\n\n    # 3\n    polar_coord = ivy_mech.cartesian_to_polar_coords(\n        cartesian_coord)\n\n    # 3\n    cartesian_coord_again = ivy_mech.polar_to_cartesian_coords(\n        polar_coord)\n\nAssuming cartesian form, we give an example of a frame-of-reference transformations below.\n\n.. code-block:: python\n\n    # cartesian co-ordinate frame-of-reference transformations\n\n    # 3 x 4\n    trans_mat = ivy.random_uniform(low=0., high=1., shape=(3, 4))\n\n    # 4\n    cartesian_coord_homo = ivy_mech.make_coordinates_homogeneous(\n        cartesian_coord)\n\n    # 3\n    trans_cartesian_coord = ivy.matmul(\n        trans_mat, ivy.expand_dims(cartesian_coord_homo, axis=-1))[:, 0]\n\n    # 4\n    trans_cartesian_coord_homo = ivy_mech.make_coordinates_homogeneous(\n        trans_cartesian_coord)\n\n    # 4 x 4\n    trans_mat_homo = ivy_mech.make_transformation_homogeneous(\n        trans_mat)\n\n    # 3 x 4\n    inv_trans_mat = ivy.inv(trans_mat_homo)[0:3]\n\n    # 3\n    cartesian_coord_again = ivy.matmul(\n        inv_trans_mat, ivy.expand_dims(trans_cartesian_coord_homo, axis=-1))[:, 0]\n\nInteractive Demos\n-----------------\n\nIn addition to the run through above, we provide two further demo scripts,\nwhich are more visual and interactive, and are each built around a particular function.\n\nRather than presenting the code here, we show visualizations of the demos.\nThe scripts for these demos can be found in the interactive_ demos folder.\n\n**Target Facing Rotation Matrix**\n\nThe first demo uses the method ``ivy_mech.target_facing_rotation_matrix`` to dynamically\ntrack a moving target plant pot with a camera, as shown below:\n\n.. raw:: html\n\n    \u003cp align=\"center\"\u003e\n        \u003cimg width=\"75%\" style=\"display: block;\" src='https://github.com/unifyai/unifyai.github.io/blob/main/img/externally_linked/ivy_mech/demo_a.gif?raw=true'\u003e\n    \u003c/p\u003e\n\n**Polar to Cartesian Co-ordinates**\n\nThe second demo uses the method ``ivy_mech.polar_to_cartesian_coords`` to convert a polar depth image\nacquired from an omni-directional camera into cartesian co-ordinates,\nenabling the surrounding geometry to be represented as a point cloud, for interactive visualization.\n\n.. raw:: html\n\n    \u003cp align=\"center\"\u003e\n        \u003cimg width=\"75%\" style=\"display: block;\" src='https://github.com/unifyai/unifyai.github.io/blob/main/img/externally_linked/ivy_mech/demo_b.gif?raw=true'\u003e\n    \u003c/p\u003e\n\nGet Involved\n------------\n\nWe hope the functions in this library are useful to a wide range of machine learning developers.\nHowever, there are many more areas of mechanics which could be covered by this library.\n\nIf there are any particular mechanics functions you feel are missing,\nand your needs are not met by the functions currently on offer,\nthen we are very happy to accept pull requests!\n\nWe look forward to working with the community on expanding and improving the Ivy mechanics library.\n\nCitation\n--------\n\n::\n\n    @article{lenton2021ivy,\n      title={Ivy: Templated deep learning for inter-framework portability},\n      author={Lenton, Daniel and Pardo, Fabio and Falck, Fabian and James, Stephen and Clark, Ronald},\n      journal={arXiv preprint arXiv:2102.02886},\n      year={2021}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivy-llc%2Fmech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivy-llc%2Fmech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivy-llc%2Fmech/lists"}