-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfd.cpp
More file actions
38 lines (31 loc) · 645 Bytes
/
Copy pathfd.cpp
File metadata and controls
38 lines (31 loc) · 645 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
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "fd.hpp"
#include <iostream>
#include <string>
int main(int argc, char const* const* argv) {
::fd::graph g;
g.p = {
{0.0f, 0.0f},
{-0.5f, 0.0f},
{0.5f, 0.0f},
{0.0f, 0.5f},
{0.0f, -0.5f}
};
g.c = {
{{1, 2, 3, 4}},
{{0}},
{{0}},
{{0}},
{{0}}
};
g.d = {2.0f, 2.0f};
auto t = 0.1f;
for (auto i = 0; i < ::std::stoi(argv[1]); ++i) {
for (auto [x, y] : g.p)
::std::cout << "(" << x << ", " << y << ")" << "\n";
g = ::fd::advance(g, t);
t *= 0.95;
::std::cout << "\n";
}
for (auto [x, y] : g.p)
::std::cout << "(" << x << ", " << y << ")" << "\n";
}