{ "info": { "author": "Michael Hirsch, Ph.D.", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Fortran", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Visualization" ], "description": "[![Travis CI](https://travis-ci.org/scivision/lineclipping-python-fortran.svg?branch=master)](https://travis-ci.org/scivision/lineclipping-python-fortran)\n[![Coverage Status](https://coveralls.io/repos/github/scivision/lineclipping-python-fortran/badge.svg?branch=master)](https://coveralls.io/github/scivision/lineclipping-python-fortran?branch=master)\n[![AppVeyor](https://ci.appveyor.com/api/projects/status/cr0omkhjvgwcyxiy?svg=true)](https://ci.appveyor.com/project/scivision/lineclipping-python-fortran)\n[![PyPi versions](https://img.shields.io/pypi/pyversions/pylineclip.svg)](https://pypi.python.org/pypi/pylineclip)\n[![PyPi wheels](https://img.shields.io/pypi/format/pylineclip.svg)](https://pypi.python.org/pypi/pylineclip)\n[![PyPi Download stats](http://pepy.tech/badge/pylineclip)](http://pepy.tech/project/pylineclip)\n\n# Line clipping\n\n- `lineClipping.jl` Cohen-Sutherland line clipping algorithm for Julia.\n Input scalars, output intersection length, or `None` if no intersection.\n- `lineclipping.f90` Cohen-Sutherland line clipping algorithm for\n massively parallel coarray modern Fortran. Input scalars or arrays,\n output intersections or `NaN` if no intersection.\n- `lineClipping.py` Cohen-Sutherland line clipping algorithm for Python.\n Input scalars, output intersection length, or `None` if no intersection.\n\n## Install\n\n### Python\n\n python -m pip install -e .\n\n### Fortran\n\nIf you want to use the Fortran Cohen-Sutherland line clipping modules\ndirectly (optional):\n\n cd bin\n cmake ..\n make\n\n## Usage\n\nThe main difference with textbook implementations is that I return a\nsentinel value (NaN, None, nothing) if there's no intersection of line\nwith box.\n\n### Python\n\n```python\nimport pylineclip.lineclipping as lc\n\nx3,y3,x4,y4 = lc.cohensutherland((xmin, ymax, xmax, ymin, x1, y1, x2, y2)\n```\n\nIf no intersection, `(None, None, None, None)` is returned.\n\n### Fortran\n\nlineclipping.f90 has two subroutines. \nPick Ccohensutherland if you're calling from C/C++/Python, which cannot tolerate assummed-shape arrays.\nIt's a slim wrapper to cohensutherland which is elemental (can handle scalar or any rank array).\n\nFortran programs will simply use\n\n```fortran\nuse lineclipping\ncall cohensutherland(xmin,ymax,xmax,ymin,x1,y1,x2,y2)\n```\n\nThe arguments are:\n\n INPUTS\n ------\n xmin,ymax,xmax,ymin: upper left and lower right corners of box (pixel coordinates)\n\n INOUT\n -----\n x1,y1,x2,y2: \n in - endpoints of line\n out - intersection points with box. If no intersection, all NaN\n\n### Julia\n\nSimliar to Python, except `nothing` is returned if no intersection\nfound.\n\n```julia\ncohensutherland(xmin, ymax, xmax, ymin, x1, y1, x2, y2)\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scivision/lineclipping-python-fortran", "keywords": "line clipping,cohen-sutherland", "license": "", "maintainer": "", "maintainer_email": "", "name": "pylineclip", "package_url": "https://pypi.org/project/pylineclip/", "platform": "", "project_url": "https://pypi.org/project/pylineclip/", "project_urls": { "Homepage": "https://github.com/scivision/lineclipping-python-fortran" }, "release_url": "https://pypi.org/project/pylineclip/0.9.2/", "requires_dist": null, "requires_python": ">= 3.5", "summary": "Line clipping: Cohen-Sutherland", "version": "0.9.2" }, "last_serial": 4092207, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "6b57dd70a68ad3ed48206a3ca56a8cc6", "sha256": "363f799f147c4412d778c0855cf36b21dba1a2d22e4d6d6b926b98009e6b0934" }, "downloads": -1, "filename": "pylineclip-0.9.0.tar.gz", "has_sig": false, "md5_digest": "6b57dd70a68ad3ed48206a3ca56a8cc6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3768, "upload_time": "2018-05-18T23:41:35", "url": "https://files.pythonhosted.org/packages/86/a4/898482659431e6d0eca3983611d83d83aa5b2985c6549897df3541da6e8f/pylineclip-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "88cb1de30a17453e95e7400bc50c2a2d", "sha256": "55f922b84d9ee7db5dc82e5b8e9176fce8b3534ab24b53776e6e3e111cf94c20" }, "downloads": -1, "filename": "pylineclip-0.9.1-py3-none-any.whl", "has_sig": false, "md5_digest": "88cb1de30a17453e95e7400bc50c2a2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4248, "upload_time": "2018-06-21T14:48:14", "url": "https://files.pythonhosted.org/packages/fe/b4/bcded4ff58fb6f4041421f96386490a2b819da1c7df6edb46ba4c4c5b5b0/pylineclip-0.9.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9331ae563af8a6ee8223c2adc3ff5dff", "sha256": "2d34db25e328404b7dd1edd8d1580f430960f7d9a69199c196c60443f27791fc" }, "downloads": -1, "filename": "pylineclip-0.9.1.tar.gz", "has_sig": false, "md5_digest": "9331ae563af8a6ee8223c2adc3ff5dff", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4038, "upload_time": "2018-06-21T14:48:15", "url": "https://files.pythonhosted.org/packages/e1/5b/3b3eba5d56e75d8f94d3728a0fcb77d830a2c1ceab40ad319c8ac099d508/pylineclip-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "dfe893b0e33c475d401ccca97a8ad446", "sha256": "fe3bf34d791242f6813500fd2a83843872c03e9a191c27dddd65bad68b62d05a" }, "downloads": -1, "filename": "pylineclip-0.9.2.tar.gz", "has_sig": false, "md5_digest": "dfe893b0e33c475d401ccca97a8ad446", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 4333, "upload_time": "2018-07-23T08:34:41", "url": "https://files.pythonhosted.org/packages/81/ef/082c93252d1cba3dfdab98b05e938fd8e0b20d4fa6ea14c7beff27d55fd8/pylineclip-0.9.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dfe893b0e33c475d401ccca97a8ad446", "sha256": "fe3bf34d791242f6813500fd2a83843872c03e9a191c27dddd65bad68b62d05a" }, "downloads": -1, "filename": "pylineclip-0.9.2.tar.gz", "has_sig": false, "md5_digest": "dfe893b0e33c475d401ccca97a8ad446", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 4333, "upload_time": "2018-07-23T08:34:41", "url": "https://files.pythonhosted.org/packages/81/ef/082c93252d1cba3dfdab98b05e938fd8e0b20d4fa6ea14c7beff27d55fd8/pylineclip-0.9.2.tar.gz" } ] }