# 3d grafika
# vymazeme vsechny promenne
clear;
clc;
# vymazeme nastaveni vykreslovani
__gnuplot_raw__ "reset;";
# nastavuje opet vykresleni plnou carou
__gnuplot_set__ data style lines;
# nastavime desetinnou carku
__gnuplot_set__ decimalsign ',';
printf ("Zaciname opet definici promennych\n");
printf ("[x,y]=meshgrid(linspace(-2,2,40),linspace(-2,2,40))\n");
printf ("z=((x-0.3).^2+y.^2).*exp(-x.^2-(y-0.2).^2)\n");
printf ("mesh(x,y,z)\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
[x,y]=meshgrid(linspace(-2,2,40),linspace(-2,2,40));
printf ("Stisknete libovolnou klavesu...\n");
z=((x-.3).^2+y.^2).*exp(-x.^2-(y-.2).^2);
mesh(x,y,z);
printf ("Pridame vrstevnice\n");
printf ("__gnuplot_set__ contour a replot\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ contour
replot
printf ("zvetsime hustotu vrstevnic\n");
printf ("__gnuplot_set__ cntrparam levels auto 30 a replot\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ cntrparam level auto 30
replot
printf ("Vypneme popisky: __gnuplot_set__ nokey\n");
printf ("Vybarvime povrch: __gnuplot_set__ pm3d at s\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ nokey
__gnuplot_set__ pm3d at s
replot
printf ("Vypneme barevny sloupec: __gnuplot_set__ nocolorbox\n");
printf ("Zmenime barvy: __gnuplot_set__ palette rgbformulae 33,13,10\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ nocolorbox;
__gnuplot_set__ palette rgbformulae 33,13,10;
replot
printf ("Zmenime pohled: __gnuplot_set__ view map\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ view map;
replot
printf ("Zmenime nastaveni os: axis('equal')\n");
printf ("Zmenime popis os: __gnuplot_set__ tics out\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ tics out
axis('equal');
replot
printf ("Obrazek si jeste ulozime...\n");
printf ("__gnuplot_set__ term png large crop\n");
printf ("__gnuplot_set__ output 'pok.png'\n");
printf ("replot\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
__gnuplot_set__ term png large crop#20 size 1600,1200
__gnuplot_set__ output 'pok.png'
replot
printf ("jeste postscriptovy obrazek\n");
printf ("Stisknete libovolnou klavesu...\n");
pause
# postscriptovy obrazek
__gnuplot_set__ output 'pokus.eps'
__gnuplot_set__ term post enh eps color
replot
# vymazeme nastaveni vykreslovani
__gnuplot_raw__ "reset;";
# nastavuje opet vykresleni plnou carou
__gnuplot_set__ data style lines;
# nastavime desetinnou carku
__gnuplot_set__ decimalsign ',';
# vratime terminal
__gnuplot_set__ term win
__gnuplot_set__ output
