{"id":16758147,"url":"https://github.com/foo123/geometrize","last_synced_at":"2025-04-10T17:11:45.581Z","repository":{"id":63234484,"uuid":"566266639","full_name":"foo123/Geometrize","owner":"foo123","description":"Computational Geometry and Rendering library for JavaScript","archived":false,"fork":false,"pushed_at":"2024-11-30T18:03:04.000Z","size":4853,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T14:51:22.985Z","etag":null,"topics":["2d","3d","canvas","computational-geometry","convex-hull","geometry","intersections","svg"],"latest_commit_sha":null,"homepage":"https://foo123.github.io/examples/geometrize/","language":"JavaScript","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/foo123.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-15T10:08:49.000Z","updated_at":"2025-03-10T09:45:01.000Z","dependencies_parsed_at":"2024-11-29T16:20:24.948Z","dependency_job_id":"a5ab5f5e-c921-4b40-8a79-662e155b47ad","html_url":"https://github.com/foo123/Geometrize","commit_stats":{"total_commits":77,"total_committers":1,"mean_commits":77.0,"dds":0.0,"last_synced_commit":"0d4572187f635fb70b6cc32d52c69fe55d748be7"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo123%2FGeometrize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo123%2FGeometrize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo123%2FGeometrize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo123%2FGeometrize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foo123","download_url":"https://codeload.github.com/foo123/Geometrize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261719,"owners_count":21074223,"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":["2d","3d","canvas","computational-geometry","convex-hull","geometry","intersections","svg"],"created_at":"2024-10-13T04:04:17.792Z","updated_at":"2025-04-10T17:11:45.543Z","avatar_url":"https://github.com/foo123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geometrize\n\n![Geometrize](/geometrize.png)\n\nComputational Geometry and Rendering library for JavaScript\n\n**version: 1.0.2** (80 kB minified)\n\n\n[API Reference](/manual.md)\n\n\nExamples:\n\n**Bounding Boxes**\n\n![geometrize bounding boxes](/boundingboxes.png)\n\n**Convex Hulls**\n\n![geometrize convex hulls](/convexhulls.png)\n\n**Intersections**\n\n[![geometrize intersections](/intersections.png)](https://foo123.github.io/examples/geometrize/)\n\n[See it](https://foo123.github.io/examples/geometrize/)\n\n```javascript\nconst {Scene2D, CompositeCurve, ParametricCurve, Ellipse, Circle, Arc, QBezier, CBezier, Line, Polyline, Polygon, Rect, Matrix2D} = Geometrize;\nconst scene = Scene2D(document.getElementById('container'), 0, 0, 300, 300);\nconst spiral = ParametricCurve((t) =\u003e ({x:190 + t*50*Math.cos(t*6*Math.PI), y:80 + t*50*Math.sin(t*6*Math.PI)}));\nconst ellipse = Ellipse([40,40], 30, 10, -45);\nconst circle = Circle([30,30], 20);\nconst arc = Arc([100,100], [170,90], 30, 10, 30, 0, 1);\nconst qbezier = QBezier([[80,110], [120,40], [160,120]]);\nconst cbezier = CBezier([[40,80], [120,40], [140,200], [160,90]]);\nconst curve = CompositeCurve([\n    Line([20,100], [40,100]),\n    Arc([40,100], [40,80], 10, 10, 0, 0, 0),\n    QBezier([[40,80],[20,100],[60,120]]),\n    Line([60,120], [70,100])\n]).transform(Matrix2D.translate(-20, 0));\nconst line1 = Line([20,20], [60,60]).setStyle('stroke', 'blue');\nconst line2 = Line([50,2], [20,70]).setStyle('stroke', 'green');\nconst line3 = Line([60,160], [300,0]).setStyle('stroke', 'orange');\nconst line4 = Line([60,120], [300,-40]).setStyle('stroke', 'cyan');\n\nlet intersections = [];\n\nscene.add(spiral);\nscene.add(ellipse);\nscene.add(circle);\nscene.add(arc);\nscene.add(qbezier);\nscene.add(cbezier);\nscene.add(curve);\nscene.add(line1);\nscene.add(line2);\nscene.add(line3);\nscene.add(line4);\n\nintersections = scene.getIntersections();\nintersections.forEach(p =\u003e {\n    scene.add(p.setStyle('stroke', 'red').setStyle('stroke-width', 2));\n});\n```\n\n**see also:**\n\n* [Abacus](https://github.com/foo123/Abacus) advanced Combinatorics and Algebraic Number Theory Symbolic Computation library for JavaScript, Python\n* [TensorView](https://github.com/foo123/TensorView) view array data as multidimensional tensors of various shapes efficiently\n* [Geometrize](https://github.com/foo123/Geometrize) Computational Geometry and Rendering Library for JavaScript\n* [Plot.js](https://github.com/foo123/Plot.js) simple and small library which can plot graphs of functions and various simple charts and can render to Canvas, SVG and plain HTML\n* [MOD3](https://github.com/foo123/MOD3) 3D Modifier Library in JavaScript\n* [HAAR.js](https://github.com/foo123/HAAR.js) image feature detection based on Haar Cascades in JavaScript (Viola-Jones-Lienhart et al Algorithm)\n* [HAARPHP](https://github.com/foo123/HAARPHP) image feature detection based on Haar Cascades in PHP (Viola-Jones-Lienhart et al Algorithm)\n* [FILTER.js](https://github.com/foo123/FILTER.js) video and image processing and computer vision Library in pure JavaScript (browser and node)\n* [Xpresion](https://github.com/foo123/Xpresion) a simple and flexible eXpression parser engine (with custom functions and variables support), based on [GrammarTemplate](https://github.com/foo123/GrammarTemplate), for PHP, JavaScript, Python\n* [Regex Analyzer/Composer](https://github.com/foo123/RegexAnalyzer) Regular Expression Analyzer and Composer for PHP, JavaScript, Python\n* [GrammarTemplate](https://github.com/foo123/GrammarTemplate) grammar-based templating for PHP, JavaScript, Python\n* [codemirror-grammar](https://github.com/foo123/codemirror-grammar) transform a formal grammar in JSON format into a syntax-highlight parser for CodeMirror editor\n* [ace-grammar](https://github.com/foo123/ace-grammar) transform a formal grammar in JSON format into a syntax-highlight parser for ACE editor\n* [prism-grammar](https://github.com/foo123/prism-grammar) transform a formal grammar in JSON format into a syntax-highlighter for Prism code highlighter\n* [highlightjs-grammar](https://github.com/foo123/highlightjs-grammar) transform a formal grammar in JSON format into a syntax-highlight mode for Highlight.js code highlighter\n* [syntaxhighlighter-grammar](https://github.com/foo123/syntaxhighlighter-grammar) transform a formal grammar in JSON format to a highlight brush for SyntaxHighlighter code highlighter\n* [SortingAlgorithms](https://github.com/foo123/SortingAlgorithms) implementations of Sorting Algorithms in JavaScript\n* [PatternMatchingAlgorithms](https://github.com/foo123/PatternMatchingAlgorithms) implementations of Pattern Matching Algorithms in JavaScript\n* [CanvasLite](https://github.com/foo123/CanvasLite) an html canvas implementation in pure JavaScript\n* [Rasterizer](https://github.com/foo123/Rasterizer) stroke and fill lines, rectangles, curves and paths, without canvaσ\n* [Gradient](https://github.com/foo123/Gradient) create linear, radial, conic and elliptic gradients and image patterns without canvas\n* [css-color](https://github.com/foo123/css-color) simple class to parse and manipulate colors in various formats\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo123%2Fgeometrize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoo123%2Fgeometrize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo123%2Fgeometrize/lists"}