3D Animation size problem
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hallo people
I have been using Matlab for a week and have the task of programming a 3D figure. The figure must consist of several small figures and I have already managed to program two small figure, but I have a problem with the size when I start the program, the figure comes very zoomed and I have to zoom in every time.

Hauptkoerper_Flugzeug = struct ();
Hauptkoerper_Flugzeug.Groesse =1;
P1 = [1 0 0];
P2 = [2 0 0];
P3 = [2.5 1 0];
P4 = [2 2 0];
P5 = [1 2 0];
P6 = [0.5 1 0];
P7 = [1 0 9];
P8 = [2 0 9];
P9 = [2.5 1 9];
P10 = [2 2 9];
P11 = [1 2 9];
P12 = [0.5 1 9];
P13 = [1.5 1 12];
P14 = [0.5 1 0];
P15 = [0.5 1 7];
P16 = [-2.5 1 0];
P17 = [0.6 0.8 0];
P18 = [0.6 0.8 7];
Hauptkoerper_Flugzeug.Ecken = ([P1;P2;P3;P4;P5;P6;P7;P8;P9;P10;P11;P12;P13;P14;P15;P16;P17;P18]-0.5)*Hauptkoerper_Flugzeug.Groesse
F1 = [1 2 8 7 1 1];
F2 = [7 1 6 12 7 7];
F3 = [12 6 5 11 12 12];
F4 = [5 11 10 4 5 5];
F5 = [4 10 9 3 4 4];
F6 = [3 9 8 2 3 3];
F7 = [1 2 3 4 5 6];
F8 = [7 8 9 10 11 12];
F9 = [7 8 13 7 7 7];
F10 = [8 9 13 8 8 8];
F11 = [9 10 13 9 9 9];
F12 = [10 11 13 10 10 10];
F13 = [11 12 13 11 11 11];
F14 = [14 16 15 14 14 14];
F15 = [16 15 18 16 16 16];
F16 = [16 14 17 16 16 16];
F17 = [16 17 18 16 16 16];
Hauptkoerper_Flugzeug.Flaechen = [F1;F2;F3;F4;F5;F6;F7;F8;F9;F10;F11;F12;F13;F14;F15;F16;F17]
plot3(0,0,0)
grid on
patch('Vertices',Hauptkoerper_Flugzeug.Ecken,'Faces',Hauptkoerper_Flugzeug.Flaechen,'FaceColor','red')
axis equal
a=Hauptkoerper_Flugzeug.Groesse * 1.5;
axis ([-a a -a a -a a])
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!