如何表示三角形内任一点的坐标。

已知三角形三个顶点坐标A(x1,y1),B(x2,y2),C(x3,y3),求三角形内任意一点O的坐标表示;我知道数学表达式是O=(1-α1)A+α1(1-α2)B+α1α2C,α1∈[0,1],α2∈[0,1],可是如何用matlab表示出来呢,用符号表达式吗?这只是平面二维的情况,若是三维的或是更高维度的又如何表示呢?

 Réponse acceptée

sefal
sefal le 22 Nov 2022

0 votes

不知道我是不是正确理解了你的意思,写了一段程序供参考:
%% 清空环境变量
close all; clear; clc;
%% 主程序
syms x1 y1 x2 y2 x3 y3;
alpha1 = rand;
alpha2 = rand;
O = (1-alpha1)*[x1 y1] + alpha1 * (1- alpha2)* [x2 y2] + alpha1 * alpha2 * [x3 y3]

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics and Optimization dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!