{"id":13732218,"url":"https://github.com/I3ck/lib_2d","last_synced_at":"2025-05-08T06:31:39.288Z","repository":{"id":25556360,"uuid":"28989476","full_name":"I3ck/lib_2d","owner":"I3ck","description":"A c++ library for paths defined by points within the 2d space","archived":false,"fork":false,"pushed_at":"2016-01-09T12:09:47.000Z","size":281,"stargazers_count":45,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T02:10:56.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/I3ck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-08T22:34:06.000Z","updated_at":"2023-08-23T15:45:04.000Z","dependencies_parsed_at":"2022-08-24T11:52:23.786Z","dependency_job_id":null,"html_url":"https://github.com/I3ck/lib_2d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3ck%2Flib_2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3ck%2Flib_2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3ck%2Flib_2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3ck%2Flib_2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/I3ck","download_url":"https://codeload.github.com/I3ck/lib_2d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224707945,"owners_count":17356443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:49.451Z","updated_at":"2024-11-14T23:31:34.632Z","avatar_url":"https://github.com/I3ck.png","language":"C++","readme":"#lib_2d\nA c++ library for anything related to points within the 2d space (using floating point data types)  \nusing Catch as testing framework https://github.com/philsquared/Catch  \n\n##version 0.9.1\n\n##templated  \ntested for:  \n\n```cpp\nfloat  \ndouble  \nlong double\n```\n\n\n##classes\ncurrently, the following classes are supported:  \n\n```cpp\nPoint\u003cT\u003e //a point defined with two coordinates (x and y)  \nPointCloud\u003cT\u003e //a collection Points, without topological information\nOrderedPointCloud\u003cT\u003e //a PointCloud with additional information regarding sorting and filtering of points\nKdTree\u003cT\u003e //search tree to quickly find nearest neighbors\n\n//subclasses of PointCloud\nLineSegment\u003cT\u003e //a line segment defined by start and end point\nRectangle\u003cT\u003e //a rectangle defined by width, height and center\nArc\u003cT\u003e //an arc defined by diameter, center, start- and end angle\nEllipse\u003cT\u003e //an ellipse\nInterpolationBezier\u003cT\u003e //a bezier curve interpolation  \nInterpolationLinear\u003cT\u003e //a linear interpolation\nInvolutCircle\u003cT\u003e //involut curve of a circle\n```\n\n\n##methods  \nsome of the supported methods:  \n\n```cpp\nmove_by(...) //moves the Point or PointCloud  \nmirror_vertically(...) //mirrors the Point or PointCloud at a vertical line (horizontally and point also supported)  \nrotate(...) //rotate by angle around a center  \nto_string(...) //write coordinates to a string  \nfrom_string(...) //parse from a string\ndistance_to(...) //calculate distances between points\nload(...) //load coordinates from file\nto_file(...) //write coordinates to file  \nbounding_box(...)  //the minimum bounding rectangle of a PointCloud  \nconvex_hull(...) //calculate the convex hull of a PointCloud  \nconcave_hull(...) //compareable to the convex hull, while better following the shape of a pointcloud\nintersections_with(...) //intersections between paths  \nsort_x(...) //sort by x (or y)  \nrange(from,to) //get ranges of PointCloud\nand_many(more)  \n```  \n\nalso chainable:\n```cpp\npath.move_by(...).rotate(...).sort_x(...)\n```\n\n\n##compatible with other containers  \n\n```cpp\nvector\u003c Point \u003cT\u003e \u003e vec = vector\u003cPoint \u003cT\u003e \u003e(path.begin(), path.end());  \n...  \nPointCloud\u003cT\u003e path = PointCloud\u003cT\u003e(vec.begin(), vec.end());\n```  \n\n\n##operator overloads  \n\n```cpp\n== != //equality  \n+ += //appending to PointCloud  \n[] //access elements of PointCloud\nstd::cout \u003c\u003c PointCloud\u003cT\u003e \u003c\u003c Point\u003cT\u003e; //overloads for streams\n```  \n\n\n\n##using lib_2d\nadd `inc/` to your include path and `#include lib_2d.h` within your code  \n`/tests/test_lib_2d.cpp` also provides a basic usage example\n\n\n\n##testing\n`make tests`  \nyou can also use  \n`make clean`  \n\n\n\n##contribute  \nIf you find any bugs, feel free to open an issue  \nIf you'd like other PointClouds than Arc etc. open an issue  \nAlso feel free to open a pull request, in case you added / fixed something yourself\n","funding_links":[],"categories":["AI"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FI3ck%2Flib_2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FI3ck%2Flib_2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FI3ck%2Flib_2d/lists"}