 				index[j + 1] = store_index;
 				break;
 			}
-
 		}
 	}
 	for (int i = 0; i < nearest_points_nb; ++i)

__device__
void findNearestPoints(double3 centriod, double* seeds_pointer, int seeds_nb, int* nearest_points, int nearest_points_nb)
{
	double* distance_from_centroid = (double*)malloc(sizeof(double) * seeds_nb);

	//find the nearest points


		double3 centriod = computeCentriod(v1, v2, v3);

		
		int* nearest_points = (int*)malloc(sizeof(int) * 20);

		findNearestPoints(centriod, seeds_pointer, seeds_nb, nearest_points, 20);

		if (tid == 0)
		{
			test_dis[0] = v1.x;
			test_dis[1] = v1.y;
			test_dis[2] = v1.z;
			test_dis[3] = v2.x;
			test_dis[4] = v2.y;
			test_dis[5] = v2.z;
			test_dis[6] = v3.x;
			test_dis[7] = v3.y;
			test_dis[8] = v3.z;

			test_centriod[0] = centriod.x;
			test_centriod[1] = centriod.y;
			test_centriod[2] = centriod.z;

			test_index[21] = seeds_nb;

			for (int i = 0; i < 20; ++i)
			{
				test_index[i] = nearest_points[i];
			}
		}
		return;

		double* polygon = (double*)malloc(sizeof(double) * 10 * 4);
		int vertex_nb;
