Skip to main content

A Python module to manipulate Screws and Coscrews with geometrics algebra (Clifford's Algebra).

Project description

GScrew (Generalized Screw Calculus)

Documentation Status Licence Build Status

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.geometric_algebra as ga
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 = ga.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 direction 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gscrew-1.0.7.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

gscrew-1.0.7-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file gscrew-1.0.7.tar.gz.

File metadata

  • Download URL: gscrew-1.0.7.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for gscrew-1.0.7.tar.gz
Algorithm Hash digest
SHA256 160b6c690c5894197668966f211f58d09a78f9e4ef6ec3a0e2c448ecaf3e5491
MD5 105ec7065ec5144060c52480c2e5c8c6
BLAKE2b-256 c5d16e31a1e4fe21e277a9932104fbe57066a1f198d38674a40bedf5ee415819

See more details on using hashes here.

File details

Details for the file gscrew-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: gscrew-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for gscrew-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7e8c2e7d73fd3ffe0783481db3ea91395ebd2688c8f24759085edabe2aa5bb80
MD5 9bc168c6aff29a319d4ea1b58a7f98a7
BLAKE2b-256 b3e60dd02b63874e2e92d41588f4c1ffa56db27a5738dbc0125a68c0d95ed121

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page