| 676 | } |
| 677 | |
| 678 | std::pair<vec2, vec2> generate( const Point &previous ) const |
| 679 | { |
| 680 | const auto offset = 4 * math<float>::tan( ( theta - previous.theta ) / 4 ) / 3; |
| 681 | const auto p1 = vec2( math<float>::cos( previous.tangent ) * offset * previous.theta + previous.x, math<float>::sin( previous.tangent ) * offset * previous.theta + previous.y ); |
| 682 | const auto p2 = vec2( math<float>::cos( tangent - float( M_PI ) ) * offset * theta + x, math<float>::sin( tangent - float( M_PI ) ) * offset * theta + y ); |
| 683 | return std::make_pair( p1, p2 ); |
| 684 | } |
| 685 | }; |
| 686 | |
| 687 | const auto step = spacing / ( 2.0f * float( M_PI ) ); |