Points inside a rhombus in 3-dimensional sapce

  • Thread starter rbwang1225
  • Start date
  • Tags
    Points
In summary, the conversation discusses the process of cutting a lattice plane in 3-dimensional space into a unit cell and the use of code to simplify the task. The speaker seeks advice on eliminating atoms outside the boundary and determining the limitations of coordinates for atoms inside the boundary. The suggested method involves using the slopes between highlighted atoms, while an alternative method involves testing which side of a line a point lies on.
  • #1
rbwang1225
118
0
I have a lattice plane in 3 dimensional space.
Now, I want to cut it in a unit cell, but I have to write some code the make things get easier.
As you can see from my figure, I can know the four coordinates of the highlighted atoms which form the boundaries of the top plane.
My problem is if the four coordinates are known, how could I eliminate the atoms outside the boundary, or how could I know the limitations of the coordinates ##(x_i,y_i,z_i)## of atoms inside the boundary.

My idea is to use their slopes between each pair of highlighted atoms.

Any advices would be very appreciated!
 
Mathematics news on Phys.org
  • #2
rbwang1225 said:
As you can see from my figure,
What figure?
 
  • #3
rbwang1225 said:
if the four coordinates are known, how could I eliminate the atoms outside the boundary

This seems like a simple easy to understand method.

For each point p which you want to test to determine if it is inside the rhombus,
For each of the four verticies v making up your rhombus,
You have two edge vectors from v, call those vector1 and vector 2.
Express your point p as the unique p=const1*vector1+const2*vector2.
If const1 and const2 are greater than or equal to zero then the point lies within on on the edge of the rhombus, at least as far as that vertex v is concerned.
Think a few minutes until you can convince yourself why that is true.
If you repeat this for all four verticies and they all agree it is in or on the edge then that point p is inside your rhombus.
Repeat for all other points.

There is also a method that tests which side of a line a point lies on. If you use each edge of your rhombus as a line then that will also give the same result. But it seems easier for students to introduce a sign error somewhere when using this method than when using the previous test.
 

1. What is a rhombus in 3-dimensional space?

A rhombus in 3-dimensional space is a geometrical shape that has four equal sides and opposite angles that are equal. It is a three-dimensional version of a two-dimensional rhombus.

2. How can I determine if a point is inside a rhombus in 3-dimensional space?

To determine if a point is inside a rhombus in 3-dimensional space, you can use the Pythagorean theorem. First, find the distance between the point and each of the four vertices of the rhombus. If the distance from the point to each vertex is equal, then the point is inside the rhombus.

3. Can a point be on the surface of a rhombus in 3-dimensional space?

Yes, a point can be on the surface of a rhombus in 3-dimensional space. If the point is equidistant from two opposite vertices of the rhombus, then it lies on the surface of the rhombus.

4. What is the formula for finding the volume of a rhombus in 3-dimensional space?

The formula for finding the volume of a rhombus in 3-dimensional space is V = (1/2) * (length of one side)^2 * (height), where the height is the distance between two parallel sides of the rhombus.

5. Can a rhombus in 3-dimensional space have different angles?

Yes, a rhombus in 3-dimensional space can have different angles. As long as the opposite angles are equal, the rhombus will still maintain its shape and properties.

Similar threads

Replies
4
Views
618
Replies
13
Views
1K
  • Sci-Fi Writing and World Building
Replies
3
Views
779
  • Differential Geometry
Replies
0
Views
626
Replies
5
Views
2K
  • Quantum Physics
Replies
1
Views
827
  • Special and General Relativity
Replies
7
Views
1K
  • General Math
Replies
5
Views
2K
Replies
3
Views
1K
Replies
6
Views
3K
Back
Top