{"id":19206231,"url":"https://github.com/jeffthompson/collisiondetectionfunctionsforprocessing","last_synced_at":"2026-06-24T21:30:17.408Z","repository":{"id":6430193,"uuid":"7668827","full_name":"jeffThompson/CollisionDetectionFunctionsForProcessing","owner":"jeffThompson","description":"A set of simplified collision detection functions to Processing","archived":false,"fork":false,"pushed_at":"2015-05-13T15:49:19.000Z","size":348,"stargazers_count":59,"open_issues_count":0,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-04T15:18:27.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Processing","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffThompson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-17T15:39:08.000Z","updated_at":"2023-05-04T15:29:10.000Z","dependencies_parsed_at":"2022-09-04T14:40:34.232Z","dependency_job_id":null,"html_url":"https://github.com/jeffThompson/CollisionDetectionFunctionsForProcessing","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/jeffThompson%2FCollisionDetectionFunctionsForProcessing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffThompson%2FCollisionDetectionFunctionsForProcessing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffThompson%2FCollisionDetectionFunctionsForProcessing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffThompson%2FCollisionDetectionFunctionsForProcessing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffThompson","download_url":"https://codeload.github.com/jeffThompson/CollisionDetectionFunctionsForProcessing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280818,"owners_count":19776414,"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-11-09T13:15:14.817Z","updated_at":"2026-06-24T21:30:17.259Z","avatar_url":"https://github.com/jeffThompson.png","language":"Processing","funding_links":[],"categories":[],"sub_categories":[],"readme":"![screenshot](https://raw.github.com/jeffThompson/CollisionDetectionFunctionsForProcessing/master/CollisionLogo.png)\n\nCOLLISION DETECTION FUNCTIONS\n=======================\n####*Please note: this project has moved to an [updated repository](https://github.com/jeffThompson/CollisionDetection) with full explanations of the code in book form.*  \nSee: [https://github.com/jeffThompson/CollisionDetection](https://github.com/jeffThompson/CollisionDetection)\n\n\\- \\- \\-\n\nA set of functions to do basic 2d collision detection in Processing (www.processing.org).\n\nWhile some tools already exist, like the excellent Box2D, the source code is not easy to understand and the implementation is a more than a bit complex.  Other examples (equally great), like the line-line collision in the toxiclibs collection, use vector math which isn't easy for us \"creative programmers\" (ie: those who got bad grades in high school math).  \n\nInstead, these tools can be used as simple, one-line commands to determine whether two objects have collided.  Designed for simple games and interactive systems, they are intended to be building blocks for larger projects.\n\nEnjoy! \n\n\\- \\- \\-\n\n####HOW TO EXPERIMENT AND SEE WHAT THE FUNCTIONS DO\nThe folder `examples` has sketches to demonstrate each function \"live\".  These are meant to quickly try the functions, hack them, and otherwise experiment.\n\n####HOW TO USE IN YOUR OWN CODE\nThe example sketches are more fully-featured uses of the collision functions.  To use the functions themselves, follow these steps:\n\n1. Open the function you want to use (ex: \"pointPoint.pde) - NOT the example file\n2. Copy the code\n3. Paste the code into your sketch after the end of the draw function\n\nNote: you can also paste the code into a new tab, which will be a bit cleaner to use\n\n\\- \\- \\-\n\n####CURRENT FUNCTIONS:\nAll functions return a simple true/false value whether there is collision or not.  In many cases, code is included to also return the point of collision.\n\n+  Point/Point\n+  Point/Rect\n+  Point/Ball*\n\n+  Rect/Rect\n+  Ball/Ball*\n+  Ball/Rect*\n\n+  Point/Line\n+  Line/Line\n+  Ball/Line*\n\n\\* A \"ball\" is defined as a circle - ellipses are really hard!\n\n\\- \\- \\-\n\n####REQUESTS and BUG REPORTING\nA few things that would be great, but were just a little (or a lot) complex to include at this point:\n\n+ Ellipses\n+ Triangles\n+ Polygons\n+ Curved lines (definitely not happening any time soon!)\n\nFinding that something is missing?  Wish list?  Major error?  Little one?  Please post here!\n\n\\- \\- \\-\n\n####THANKS TO\nSeveral online tutorials and examples were used for the more confusing examples.  A special thanks goes to:\n\n+ Paul Bourke\nhttp://paulbourke.net/geometry/lineline2d\n\n+ Ibackstrom\n  http://community.topcoder.com/tc?module=Static\u0026d1=tutorials\u0026d2=geometry2\n\n+ Philip Nicoletti\n  http://www.codeguru.com/forum/showthread.php?threadid=194400\n\n+ Matt Worden\n  http://vband3d.tripod.com/visualbasic/tut_mixedcollisions.htm\n\n\\- \\- \\-\n\n\\[ all code available under [Creative Commons BY-NC-SA license](http://creativecommons.org/licenses/by-nc-sa/3.0/) - feel free to use but [please let me know](http://www.jeffreythompson.org) \\]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffthompson%2Fcollisiondetectionfunctionsforprocessing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffthompson%2Fcollisiondetectionfunctionsforprocessing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffthompson%2Fcollisiondetectionfunctionsforprocessing/lists"}