Hope doing well. I have two numpy array, both are some points in the space. Using python, I want to firstly find the surface passing the first data set (surface_maker
) and then find the x,y and z of the projection adjacent opoints of the second array (contact_maker
) on the created surface. surface_maker
always created planar surfaces. For projection, I only want a vertical going from adjacent point toward the surface. In reality I have lots of points in both sets but I copies a simple case here:
surface_maker=np.array([[50., 15., 46.04750574],
[50., 5., 45.56400925],
[44.83018398, 5., 25.],
[44.76296902, 15., 25.],
[50., 25., 45.56400925],
[44.83018398, 25., 25.],
[59.8336792, 5., 75.],
[59.71483707, 15., 75.],
[59.8336792, 25., 75.]])
contact_maker=np.array([[10., 5., 70.00014782],
[10., 15., 70.00018358],
[10., 25., 70.0001955 ],
[30., 5., 69.99981105],
[30., 15., 69.99982297],
[30., 25., 69.99985874],
[70., 5., 50.00000298],
[70., 15., 50.00002682],
[70., 25., 50.00005066],
[90., 5., 49.99996871],
[90., 15., 49.99999255],
[90., 25., 50.00001788]])
I have tried several solutions like 1, 2 and so on. But I was successful to solve my issue.
For me it is important to have the location of projection as x, y and z. The figure also shows what I want (as it shows, I need only location six adjacent point of the contact_maker
projected on the surface created by surface_maker
):
In advance, I truely appreciate any help.
See Question&Answers more detail:
os