如何在 Matlab 中绘制 3D 平面? [英] How can I plot a 3D-plane in Matlab?

查看:36
本文介绍了如何在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆