Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In geometric modeling, 3D objects are often represented by approximating their s

ID: 3789161 • Letter: I

Question

In geometric modeling, 3D objects are often represented by approximating their surface with a “polygonal mesh,” that is, a collection of small polygons. The polygons are usually triangles or quadrilaterals, and are usually assumed to be planar (i.e, flat). A triangle will always lie in some plane. But a quadrilateral might or might not be planar. For example, the quadrilateral with vertices (0,0,0), (1,0,0), (1,1,0), (0,1,0) lies in the z = 0 plane. But the quadrilateral with vertices (0,0,0), (1,0,0), (1,1,5), (0,1,0) does not lie in any plane. One way to check if an arbitrary quadrilateral is planar is to check whether the vectors between its vertices are linearly dependent. Suppose p1, p2, p3, p4 are the vertices (in R3 ) of a quadrilateral. The quadrilateral is planar if and only if the three vectors from p1 to p2, from p1 to p3, and from p1 to p4 are linearly dependent. Use this approach to check whether the quadrilateral with vertices (1,1,0), (2,3,2), (4,2,1), and (3,2,2) is planar.

Explanation / Answer

Draw a vector from A to B, and from A to C. Take the cross product of them, and now you have the normal vector to the plane containing A, B, and C. Draw a vector from A to D, and take the dot product of this with the normal vector. If the dot product is zero, the 4 points are coplanar (because a dot product of zero implies that the angle between two vectors is 90 degrees - and thus D is coplanar to A, B, and C).

As it is in computer science , i thought you need a code so im writting code in matlab

clear all;
clc;


b = [2 3 2];
a = [1 1 0];
c = [4,2,1];
d = [3,2,2];

ab = cross(a,b)
ac = cross(a,c)
abc = cross(ab,ac)
ad = cross(a,d)

abcd = dot(abc,ad)

this results to zero..therefore the vertices are in coplanar