Commit 3d6fd6d3 by LEFEBVREJP email

### Further work on chaikins method.

parent c9137829
Pipeline #16067 failed with stages
in 359 minutes and 20 seconds
 ... ... @@ -16,9 +16,18 @@ std::vector> chaikins( size_t sequence) { std::vector> result(control_polygon.size() * (sequence + 1)); for (size_t si = 0; si < sequence; ++si) (sequence)); for (size_t pi = 0; pi < control_polygon.size(); pi += 2) { std::pair p1 = translate(control_polygon[pi]); std::pair p2 = translate(control_polygon[pi + 1]); std::pair qi = std::make_pair( p1.first * .75 + p2.first * .25, p1.second * .75 + p2.second * .25); std::pair ri = std::make_pair( p1.first * .25 + p2.first * .75, p1.second * .25 + p2.second * .75); result[pi] = qi; result[pi + 1] = ri; } return result; } ... ...
 ... ... @@ -22,9 +22,17 @@ TEST(RadixChaikins, Simple) return std::make_pair(10.f * float(point.first), 10.f * float(point.second)); }; std::vector> result = std::vector> results = chaikins(control_polygon, tranlate); size_t i = 0; for (const auto& point : results) { std::cout << i << ". [" << point.first << "," << point.second << "]" << std::endl; i++; } std::vector> blessed{ {10.f, 20.f}, {10.f, 30.f}, {10.f, 40.f}, {20.f, 40.f}, {30.f, 40.f}, {40.f, 40.f}, {40.f, 30.f}, {50.f, 30.f}, {60.f, 30.f}, {70.f, 30.f}, ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!