0

I have an object which is a point with 3d cordinates:

class point:
    def __init__(self, x, y, z):
        self.x = x
        self.y = y
        self.z = z

and a cuboid of the following dimensions

LD1 = 0.05
LD2 = 0.025
Ld3 = 0.025

how can I generate a list of lets say 81-100 equally spaced points within this cuboid(!!!I don want any of them on the surface)? NOTE: these points I am going to use to generate a set of points on a sphere around each one

I tried generating a mesh and removing the part on the surface as seen below:

if xyz[i][0] != 0 and xyz[i][0] != LD1 and xyz[i][1] != 0 and xyz[i][1] !=LD23 and xyz[i][2]!=0 and xyz[i][2] !=LD23:
Ali11H
  • 11
  • 3
  • Does this answer your question? [Is there a multi-dimensional version of arange/linspace in numpy?](https://stackoverflow.com/questions/32208359/is-there-a-multi-dimensional-version-of-arange-linspace-in-numpy) – Stef Feb 23 '22 at 11:52
  • I tried but it didn't work – Ali11H Feb 23 '22 at 13:24
  • You tried what? What didn't work? What do you mean "it didn't work"? Was the distribution of the points not what you expect? Was there an error message? – Stef Feb 23 '22 at 13:29
  • what happened is that I got a grid, what I want is like a set of internal points spaced equally. – Ali11H Feb 23 '22 at 14:38
  • its like selecting the internal points of the grid and removing the ones on the surface ,but I am not sure how to do it. – Ali11H Feb 23 '22 at 14:56
  • Weeeeeell if the only issue is that you don't want the points on the surface, you could try giving slightly smaller dimensions to the function. – Stef Feb 23 '22 at 15:21
  • I tried another idea, you can see the edit in the post, it still needs improvement. – Ali11H Feb 23 '22 at 15:50
  • well both your solution and mine with the conditioning worked ,so thanks a lot. – Ali11H Feb 23 '22 at 16:03

0 Answers0