Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4552486
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:47:54+00:00 2026-05-21T16:47:54+00:00

I have a very large point cloud (> 100000 points) that I’d like to

  • 0

I have a very large point cloud (> 100000 points) that I’d like to detect planar arrangements in. I decided to use an octree to break the points into very small planar clusters and then merge neighboring clusters that are coplanar. I have written code in C++ that quickly splits the point cloud into the small planar clusters, but how to effectively merge them is eluding me…

My Octree implementation uses a pointer structure: there are OctreeNodes with arrays OctreeNode* children[8] containing pointers to their child nodes, or all NULL pointers if it is a leaf node.

My first thought was to, in each OctreeNode object, keep a pointer to a Plane object. After splitting the points the first time, each leaf in the octree will get a Plane that represents the least-squares fit to all the points contained in the leaf. I then iterate over every leaf node in the tree. For each leaf node, I check each one of its neighbor leaf nodes: if the neighbor’s plane should be merged with the current leaf’s plane, I call Plane* newPlane = Plane::mergePlanes(this->plane, neighbor->plane); to create a new plane that represents the points in both nodes.

This is where I’ve run into trouble… I first thought I could simply replace both planes with the new plane, i.e. plane = newPlane; neighbor->plane = newPlane; and be done (memory leaks aside; I handled them in the real code). Unfortunately, this doesn’t work in practice. After merging several planes, there may be several different OctreeNodes pointing to a single Plane, and simply replacing the pointers in this->plane and neighbor->plane doesn’t replace EVERY pointer that is pointing to their old planes.

The solution seemed hackish even when I first came up with it, and now its flaws are even more clear. Can anyone think of a way to fix the merging method I came up with, or think of a better one?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:47:55+00:00Added an answer on May 21, 2026 at 4:47 pm

    The standard fix is to lazily fix nodes. Have an access method that looks at the plane you’re pointing to, and then sees whether it has been pointed elsewhere. If it has, recursively search until you find where it is, and fix up all of the objects back to the current one, and then hand back the right plane.

    This is a lot more expensive than following a pointer, but in practice this isn’t nearly as expensive as you would think since most of the time the final object is in the first or second place that you look.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.