transpile-ai / mech Goto Github PK
View Code? Open in Web Editor NEWMechanics functions with end-to-end support for deep learning developers, written in Ivy.
Home Page: https://unify.ai
License: Apache License 2.0
Mechanics functions with end-to-end support for deep learning developers, written in Ivy.
Home Page: https://unify.ai
License: Apache License 2.0
Hi everyone,
It seems like there is code for preventing gimbal lock, which interferes with valid Euler rotations as well.
Experiment was performed with Python 3.9 and
ivy-core=1.1.10=pypi_0
ivy-mech=1.1.9=pypi_0
For easier copy/paste, here the code itself:
import numpy as np
import ivy
import ivy_mech
import math
#%%
ivy.set_framework(ivy.numpy)
#%%
rot_order = "zyx"
#%%
in_degree_euler = ivy.array([0, 0, 90])
in_degree_euler
#%%
in_rad_euler = ivy.array([math.radians(x) for x in in_degree_euler])
in_rad_euler
#%%
rot_mat = ivy_mech.euler_to_rot_mat(in_rad_euler, convention=rot_order)
rot_mat
#%%
out_rad_euler = ivy_mech.rot_mat_to_euler(rot_mat, convention=rot_order)
out_rad_euler
#%%
out_degree_euler = ivy.array([math.degrees(x) for x in out_rad_euler])
out_degree_euler
Thanks,
Janis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.