Mercurial > hg > octave-nkf
comparison scripts/plot/private/__marching_cube__.m @ 14872:c2dbdeaa25df
maint: use rows() and columns() to clarify m-files.
* gradient.m, interp1q.m, rat.m, tsearchn.m, image.m, imwrite.m, area.m,
contourc.m, hist.m, isocolors.m, isonormals.m, meshz.m, print.m, __bar__.m,
__go_draw_axes__.m, __interp_cube__.m, __marching_cube__.m, __patch__.m,
__print_parse_opts__.m, __quiver__.m, rose.m, shrinkfaces.m, stairs.m,
surfnorm.m, tetramesh.m, text.m, deconv.m, spline.m, intersect.m, setdiff.m,
setxor.m, union.m, periodogram.m, pcg.m, perms.m: Replace size (x,1) with
rows (x) and size(x,2) with columns(x).
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 17 Jul 2012 13:34:19 -0700 |
parents | 5d3a684236b0 |
children | 7babcdb9bc13 |
comparison
equal
deleted
inserted
replaced
14871:26c4ca9782b0 | 14872:c2dbdeaa25df |
---|---|
167 id1 = id_c + offset(edges(jj, 1)); | 167 id1 = id_c + offset(edges(jj, 1)); |
168 id2 = id_c + offset(edges(jj, 2)); | 168 id2 = id_c + offset(edges(jj, 2)); |
169 if (calc_cols) | 169 if (calc_cols) |
170 pp(id__, 1:5, jj) = [vertex_interp(iso, xx(id1), yy(id1), zz(id1), ... | 170 pp(id__, 1:5, jj) = [vertex_interp(iso, xx(id1), yy(id1), zz(id1), ... |
171 xx(id2), yy(id2), zz(id2), c(id1), c(id2), colors(id1), colors(id2)), ... | 171 xx(id2), yy(id2), zz(id2), c(id1), c(id2), colors(id1), colors(id2)), ... |
172 (1:size (id_, 1))' + ix_offset ]; | 172 (1:rows (id_))' + ix_offset ]; |
173 else | 173 else |
174 pp(id__, 1:4, jj) = [vertex_interp(iso, xx(id1), yy(id1), zz(id1), ... | 174 pp(id__, 1:4, jj) = [vertex_interp(iso, xx(id1), yy(id1), zz(id1), ... |
175 xx(id2), yy(id2), zz(id2), c(id1), c(id2)), ... | 175 xx(id2), yy(id2), zz(id2), c(id1), c(id2)), ... |
176 (1:size (id_, 1))' + ix_offset ]; | 176 (1:rows (id_))' + ix_offset ]; |
177 endif | 177 endif |
178 ix_offset += size (id_, 1); | 178 ix_offset += rows (id_); |
179 endfor | 179 endfor |
180 | 180 |
181 ## phase III: calculate the triangulation from the point list | 181 ## phase III: calculate the triangulation from the point list |
182 T = []; | 182 T = []; |
183 tri = tri_table(cc(id)+1, :); | 183 tri = tri_table(cc(id)+1, :); |
184 for jj=1:3:15 | 184 for jj=1:3:15 |
185 id_ = find (tri(:, jj)>0); | 185 id_ = find (tri(:, jj)>0); |
186 p = [id_, lindex*ones(size (id_, 1), 1),tri(id_, jj:jj+2)]; | 186 p = [id_, lindex*ones(rows (id_), 1),tri(id_, jj:jj+2)]; |
187 if (!isempty (p)) | 187 if (!isempty (p)) |
188 p1 = sub2ind (size (pp), p(:,1), p(:,2), p(:,3)); | 188 p1 = sub2ind (size (pp), p(:,1), p(:,2), p(:,3)); |
189 p2 = sub2ind (size (pp), p(:,1), p(:,2), p(:,4)); | 189 p2 = sub2ind (size (pp), p(:,1), p(:,2), p(:,4)); |
190 p3 = sub2ind (size (pp), p(:,1), p(:,2), p(:,5)); | 190 p3 = sub2ind (size (pp), p(:,1), p(:,2), p(:,5)); |
191 T = [T; pp(p1), pp(p2), pp(p3)]; | 191 T = [T; pp(p1), pp(p2), pp(p3)]; |