{"id":22273841,"url":"https://github.com/geeksloth/calculate_angle_from_3_points","last_synced_at":"2025-08-23T19:45:46.584Z","repository":{"id":185296026,"uuid":"673305291","full_name":"geeksloth/calculate_angle_from_3_points","owner":"geeksloth","description":"A simple example to calculate degree angle from 3 given cartesian points in Python","archived":false,"fork":false,"pushed_at":"2023-08-01T12:37:23.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T14:48:47.064Z","etag":null,"topics":["angle"],"latest_commit_sha":null,"homepage":"","language":"Python","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/geeksloth.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}},"created_at":"2023-08-01T10:31:36.000Z","updated_at":"2024-11-11T14:11:19.000Z","dependencies_parsed_at":"2023-08-01T11:54:36.762Z","dependency_job_id":null,"html_url":"https://github.com/geeksloth/calculate_angle_from_3_points","commit_stats":null,"previous_names":["geeksloth/calculate_angle_from_3_points"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fcalculate_angle_from_3_points","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fcalculate_angle_from_3_points/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fcalculate_angle_from_3_points/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fcalculate_angle_from_3_points/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geeksloth","download_url":"https://codeload.github.com/geeksloth/calculate_angle_from_3_points/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245502379,"owners_count":20625962,"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":["angle"],"created_at":"2024-12-03T13:16:32.272Z","updated_at":"2025-03-25T16:42:55.256Z","avatar_url":"https://github.com/geeksloth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# calculate_angle_from_3_points\nA simple example to calculate degree angle from 3 given cartesian points in Python\n\n![screenshot](static/theta.png)\n\nAccording to the above figure, the points plotted in the result figure are organized as *Red, Green, and Blue* for *P1, P2, and P3* respectively.\n\nThe purposed function:\n```python3\ndef calculate_angle(p1x, p1y, p2x, p2y, p3x, p3y):\n    a = math.dist([p2x,p2y], [p3x,p3y])\n    b = math.dist([p1x,p1y], [p2x,p2y])\n    c = math.dist([p1x,p1y], [p3x,p3y])\n    cos_C = ((a*a) + (b*b) - (c*c)) / (2*a*b)\n    C_degree = math.acos(cos_C) * (180.0 / math.pi)\n    return C_degree\n```\n\n![screenshot](static/ss.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeksloth%2Fcalculate_angle_from_3_points","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeeksloth%2Fcalculate_angle_from_3_points","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeksloth%2Fcalculate_angle_from_3_points/lists"}