Hi Nick,
Thank you very much for your comments.
> Would you be willing to create an issue on our GitHub repository about this?
Sure. After I get a little more informed on this.
I am brand new in these areas, so please bear with me with some newbie questions.
You mention one needs to know "the full vector field at the eight vertices of a Cartesian grid cell".
As I mentioned, I can transform the 4 vertices of the MMS tetrahedron to 8 vertices of the cube, but would that be enough?
By enough, I mean, from a 'field' physics view point, are they the same? - if I have 8 point dataset of a cube, will it be enough to construct a vector field as required for this task?
As of now, I do not see a way to pass those 8 point dataset to the find_null_point function.
My understanding is, the first three set of parameters,
x_arr, y_arr, z_arr is "doable", for a lack of better word.
That is, x_arr will have "transformed" 8 vertices from the original 4 vertices. Same for y_arr, and z_arr.
But it's the second set of parameters ( "3D array containing the x/y/z-component of the vector values for the vector space") that are throwing me off balance.
I will have "transformed" 8 values for the respective fields, like this:
{Bx1, Bx2, Bx3, Bx4} -> transformed into 8-point cube vertices, like, [B1x, B2x, B3x,.. B8x]..
similar for {By1, By2, By3, By4} and {Bz1, Bz2, Bz3, Bz4} .
...but I am struggling to understand how to modify them to "3D arrays".
Thank you.
J.
PS: Here is a snippet to transform 4 vertices to 8 vertices:
# Use NumPy's genfromtxt function to read the CSV file
## The csv file contains position data like this: x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4
data = np.genfromtxt("csv_file", delimiter=',', skip_header=True)
# Iterate over rows with index
for i, row in enumerate(data):
pos1 = np.array([row[1], row[2], row[3]])
pos2 = np.array([row[4], row[5], row[6]])
pos3 = np.array([row[7], row[8], row[9]])
pos4 = np.array([row[10], row[11], row[12]])
# Vertices of the tetrahedron
tetraPos_vertices = np.array([pos1, pos2, pos3, pos4])
# Create Open3D tetrahedron mesh
tetrahedron = o3d.geometry.TetraMesh()
tetrahedron.vertices = o3d.utility.Vector3dVector(tetraPos_vertices)
# Create a bounding box around the tetrahedron
obb = tetrahedron.get_oriented_bounding_box()
# Extract the bounding box vertices as a NumPy array
cube_vertices = np.asarray(obb.get_box_points())
# Print the cube vertices
print(cube_vertices)