###### Algorithm

## Find Closest Plane Between Points In 3D By Levmar Algorithm

how to find the closest plane closest to a few random points in the 3D environment. We know that the sum of square distances from point to plane can be calculated.

how to find the closest plane closest to a few random points in the 3D environment. We know that the sum of square distances from point to plane can be calculated.

Find a local partial region on the surface of the sphere, mark it by red color. Finally, we will compute the normal of the partial region and show it by a green line. The whole scene is just like the following image. Here are a few steps about the process. Read more…

The article introduces how to expand the sampling area from a cell. I marked the area red color, the center point is computed as the mass center of the original cell. Step 1, find all cells which are near to the center point within a distance. We can use the Read more…

This post introduces a way to find the biggest plane on the 3D model. We expand the initial cell by comparing its normal with neighbor’s normal. It indicates they are on a plane if the two normals of cells are approximately equal. I use vtkOBBTree to find the min axes Read more…

Step function The step function is simple, it gets only two values zero or one no matter what the input value is. #!/usr/bin/env python import numpy as np import matplotlib.pylab as plt def step_function(x): return np.array(x>0, dtype=np.int) if __name__ == ‘__main__’: x = np.arange( -5, 5, 0.1 ) y = Read more…

We define all edges in the boundary have no neighbor cells. It indicates that there is no boundary on the closed surface. In the following example, I read an STL file and get an arch. Step 1, clip the original arch with a plane that has normal (0, 1, 0) Read more…

Almost every developer know how to implement the bubble sort for a simple array. We just need to travel over the array in two levels and swap the adjacent elements in the second level if their values’ order is not correct. The algorithm implement with Python is in the following Read more…

We often need to delete some elements in an STL set. But it causes a strange bug if we are careless sometimes. One newbie in C Plus Plus program language may write the following code to delete all odd numbers in a set. int main() { vector<int> vec{ 1, 3, Read more…

I want to get the solution of the equation Bisection Method The first algorithm for the problem is bisection method. The algorithm bisection method doesn’t require derivation for the equation. It just needs a possible solution range [l, r], then calculates the variable mid as , compares the result of Read more…

A prohibited operation