comparison scripts/plot/isosurface.m @ 14335:ce2b59a6d0e5

maint: periodic merge of stable to default.
author Rik <octave@nomad.inbox5.com>
date Sun, 05 Feb 2012 15:32:24 -0800
parents 4506eade9f04 4d917a6a858b
children f3d52523cde1
comparison
equal deleted inserted replaced
14333:6dd710b73150 14335:ce2b59a6d0e5
78 ## lin = linspace (0, 2, N); 78 ## lin = linspace (0, 2, N);
79 ## [x, y, z] = meshgrid (lin, lin, lin); 79 ## [x, y, z] = meshgrid (lin, lin, lin);
80 ## c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2); 80 ## c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2);
81 ## figure (); # Open another figure window 81 ## figure (); # Open another figure window
82 ## 82 ##
83 ## subplot (2, 2, 1); view (-38, 20); 83 ## subplot (2,2,1); view (-38, 20);
84 ## [f, v] = isosurface (x, y, z, c, iso); 84 ## [f, v] = isosurface (x, y, z, c, iso);
85 ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); 85 ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none");
86 ## set (gca, "PlotBoxAspectRatioMode","manual", ... 86 ## set (gca, "PlotBoxAspectRatioMode", "manual", ...
87 ## "PlotBoxAspectRatio", [1 1 1]); 87 ## "PlotBoxAspectRatio", [1 1 1]);
88 ## # set (p, "FaceColor", "green", "FaceLighting", "phong"); 88 ## # set (p, "FaceColor", "green", "FaceLighting", "phong");
89 ## # light ("Position", [1 1 5]); # Available with the JHandles package 89 ## # light ("Position", [1 1 5]); # Available with the JHandles package
90 ## 90 ##
91 ## subplot (2, 2, 2); view (-38, 20); 91 ## subplot (2,2,2); view (-38, 20);
92 ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "blue"); 92 ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "blue");
93 ## set (gca, "PlotBoxAspectRatioMode","manual", ... 93 ## set (gca, "PlotBoxAspectRatioMode", "manual", ...
94 ## "PlotBoxAspectRatio", [1 1 1]); 94 ## "PlotBoxAspectRatio", [1 1 1]);
95 ## # set (p, "FaceColor", "none", "FaceLighting", "phong"); 95 ## # set (p, "FaceColor", "none", "FaceLighting", "phong");
96 ## # light ("Position", [1 1 5]); 96 ## # light ("Position", [1 1 5]);
97 ## 97 ##
98 ## subplot (2, 2, 3); view (-38, 20); 98 ## subplot (2,2,3); view (-38, 20);
99 ## [f, v, c] = isosurface (x, y, z, c, iso, y); 99 ## [f, v, c] = isosurface (x, y, z, c, iso, y);
100 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, \ 100 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, ...
101 ## "FaceColor", "interp", "EdgeColor", "none"); 101 ## "FaceColor", "interp", "EdgeColor", "none");
102 ## set (gca, "PlotBoxAspectRatioMode","manual", ... 102 ## set (gca, "PlotBoxAspectRatioMode", "manual", ...
103 ## "PlotBoxAspectRatio", [1 1 1]); 103 ## "PlotBoxAspectRatio", [1 1 1]);
104 ## # set (p, "FaceLighting", "phong"); 104 ## # set (p, "FaceLighting", "phong");
105 ## # light ("Position", [1 1 5]); 105 ## # light ("Position", [1 1 5]);
106 ## 106 ##
107 ## subplot (2, 2, 4); view (-38, 20); 107 ## subplot (2,2,4); view (-38, 20);
108 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, \ 108 ## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, ...
109 ## "FaceColor", "interp", "EdgeColor", "blue"); 109 ## "FaceColor", "interp", "EdgeColor", "blue");
110 ## set (gca, "PlotBoxAspectRatioMode","manual", ... 110 ## set (gca, "PlotBoxAspectRatioMode", "manual", ...
111 ## "PlotBoxAspectRatio", [1 1 1]); 111 ## "PlotBoxAspectRatio", [1 1 1]);
112 ## # set (p, "FaceLighting", "phong"); 112 ## # set (p, "FaceLighting", "phong");
113 ## # light ("Position", [1 1 5]); 113 ## # light ("Position", [1 1 5]);
114 ## @end smallexample 114 ## @end smallexample
115 ## 115 ##