Giter Club home page Giter Club logo

pygeo3d's Introduction

pygeo3d

About pygeo3d

pygeo3d (py-geometry-3d) is a vast mathematical module providing (real) 3-dimensional objects, i.e. Points, Lines and Planes as Python objects through classes.

Date of creation: April 22, 2021
Date of first release on PyPI: May 06, 2021

Using this module, 3-dimensional geometry can be easily executed in Python. Along with providing calulative tools, it also allows a user to visualize Points, Lines and Planes on a 3D plot, and can be used as a learning tool to enhance a student's 3D visualization capabilities. The module is enriched with help-text and examples.

Included classes and functions

To access the help-text of a class to know more about it, run:

help(pygeo3d.classname)

About the class Point

Point(x, y, z) represents the position vector of a Point (x, y, z) in 3-dimensional Cartesian coordinate space. The difference of two Points gives a Vector, while the addition of a Vector to a Point gives another Point.

About the class Line

Line(a, b) represents the vector equation of a Line r = a + Kb in 3-dimensional Cartesian coordinate space. A Line can be indexed/sliced by real numbers to get the Point(s) that lie on the line for the given values of parameter k. Membership testing on a Line allowes a user to check if a Point lies on it.

About the class Plane

Plane(r, n) represents the vector equation of a Plane r โ€ข n = d in 3-dimensional Cartesian coordinate space. Membership testing on a Plane allows a user to check if a Point/Line lies on it.

All classes have various other methods, and even alternate constructors. Users are advised to look at the documentation for more efficient usage.

Some functions

A variety of functions have been provided inn the module, which include functions to calculate/check:

  • Euclidean distance between Points, Lines, and Planes
  • Angle between Lines and Planes
  • Intersections of Lines and Planes
  • Images and Projections of Points and Lines in/on Lines/Planes
  • If a list of Points are collinear/coplanar
  • If some Lines or Planes are parallel or perpendicular

And so on. Users are advised to run the following command in Python to get to know about all the available functions:

dir(pygeo3d)

Update History

Updates (0.0.5)

  • Minor bug fixes
  • Alternate constructor Point.FromSequence(seq) for Point can now accept generators/generator-expressions as argument
  • More colors available for plotting

Updates (0.0.6)

Line objects now support slicing, which returns a tuple of Points on the Line at the indices given in the slice

Updates (0.0.7)

Minor bug fixes

Updates (0.0.8)

  • Minor bug fixes: Fixed more issues of floating point precision
  • Removed the function plot_random_objects()
  • Better type hinting

Footnotes

This project is dependent upon the following of my own modules, available through PyPI:

Run

To use, execute:

pip3 install pygeo3d

Import this file in your project, whenever needed, using:

import pygeo3d

pygeo3d's People

Contributors

divyajeettt avatar

Stargazers

 avatar

Watchers

 avatar

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.