| 2 | #include <matplot/matplot.h> |
| 3 | |
| 4 | int main() { |
| 5 | using namespace matplot; |
| 6 | std::vector<double> t = iota(0, pi / 500, pi); |
| 7 | std::vector<double> xt1 = |
| 8 | transform(t, [](auto x) { return sin(x) * cos(10 * x); }); |
| 9 | std::vector<double> yt1 = |
| 10 | transform(t, [](auto x) { return sin(x) * sin(10 * x); }); |
| 11 | std::vector<double> zt1 = transform(t, [](auto x) { return cos(x); }); |
| 12 | std::vector<double> xt2 = |
| 13 | transform(t, [](auto x) { return sin(x) * cos(12 * x); }); |
| 14 | std::vector<double> yt2 = |
| 15 | transform(t, [](auto x) { return sin(x) * sin(12 * x); }); |
| 16 | std::vector<double> zt2 = transform(t, [](auto x) { return cos(x); }); |
| 17 | plot3(xt1, yt1, zt1, xt2, yt2, zt2); |
| 18 | show(); |
| 19 | return 0; |
| 20 | } |