MATLAB Answers

3D plane plotting restricted by 3 points

110 views (last 30 days)
how can plot a 3D plane restricted among 3 points...???.I mean the plane should be restricted by 3 lines formed by those 3 points


RAJ SINGH on 9 Jul 2018
Thanks alot man...your code worked... Can you even tell me that what changes I should implement if I need to do the same work but with 4 3D points which are co-planar, i.e. plotting a plane restricted by four 3D points which are co-planar.
Anton Semechko
Anton Semechko on 9 Jul 2018
There no significant changes required as you would still be using the 'patch' function. Examples of using 'patch' to plot quadrilaterals in xy-plane given in function documentation, but you would use exactly the same syntax to plot "3D" quadrilaterals.

Sign in to comment.

Accepted Answer

Anton Semechko
Anton Semechko on 8 Jul 2018
Equation of a plane is determined uniquely by any 3 (noncollinear) points lying on the plane. Based on your question, it sounds like you dont care about equation of the plane and just want to visualize region of a plane enclosed by 3 points (i.e., a triangle). Here is an example of how to do this:
% Vertex coordinates
p1=[0 0 0];
p2=[2 0 0];
p3=[1 sqrt(3/2) sqrt(3/2)];
% Plot trianle using 'patch'
axis equal vis3d
view([30 30])


Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by