calculate polygon area and its centre in 3d
-
Hello, I have some 3d points (not self intersecting). the shape of the points is looking like / (forward slash) from profile, It is actually a slice of a 3d object, cut with a rotated plane. I want to calculate the area of 3d points and its centre. For 2d case, i use the following http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/[^] but, how can i extend the 2d case to 3d for area and its centre? Thanks in advance. Bekir.
-
Hello, I have some 3d points (not self intersecting). the shape of the points is looking like / (forward slash) from profile, It is actually a slice of a 3d object, cut with a rotated plane. I want to calculate the area of 3d points and its centre. For 2d case, i use the following http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/[^] but, how can i extend the 2d case to 3d for area and its centre? Thanks in advance. Bekir.
If you could rotate the points so they all have the same Z coordinate, you could then ignore the Z coordinate and apply the 2D formulas for the area and centroid. Rotation will not change the area. Apply the reverse rotation to the calculated centroid to get the centroid of the original 3D points.
-
If you could rotate the points so they all have the same Z coordinate, you could then ignore the Z coordinate and apply the 2D formulas for the area and centroid. Rotation will not change the area. Apply the reverse rotation to the calculated centroid to get the centroid of the original 3D points.
-
Hello, I have some 3d points (not self intersecting). the shape of the points is looking like / (forward slash) from profile, It is actually a slice of a 3d object, cut with a rotated plane. I want to calculate the area of 3d points and its centre. For 2d case, i use the following http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/[^] but, how can i extend the 2d case to 3d for area and its centre? Thanks in advance. Bekir.
What you want is a 2D coordinate system in the plane of intersection, then you can use your equation for area. Assume that your original points are represented as vectors {Vk} from some origin O (this is your original 3D coordinate system). As you have the equation of the plane, choose one point on it as the new origin Op, and choose two orthogonal unit vectors (U1, U2) that lie in the plane as the new axes. (i.e. choose two orthogonal vectors orthogonal to the normal of the plane) Then in your new coordinate system, the 2D coordinates of the point Vk are: ( (Vk-Op).U1, (Vk-Op).U2 ) i.e. you simply project the 3D vector from your new origin onto your new axes. Note - this includes Alan's solution, the vectors U1 and U2 would be rows of his rotation matrix. It's just a different way of looking at things.
Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."