{"id":21586741,"url":"https://github.com/harshpatel44/binary-space-partition-","last_synced_at":"2025-08-03T03:19:09.241Z","repository":{"id":120696335,"uuid":"113190162","full_name":"Harshpatel44/Binary-Space-Partition-","owner":"Harshpatel44","description":"We need to partition the space using binary space partition tree (BSP tree) unless a specific condition is specified using C++","archived":false,"fork":false,"pushed_at":"2020-02-12T19:39:55.000Z","size":332,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T15:41:51.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Harshpatel44.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-05T14:08:45.000Z","updated_at":"2022-04-25T14:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b25c4cd1-25a4-439b-9969-866c5f357fb2","html_url":"https://github.com/Harshpatel44/Binary-Space-Partition-","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/Harshpatel44%2FBinary-Space-Partition-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshpatel44%2FBinary-Space-Partition-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshpatel44%2FBinary-Space-Partition-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harshpatel44%2FBinary-Space-Partition-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harshpatel44","download_url":"https://codeload.github.com/Harshpatel44/Binary-Space-Partition-/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244189826,"owners_count":20412991,"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-24T15:14:32.591Z","updated_at":"2025-03-18T09:17:09.977Z","avatar_url":"https://github.com/Harshpatel44.png","language":"C++","readme":"# Binary-Space-Partition-\nWe need to partition the space using binary space partition tree (BSP tree) unless a specific condition is specified.\n\n\nWe have an Euclidean space ( x-axis is (0,100) and y-axis is (0,100)) in which n points are ramdomly generated\ne.g. n1=(4,5)\nn2= (10,12)\n.\n.\nand so on n20=(45,10)\n\nWe need to partition the space using binary space partition tree (BSP tree) \n\nsay after first partition, there are 8 points in the first partition and 12 points in the second partition\n\nOnce we have seperated the points of each partition we need to check following condition\n\nFor partition one\n\ncenter_x = sum(x-coordinates of all the points of first partition)/number of points in the partition\ncenter_y = sum(y-coordinates of all the points of first partition)/number of points in the partition\n\n\nnow we have the center of first partition i.e., (center_x, center_y)\n\nNext, we need to check whether the Euclidean distance of each point of first partition from its center is less than or equal to the Range (R)\nif the above condition is true, we are not required to further partition the first partition.\n\notherwise, we will again partition the first partition using BSP. \nsay the number of points in first partition of the initial first partition is 3 and \nthe number of points in second partition of the initial first partition is 5, (i.e., first of first (3) + second of first (5) = 8))\nThen again we will check whether all the points of each partition are located with in R distance to their respective centers.\n\nThis procedure must be followed until all the points of each partition are located with in R distance to their respective centers.\n\n\n\n\n\nIn the Output \n1. It asks the user for R.\n2. Then X and Y coordinates for the space\n3. Then Number of Elements (N)\n4. Then all the random points created are displayed.\n5. finally the main result is displayed i.e. partition Number ,no. of points in that partition , points with its id","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshpatel44%2Fbinary-space-partition-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshpatel44%2Fbinary-space-partition-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshpatel44%2Fbinary-space-partition-/lists"}