{ "info": { "author": "Pantelis Paliagkas", "author_email": "p.paliagkas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Utilities" ], "description": "CHANGES\n=======\n\n0.0.9\n ``from __future__ import division`` added to fix division operator to use\n true division as in Python 3.0 instead of classic division.\n\n\nVectors\n=======\n\nVectors is a simple library toolkit dealing with common vector and point\nlogic in the 3-dimensional space.\n\nSupports commonly used vector math functions including:\n\n- Vector magnitude\n- Addition with another vector or a real number.\n- Multiplication by another vector or a real number.\n- Dot product\n- Cross/scalar product\n- Angle between vectors\n- Check if two vectors are perpendicular, parallel or non-parallel\n\n`Github Repository `_\n\nInstallation\n============\n\n::\n\n pip install vectors\n\nDocumentation\n=============\n\nUsage\n=====\n\nThere are multiple ways to create our vector instances using the vectors\nmodule.\n\nWe can first initialize some vectors and points calling their repsective\nclass contructors as follows.\n\n.. code:: python\n\n from vectors import Point, Vector\n\n v1 = Vector(1, 2, 3) #=> Vector(1, 2, 3)\n v2 = Vector(2, 4, 6) #=> Vector(2, 4, 6)\n\n p1 = Point(1, 2, 6) #=> Point(1, 2, 3)\n p2 = Point(2, 0, 2) #=> Point(2, 4, 6)\n\nWe can also create a Point instance or a Vector instance with a list\nusing the class method from\\_list().\n\n.. code:: python\n\n components = [1.2, 2.4, 3.8]\n\n v = Vector.from_list(components) #=> Vector(1.2, 2.4, 3.8)\n\nWe can also create our Vectors from two Point instances using the\nclassmethod from\\_points().\n\n.. code:: python\n\n v = Vector.from_points(p1, p2) #=> Vector(1, -2, -4)\n\nWe can also get access to the vector array to use it with other\nlibraries.\n\n.. code:: python\n\n v1.vector #=> [1, 2, 3]\n\nMagnitude\n=========\n\nWe can get the magnitude of the vector easily.\n\n.. code:: python\n\n v1.magnitude() #==> 3.7416573867739413\n\nAddition\n========\n\nWe can add a real number to a vector or compute the vector sum of two\nvectors as follows.\n\n.. code:: python\n\n v1.add(2) #=> Vector(3.0, 4.0, 5.0)\n\n v1.sum(v2) #=> Vector(3.0, 6.0, 9.0)\n\nBoth methods return a Vector instance.\n\nMultiplication\n==============\n\nWe can multiply a vector by a real number.\n\n.. code:: python\n\n v1.multiply(4) #=> Vector(4.0, 8.0, 12.0)\n\nThe above returns a Vector instance.\n\nDot Product\n===========\n\nWe can find the dot product of two vectors.\n\n.. code:: python\n\n v1.dot(v2) #=> 0.0\n\nWe can also use angle theta on the dot function.\n\n.. code:: python\n\n v1.dot(v2. 180)\n\nDot product returns a real number.\n\nCross/Scalar Product\n====================\n\nWe can find the cross product of two vectors.\n\n.. code:: python\n\n v1.cross(v2) #=> Vector(0, 0, 0)\n\nCross product returns a Vector instance, which is always perpendicular\nto the other two vectors.\n\nAngle Theta\n===========\n\nWe can also find the angle theta between two vectors.\n\n.. code:: python\n\n v1.angle(v2) #=> 0.0\n\nAngle is a measured in degrees.\n\nParallel, Perpendicular, Non-Parallel\n=====================================\n\nWe can check if two vectors are parallel, perpendicular or non-parallel\nto each other.\n\n.. code:: python\n\n v1.parallel(v2) #=> True\n v1.perpendicular(v2) #=> False\n v1.non_parallel(v2) #=> False\n\nAll of the above return either True or False.\n\nTODO\n====\n\n- Create Analytic Geometry Toolkit based on the vectors toolkit.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/allelos/vectors", "keywords": "", "license": "The MIT License (MIT)", "maintainer": "", "maintainer_email": "", "name": "vectors", "package_url": "https://pypi.org/project/vectors/", "platform": "", "project_url": "https://pypi.org/project/vectors/", "project_urls": { "Homepage": "https://github.com/allelos/vectors" }, "release_url": "https://pypi.org/project/vectors/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A simple vector toolkit dealing with vectors and points in the 3-dimensional space", "version": "1.0.0" }, "last_serial": 2545225, "releases": { "0.0.1": [], "0.0.2": [], "0.0.3": [ { "comment_text": "", "digests": { "md5": "de3e9ae25bc2935184acc0291a769fe8", "sha256": "f8b5b6cca7495d612182e4a36e9251bb6806b2286cfd951dfe808b2ac10d9e4a" }, "downloads": -1, "filename": "vectors-0.0.3.tar.gz", "has_sig": false, "md5_digest": "de3e9ae25bc2935184acc0291a769fe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1701, "upload_time": "2015-03-10T22:37:31", "url": "https://files.pythonhosted.org/packages/3c/00/7030522fffb3ac058e97408b3d841c99f9eae850480bb25f5c1e5baacc81/vectors-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "9baf8934a6368556786d7204b33db60c", "sha256": "5ff46ab1c4a93a1efad9588a14c14299116def8beb7338c2ed3bcafa4ef1bb60" }, "downloads": -1, "filename": "vectors-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9baf8934a6368556786d7204b33db60c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1732, "upload_time": "2015-03-10T23:36:11", "url": "https://files.pythonhosted.org/packages/e8/f9/a3c13c2f9b94f9c20e0e29125ee753ff2c673edb6ac3bbad7ea8162b198f/vectors-0.0.4.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "9fdb8b7fa88f3186b2b76554a13c7d28", "sha256": "b6143287beebd3d8639c6e2f0dc785e0239a154b93c379728b9ddee1208476bc" }, "downloads": -1, "filename": "vectors-0.0.6.tar.gz", "has_sig": false, "md5_digest": "9fdb8b7fa88f3186b2b76554a13c7d28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1803, "upload_time": "2015-03-11T00:37:56", "url": "https://files.pythonhosted.org/packages/00/50/f87cdd01f2e4d76ac6dd28791f0f66b76caa021cf78ba1607467ee2f17f0/vectors-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "c5c9e4c6eebe87eae3a594a7dcaf5d81", "sha256": "69f0ccfdee778aad709e17b4897a95dd2278203c8dbbb2237fa9b66ece623e2a" }, "downloads": -1, "filename": "vectors-0.0.7.tar.gz", "has_sig": false, "md5_digest": "c5c9e4c6eebe87eae3a594a7dcaf5d81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2015, "upload_time": "2015-03-12T16:20:47", "url": "https://files.pythonhosted.org/packages/6b/e7/c2a02798e19b74b91d857c671af99a3e07233da3ca64723a014b975800fe/vectors-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "f218e13293dd922d6714b1940f374ab2", "sha256": "23af78b6008fe1119f8ab2029d02162e62deae0e15e9e5615fb218931431df28" }, "downloads": -1, "filename": "vectors-0.0.8.tar.gz", "has_sig": false, "md5_digest": "f218e13293dd922d6714b1940f374ab2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2000, "upload_time": "2015-03-12T16:22:22", "url": "https://files.pythonhosted.org/packages/22/66/3e84fc5efb06f8871b65c4fd9652a5f38bbbe996b89eec1efe2b661903aa/vectors-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "d874841954d7e71f87b5667920fa74d7", "sha256": "7bd70a95ba34fa2b635a8d02f1331b0639f92113ce45408a00a00d7659b2cac6" }, "downloads": -1, "filename": "vectors-0.0.9.tar.gz", "has_sig": false, "md5_digest": "d874841954d7e71f87b5667920fa74d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2183, "upload_time": "2015-03-17T02:51:29", "url": "https://files.pythonhosted.org/packages/79/25/349904841740206fde772cf5741bbb057a6cc9ac507a41c66a03a2e94b39/vectors-0.0.9.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "de503748f375a493f19ded1c8f6ea700", "sha256": "468b9e346e7778acf8b420dbe66f49d29c1f2e29a343652c35a77defca3e9aef" }, "downloads": -1, "filename": "vectors-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de503748f375a493f19ded1c8f6ea700", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5755, "upload_time": "2016-12-30T01:47:39", "url": "https://files.pythonhosted.org/packages/0d/6a/32b0a0edad4d76241ea59c996c2eb8d5a8fcce55b01be2b6d6495d38e78a/vectors-1.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de503748f375a493f19ded1c8f6ea700", "sha256": "468b9e346e7778acf8b420dbe66f49d29c1f2e29a343652c35a77defca3e9aef" }, "downloads": -1, "filename": "vectors-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de503748f375a493f19ded1c8f6ea700", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5755, "upload_time": "2016-12-30T01:47:39", "url": "https://files.pythonhosted.org/packages/0d/6a/32b0a0edad4d76241ea59c996c2eb8d5a8fcce55b01be2b6d6495d38e78a/vectors-1.0.0-py2.py3-none-any.whl" } ] }