def cross_products(self, vector_i, vector_j): cross_products = [] for axis_i, axis_j in itertools.product(vector_i, vector_j): if axis_i is not axis_j: axis_cross = cross_product(axis_i, axis_j) if rho(axis_cross) > self.error: axis_cross = normalize(axis_cross) cross_products.append(axis_cross) return cross_products
def center_two_vertices(self, nuclei_array): center_of_edge = [] for nuclei_i, nuclei_j in itertools.combinations(nuclei_array, 2): axis_i = nuclei_i.coordinates axis_j = nuclei_j.coordinates axis_edge = vector_add(axis_i, axis_j) if rho(axis_edge) > self.error: axis_edge = normalize(axis_edge) center_of_edge.append(axis_edge) return center_of_edge
def vertices(self, nuclei_array): corner = [] for nuclei in nuclei_array: coordinates = normalize(nuclei.coordinates) corner.append(coordinates) return corner