GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — matplotlib-cpp/examples/surface.cpp at master · lava/matplotlib-cpp Expand file tree/ Copy pathsurface.cppMore file actions 25 lines (21 loc) · 591 Bytes / Copy pathsurface.cppFile metadata and controls25 lines (21 loc) · 591 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include "../matplotlibcpp.h" #include <cmath> namespace plt = matplotlibcpp; int main() { std::vector<std::vector<double>> x, y, z; for (double i = -5; i <= 5; i += 0.25) { std::vector<double> x_row, y_row, z_row; for (double j = -5; j <= 5; j += 0.25) { x_row.push_back(i); y_row.push_back(j); z_row.push_back(::std::sin(::std::hypot(i, j))); } x.push_back(x_row); y.push_back(y_row); z.push_back(z_row); } plt::plot_surface(x, y, z); plt::set_zlim(-1.5, 1.5); plt::show(); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |