[Python] Determine most accurate best-fit algorithm for scattered points

Discussão em 'Python' iniciado por Stack, Novembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    I'm currently working with the skspatial package in Python3. I currently have two functions:

    1. skspatial.objects.Cylinder.best_fit to try to best fit the points into a cylinder
    2. A function that returns the bounding box of the scattered points. This function returns a custom class that should "extend" the skspatial.objects with a Cuboid object with similar methods, but in reality is only a bounding box.

    My question is the following: Is there a way to determine which of these two shapes better encompass the scattered points? They both return valid cylinder or Cuboid objects on their own for the same set of scattered points, but only one of them actually fits the points better.

    In case it matters for this question, the scattered points only represent the surface of whatever shape they actually are on, so there are no points "inside" the object.

    Continue reading...

Compartilhe esta Página