Đây là những gì tôi đã đưa ra:
function [x, y, z] = plane_surf(normal, dist, size)
normal = normal/norm(normal);
center = normal * dist;
tangents = null(normal') * size;
res(1,1,:) = center + tangents * [-1;-1];
res(1,2,:) = center + tangents * [-1;1];
res(2,2,:) = center + tangents * [1;1];
res(2,1,:) = center + tangents * [1;-1];
x = squeeze(res(:,:,1));
y = squeeze(res(:,:,2));
z = squeeze(res(:,:,3));
end
nào bạn sẽ sử dụng như:
normal = cross(pointA-pointB, pointA-pointC);
dist = dot(normal, pointA)
[x, y, z] = plane_surf(normal, dist, 30);
surf(x, y, z);
Những âm mưu một hình vuông có độ dài cạnh 60 trên máy bay trong câu hỏi
tôi tin rằng có một Trang web SE cho MATLAB. –
không, lỗi của tôi -> http://area51.stackexchange.com/proposals/38040/matlab –
Bạn rất có thể sẽ cần phải tạo ra một loạt các điểm trong mặt phẳng, và sau đó vẽ các điểm bằng cách sử dụng 'surf' hoặc một số chức năng tương tự ... – Isaac