Message Boards Message Boards

GROUPS:

Extract / Select nodes coordinates of my lattice contained in a 3D region?

Posted 1 month ago
230 Views
|
1 Reply
|
1 Total Likes
|

Hello,

I defined a region as the RegionIntersection of a thin and large cylinder and a shell and I want to know how many nodes of a lattice are contained inside.

My lattice is defined by 3 vectors of different lengths and one angle is 99 deg (monoclinic lattice).

I have no idea where to start. Any idea ?

EDIT 1 :

I created a list of the node coordinates :

d = 5;
noeuds = Table[
   h*b1 + k*b2 + l*b3, {h, -d, d, 1}, {k, -d, d, 1}, {l, -d, d, 1}];

I will find a way to test if they are in the region.

EDIT 2 :

I finally used the fonction Select, to extract the points that are contained into the region of interest :

noeuds2 = Flatten[noeuds, 2];
Length[noeuds2]
bonsnoeuds = Select[noeuds2, 0.99*lk <= Norm[#] <= lk*1.01 &];
Length[bonsnoeuds]

Now I want to know if those selected points are contained inbetween 2 plans. I used a cylinder to represent the volume in-between those 2 plans but it seems it is not the fastest method as my results don't arrive instantly. I will have to repeat those calculations fore about 4k different plans hehe.

Posted 1 month ago

Hi F B

Take a look at RegionMember.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract