Skip to main content

A python library for basic geometry plotting that uses matplotlib as client

Project description

bgplot

alt text

Basic Geometry Plotter (bgplot) is a simple python library used for fast and quick geometric graphics representation.

Installation

pip install bgplot

Basic Usage

import bgplot as bgp
from bgplot.entities import Point, Vector, Line, Plane, Axes

# Create graphics object
graphics: bgp.Graphics = bgp.Graphics()

# Personalize the graphic representation
graphics.set_limits(xlim=(0.0, 1.2),
                    ylim=(0.0, 1.5),
                    zlim=(0.0, 1.0))
graphics.set_view(azimut=-50.0, elevation=20.0)
graphics.disable('ticks', 'axes', 'walls')
graphics.set_background_color(bgp.Colors.white)

# Entities
point: Point = Point(1.0, 1.0, 1.0)
vector: Vector = Vector(0.0, 0.0, -1.0)
line: Line = Line.from_vector_and_point(vector, point)
plane: Plane = Plane.from_normal_vector_and_point(Vector(0.0, 0.0, 1.0),
                                                  Point(0.0, 0.0, 0.0))
axes: Axes = Axes(Vector(1.0, 0.0, 0.0),
                  Vector(0.0, 1.0, 0.0),
                  Vector(0.0, 0.0, 1.0))
intersection_point: Point = bgp.ops.get_intersection_of_line_and_plane(line,
                                                                       plane)

# Representation
graphics.add_point(point)
graphics.add_vector(vector, position=point, color=bgp.Colors.pink)
graphics.add_line(line, style='--', line_range=(0.0, 1.0),
                  color=bgp.Colors.gray, linewidth=0.7)
graphics.add_plane(plane, center=intersection_point, alpha=0.3)
graphics.add_axes(axes)
graphics.add_point(intersection_point, color=bgp.Colors.red)

graphics.set_title('Visual representation')
graphics.show()

alt text

Documentation

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

bgplot-0.0.11.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

bgplot-0.0.11-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file bgplot-0.0.11.tar.gz.

File metadata

  • Download URL: bgplot-0.0.11.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for bgplot-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b1d74d8b13abd234f49ce1850b1aa4be2c61cc9f4a29bb05a00a69d0dd54edfc
MD5 be4ac5be716b4bcd700f74ac6590c9ba
BLAKE2b-256 6dbbe998cc1e3f0f4e145019d8ff2d2ce8a0421991553899f24a7c59e4f10801

See more details on using hashes here.

File details

Details for the file bgplot-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: bgplot-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for bgplot-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 af4926e66ac2ed21e87aba9cc61cf9e4d7386c2369796197516f34edeaf3a98c
MD5 82824f0389ba1de3cabe8a587c4efcd3
BLAKE2b-256 831602a8451796f80f70735e6a43018a31738050746e00bc38f3830fbaed0c02

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