Bonjour,
depuis un jour je cherche une solution à mon problème et je n'ai pas trouvé une solution claire sur le net et j'ai besoin de votre aide pour avancer
En effet, à partir des coordonnées des points en 3D, j'ai réussi à trouver le polynôme qui passe au près de max des points (polynôme de second degré
z=42.5376 - 2.9056*x + 3.7073*y + 0.044912*x^2 - 0.038811*y^2 - 0.047189*x*y)
Et, j'aimerais déterminer la courbure moyenne de la courbe de ce polynôme.
quel qu'un pourra me proposer un lien ou une fonction ou tool box qui me pourra m'aider?
Le fichier .txt contenant les points en 3D
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 clear all close all clc tableleft = load ('.txt', '-ascii'); dim = size(tableleft); nbrlignes = dim(1,1); xi=[]; yi=[]; zi=[]; xiyi=[]; for ii=1:nbrlignes xi = [xi;tableleft(ii,1)]; yi = [yi;tableleft(ii,2)]; zi = [zi;tableleft(ii,3)]; end; % 3D points: figure(1) scatter3(xi,yi,zi,'+g') xiyi = [xi yi]; fitdata = polyfitn(xiyi,zi,'constant x y x^2 y^2 x*y'); poly=polyn2sympoly(fitdata) %validation axe et le polynome Z1 = polyvaln(fitdata,[xi(:),yi(:)]); erreurAxe = abs(Z1-zi) hold on %plot3(xi,yi,Z1,'mx') N=20; x_min = min(min(xi)); x_max = max(max(xi)); y_min = min(min(yi)); y_max = max(max(yi)); L = linspace(x_min,x_max,N); P = linspace(y_max,y_min,N); Z = polyvaln(fitdata,[L(:),P(:)]); hold on plot3(L,P,Z,'-b')
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 63.125 6.125 41 62 8 39 61.125 9.75 37 60.1111 11.3333 35 59.125 13.125 33 58 15 31 56.875 16.875 29 55.8889 18.4444 27 54.875 19.875 25 53.7143 21.8571 23 52.125 23.75 21 51 25.5 19 50 28 17 48.7143 29.8571 15 48.1667 31.9167 13
Cordialement,
Maroua
Partager