Mercurial > octave-nkf
comparison scripts/plot/isonormals.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | 2884758e265b |
children | d1978e7364ad |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
59 ## figure (); ## Open another figure window | 59 ## figure (); ## Open another figure window |
60 ## | 60 ## |
61 ## subplot (2, 2, 1); view (-38, 20); | 61 ## subplot (2, 2, 1); view (-38, 20); |
62 ## [f, v, cdat] = isosurface (x, y, z, c, iso, y); | 62 ## [f, v, cdat] = isosurface (x, y, z, c, iso, y); |
63 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ | 63 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ |
64 ## "FaceColor", "interp", "EdgeColor", "none"); | 64 ## "FaceColor", "interp", "EdgeColor", "none"); |
65 ## isofinish (p); ## Call user function isofinish | 65 ## isofinish (p); ## Call user function isofinish |
66 ## | 66 ## |
67 ## subplot (2, 2, 2); view (-38, 20); | 67 ## subplot (2, 2, 2); view (-38, 20); |
68 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ | 68 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ |
69 ## "FaceColor", "interp", "EdgeColor", "none"); | 69 ## "FaceColor", "interp", "EdgeColor", "none"); |
70 ## isonormals (x, y, z, c, p); ## Directly modify patch | 70 ## isonormals (x, y, z, c, p); ## Directly modify patch |
71 ## isofinish (p); | 71 ## isofinish (p); |
72 ## | 72 ## |
73 ## subplot (2, 2, 3); view (-38, 20); | 73 ## subplot (2, 2, 3); view (-38, 20); |
74 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ | 74 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ |
75 ## "FaceColor", "interp", "EdgeColor", "none"); | 75 ## "FaceColor", "interp", "EdgeColor", "none"); |
76 ## n = isonormals (x, y, z, c, v); ## Compute normals of isosurface | 76 ## n = isonormals (x, y, z, c, v); ## Compute normals of isosurface |
77 ## set (p, "VertexNormals", n); ## Manually set vertex normals | 77 ## set (p, "VertexNormals", n); ## Manually set vertex normals |
78 ## isofinish (p); | 78 ## isofinish (p); |
79 ## | 79 ## |
80 ## subplot (2, 2, 4); view (-38, 20); | 80 ## subplot (2, 2, 4); view (-38, 20); |
81 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ | 81 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ |
82 ## "FaceColor", "interp", "EdgeColor", "none"); | 82 ## "FaceColor", "interp", "EdgeColor", "none"); |
83 ## isonormals (x, y, z, c, v, "negate"); ## Use reverse directly | 83 ## isonormals (x, y, z, c, v, "negate"); ## Use reverse directly |
84 ## isofinish (p); | 84 ## isofinish (p); |
85 ## @end example | 85 ## @end example |
86 ## | 86 ## |
87 ## @seealso {isosurface, isocolors, isocaps, marching_cube} | 87 ## @seealso {isosurface, isocolors, isocaps, marching_cube} |