comparison scripts/plot/draw/light.m @ 30236:628f26e122d9

maint: use rows() or columns() instead of size(__, 1 | 2) for clarity. * ccolamd.cc, colamd.cc, Map.m, material.m, isocolors.m, isonormals.m, isosurface.m, light.m, reducepatch.m, reducevolume.m, movfun.m, ilu.m, __alltohandles__.m, dump_demos.m, mk-sparse-tst.sh: Use rows() or columns() instead of size(__, 1 | 2) for clarity.
author Rik <rik@octave.org>
date Mon, 11 Oct 2021 20:09:59 -0700
parents 7854d5752dd2
children 796f54d4ddbf
comparison
equal deleted inserted replaced
30235:3646ef5efd27 30236:628f26e122d9
156 156
157 %!demo 157 %!demo
158 %! ## Lighting modes on surfaces 158 %! ## Lighting modes on surfaces
159 %! clf; 159 %! clf;
160 %! Z = peaks (); 160 %! Z = peaks ();
161 %! [X, Y] = meshgrid (1:size (Z, 2), 1:size (Z, 1)); 161 %! [X, Y] = meshgrid (1:columns (Z), 1:rows (Z));
162 %! 162 %!
163 %! h_axes1 = axes (); 163 %! h_axes1 = axes ();
164 %! surf (X, Y, Z, "LineStyle", "none", "FaceLighting", "none"); 164 %! surf (X, Y, Z, "LineStyle", "none", "FaceLighting", "none");
165 %! hold on; 165 %! hold on;
166 %! surf (X + round (1.2 * size (Z, 2)), Y, Z, "LineStyle", "none", ... 166 %! surf (X + round (1.2 * columns (Z)), Y, Z, "LineStyle", "none", ...
167 %! "FaceLighting", "flat"); 167 %! "FaceLighting", "flat");
168 %! surf (X + round (2.4 * size (Z, 2)), Y, Z, "LineStyle", "none", ... 168 %! surf (X + round (2.4 * columns (Z)), Y, Z, "LineStyle", "none", ...
169 %! "FaceLighting", "gouraud"); 169 %! "FaceLighting", "gouraud");
170 %! axis tight 170 %! axis tight
171 %! axis equal 171 %! axis equal
172 %! view (2); 172 %! view (2);
173 %! light ("Position", [-1 1 1]); 173 %! light ("Position", [-1 1 1]);