如何在Matlab中绘制3D平面? [英] How can I plot a 3D-plane in Matlab?
本文介绍了如何在Matlab中绘制3D平面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用从3个点计算出的向量绘制平面:
I would like to plot a plane using a vector that I calculated from 3 points where:
pointA = [0,0,0];
pointB = [-10,-20,10];
pointC = [10,20,10];
plane1 = cross(pointA-pointB, pointA-pointC)
如何在3D模式下绘制"plane1"?
How do I plot 'plane1' in 3D?
推荐答案
这是使用fill3
绘制平面的简单方法:
Here's an easy way to plot the plane using fill3
:
points=[pointA' pointB' pointC']; % using the data given in the question
fill3(points(1,:),points(2,:),points(3,:),'r')
grid on
alpha(0.3)
这篇关于如何在Matlab中绘制3D平面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文