{"id":19658166,"url":"https://github.com/cdaringe/coordinate-systems","last_synced_at":"2025-08-04T06:37:23.563Z","repository":{"id":26066793,"uuid":"29510469","full_name":"cdaringe/coordinate-systems","owner":"cdaringe","description":"Geometry coordinate converter for common 2d/3d coordinate systems","archived":false,"fork":false,"pushed_at":"2024-08-01T05:34:41.000Z","size":547,"stargazers_count":10,"open_issues_count":22,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T02:41:03.697Z","etag":null,"topics":["cartesian","coordinates","polar","spherical","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cdaringe.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":"2015-01-20T03:45:21.000Z","updated_at":"2023-09-06T02:58:44.000Z","dependencies_parsed_at":"2024-02-13T04:22:25.802Z","dependency_job_id":"9bab2148-6128-4c47-8e85-b23593c23ce2","html_url":"https://github.com/cdaringe/coordinate-systems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdaringe/coordinate-systems","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fcoordinate-systems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fcoordinate-systems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fcoordinate-systems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fcoordinate-systems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/coordinate-systems/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fcoordinate-systems/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268658126,"owners_count":24285635,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cartesian","coordinates","polar","spherical","typescript"],"created_at":"2024-11-11T15:36:19.970Z","updated_at":"2025-08-04T06:37:23.511Z","avatar_url":"https://github.com/cdaringe.png","language":"TypeScript","readme":"# coordinate-systems\n\n\u003cimg src=\"https://raw.githubusercontent.com/cdaringe/coordinate-systems/master/img/logo.png\" height=\"150\" width=\"165\" \u003e\n\nconvert between common 2d and 3d coordinate systems:\n\n1. cartesian (2d)\n2. cartesian (3d)\n3. polar (2d)\n4. cylindrical (3d)\n5. spherical (3d)\n\n# install\n\n`npm install --save coordinate-systems`\n\n# usage\n\nconstruct a `Coordinate` using one of the provided static constructor functions.\nRun the conversion member function to convert to an array of values in `[x, y, z?]/[r, t, p?/z?]` format.\n\n```ts\nimport { Coordinate, CoordinateType } from 'coordinate-systems'\n\n// static, short-hand contructors\n// @note, radians assumed by default for polar-esque systems\nconst xy = Coordinate.cartesian([0, 5])\nconst xyz = Coordinate.cartesian([1, 2, 3])\nCoordinate.polar([2, Math.PI / 4])\nCoordinate.cartesian([0.5, 0.5, 0.707])\nCoordinate.cylindrical([2, Math.PI / 4, 5])\nCoordinate.spherical([5, (60 * Math.PI) / 180, (30 * Math.PI) / 180])\n\n// classic constructor\nnew Coordinate({ coordinates: [3, 4, 5], isDegree: true, type: CoordinateType.CARTESIAN_3D })\nnew Coordinate({ coordinates: [3, 60, 4], isDegree: true, type: CoordinateType.CYLINDRICAL })\nnew Coordinate({ coordinates: [5, 60, 30], type: CoordinateType.SPHERICAL })\n\nxy.polar() // [ 5, 1.5707963267948966 ] (i.e. radius 5, theta π/2 radians)\nxyz.spherical() // [ 3.74..., 1.10..., 0.64... ] (radius, theta, phi)\n```\n\nbecause this is a typescript package, the interfaces are fully documented and can be seen in [src/index.d.ts](./src/index.d.ts).  this is usually not a tracked file, but tracked here strictly for documentation purposes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fcoordinate-systems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Fcoordinate-systems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fcoordinate-systems/lists"}