平面(ax+by+cz+d=0)への近似
Afficher commentaires plus anciens
3次元のランダムに散らばった点群データ(約1000点)から平面(ax+by+cz+d=0)への近似を行う方法を教えてください。
Réponse acceptée
Plus de réponses (1)
KSSV
le 15 Déc 2016
clc; clear all ;
% Ax + By + Cz + D = 0
% where the coefficients "A", "B", "C", and "D" are known values.
A = rand ; B = rand ; C = rand ; D = rand ; % considering some random values
%%Method 1
x = [1 -1 -1 1]; % Generate data for x vertices
y = [1 1 -1 -1]; % Generate data for y vertices
z = -1/C*(A*x + B*y + D); % Solve for z vertices data
patch(x, y, z);
%%method 2
[x y] = meshgrid(-1:0.1:1); % Generate x and y data
z = -1/C*(A*x + B*y + D); % Solve for z data
surf(x,y,z) %Plot the surface
2 commentaires
Ichiro Suzuki
le 15 Déc 2016
KSSV
le 15 Déc 2016
You have to be bit clear about your question.What do you mean by approximate calculation?
Catégories
En savoir plus sur Interpolation dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!