A Python module to manipulate generalized Screws and Coscrews in Geometric Algebra (real Clifford algebra).
Project description
GScrew (Generalized Screw Calculus)
Description
A Python module to manipulate generalized Screws and Coscrews with geometric algebras (real Clifford algebras).
Installation
A Pypi package is available, please refer to the Pypi page or enter pip install gscrew in a terminal.
Exemples
First of all, you need to import the modules:
import gscrew
from gscrew.geometric_algebra import GeometricAlgebra
from gscrew.screw import Screw
The screw module also provides a CoScrew object and the comoment function for calculating the comoment between a coscrew and a screw.
Once these modules have been imported, we can create the geometric algebra in which we will be working. For basic physical applications, a three-dimensionnal algebra should suffice:
my_algebra = GeometricAlgebra(3)
locals().update(my_algebra.blades)
The second line adds the basis blades to the local variables so that we will be able to create new multivectors just by performing linear combinations of these basis blades. For a 3D algebra, the basis blades are: s, e1, e2, e3, e12, e13, e32, e123.
We can now start working with Screw and CoScrew classes:
O = 0 * s # the origin of the reference frame
S = 1 + (2*e2) + (3*e3) # the resultant of the screw
M = (e1) + (5*e3) # the moment of the screw
my_screw = Screw(O, S, M)
Licence
All the code is provided under the GNU General Public Licence v3.0+ (GPLv3+)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gscrew-1.1.0.tar.gz.
File metadata
- Download URL: gscrew-1.1.0.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
affac69a74a6aa61d793d8bb081e95d51daf4a6296aab8388d1d3e02cb85be02
|
|
| MD5 |
0fbfb98567b296cfb80f9c559e7606d6
|
|
| BLAKE2b-256 |
48bf6945cfad14fa07a8be043d916d6ef5f13b32665d5f9f732e764587d42f78
|
File details
Details for the file gscrew-1.1.0-py3-none-any.whl.
File metadata
- Download URL: gscrew-1.1.0-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb2123e380e3561a4b24094cc2b62cbde75432d4b9e4be748f46e8bd15948d72
|
|
| MD5 |
ee76beca65ac8f3f9d0d1d33d75e58fe
|
|
| BLAKE2b-256 |
1370635463c3a9648ac92ae8e115d3ad370baba9214bc76f81e26184c9a8076d
|