Skip to main content

Planar Overview

Planar is a 2D geometry library for Python. It is intended for use by games and interactive real-time applications, but is designed to be useful for most any program that needs a convenient, high-performance geometry API.

Planar is being developed as part of the larger Grease game framework. However, it is a standalone library and has no external dependencies besides Python, and optionally a C compiler.

Planar is purely a math library, presentation, graphical or otherwise is left up to the application.

Project Goals

  • Do one thing, 2D geometry, and do it well.

  • Provide a high-level, clean, Pythonic API.

  • All APIs have both a Python reference implementation and a high performance implementation in C with the same interface.

  • Compatibility with Python 2.6+, and Python 3.1+

  • 100% test coverage.

  • Full narrative and API reference documentation.

  • Platform-independent.

  • Release early and often.

  • Be responsive to community input.

  • Don’t take ourselves too seriously.

License

Planar is distributed under the terms of the new BSD license. You are free to use it for commercial or non-commercial projects with little or no restriction, all we ask is that:

  • Redistributions of the code, in whole or part, retain the original copyright notice and license text.

  • You do not claim our endorsement of any derived product.

For a complete text of the license see the LICENSE.txt file in the source distrbution.

Acknowledgements

The API for planar, and some of the code is derived from the excellent work done by the Super Effective Team, thanks guys!

Requirements

Planar requires Python 2.6, 2.7, 3.1, or better.

To experience the exhilaration of native-code performance, a C compiler is required. If someone volunteers, binary releases for platforms where this is not common (you know who you are) will be happily made available.

Downloading Planar

Planar releases can be downloaded from the python package index (pypi):

You can get the latest code in development from the planar mercurial repository on bitbucket:

Installation

To build and install Planar from the source distribution or repository use:

python setup.py install

To install only the pure-Python modules without compiling, use:

python setup.py build_py install --skip-build

Only performance is sacrificed without the C extensions, all functionality is still available when using only the pure-Python modules.

Tests

Planar requires nose for testing. You can install it for Python 2.x using easy_install:

easy_install nose

For Python 3.x, you can download and install distribute from here:

For now, you can get a copy of nose3 for Python 3.x, patched to install properly on Python 3.1 here:

Once nose is installed you can run the tests from the source directory using nosetests, first building the C extensions, like so (on Unix):

python setup.py build && nosetests -d -w build/lib.*/planar/

This runs the tests inside the build directory so that the C extensions can be tested. You can put a 3 suffix on the python and nosetests commands above for Python 3.x.

Documentation

You can browse the documentation online here:

The same documentation is also available for offline browsing in the doc/build/html subdirectory of the source distribution.

Contributing and Getting Support

Come visit us at the Grease users google group to get help, moral support, lavish praise, complain bitterly, report a bug, or contribute ideas:

Metadata

Release files for chalk-planar 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chalk-planar 0.4
File Size Uploaded Provenance Actions
chalk_planar-0.4.tar.gz 523.3 kB Without provenance Details for chalk_planar-0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chalk-planar 0.4
File Interpreter ABI Platform Actions
chalk_planar-0.4-py3-none-any.whl Python 3 none any Details for chalk_planar-0.4-py3-none-any.whl

Total release size: 585.9 kB

Release files / chalk_planar-0.4.tar.gz

Download URL chalk_planar-0.4.tar.gz
Size 523.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cc315e9b39fa0a9cd3ba21d30ac631c4032e8f30643b52edfde69c5fbda68cb9
BLAKE2b-256 checksum
How to use checksums
02c51e4791ce98ceed962938a4a5cd9515d494237134eee23dac45887d690843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Release files / chalk_planar-0.4-py3-none-any.whl

Download URL chalk_planar-0.4-py3-none-any.whl
Size 62.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98774931e4e9420377f3e5638f07b07630934ffff28e61184a9285a6d7ecc4ac
BLAKE2b-256 checksum
How to use checksums
13d61245b0f90b312b3ba9bc1f4793f610b1ebe0215b45de56d7bf009b10ab8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Security for chalk-planar 0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page