Coder Social home page Coder Social logo

qmat-geqs / gscrew Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 69 KB

A Python module to manipulate generalized Screws and Coscrews with geometric algebras (Clifford algebras).

Home Page: http://gscrew.rtfd.io/

License: GNU General Public License v3.0

Python 100.00%
geometric-algebra geometry physics screws

gscrew's Introduction

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
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 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+)

gscrew's People

Contributors

antoine-royer avatar loris-delafosse avatar

Watchers

 avatar

gscrew's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.