| 233 | } |
| 234 | |
| 235 | void FlowFieldFloat::emitLissajousLine(float t) { |
| 236 | int w = (int)getWidth(); |
| 237 | int h = (int)getHeight(); |
| 238 | float cx = (w - 1) * 0.5f; |
| 239 | float cy = (h - 1) * 0.5f; |
| 240 | float s = mParams.endpoint_speed; |
| 241 | |
| 242 | // Radii scaled from original 32x32 prototype ratios. |
| 243 | float x1 = cx + cx * 0.742f * sinf(t * s * 1.13f + 0.20f); |
| 244 | float y1 = cy + cy * 0.677f * sinf(t * s * 1.71f + 1.30f); |
| 245 | float x2 = cx + cx * 0.774f * sinf(t * s * 1.89f + 2.20f); |
| 246 | float y2 = cy + cy * 0.710f * sinf(t * s * 1.37f + 0.70f); |
| 247 | |
| 248 | drawAALine(x1, y1, x2, y2, t, mParams.color_shift); |
| 249 | |
| 250 | CRGB endA = rainbow(t, mParams.color_shift, 0.0f); |
| 251 | CRGB endB = rainbow(t, mParams.color_shift, 0.5f); |
| 252 | float discDiam = 1.7f; |
| 253 | drawDot(x1, y1, discDiam, endA.r, endA.g, endA.b); |
| 254 | drawDot(x2, y2, discDiam, endB.r, endB.g, endB.b); |
| 255 | } |
| 256 | |
| 257 | void FlowFieldFloat::emitOrbitalDots(float t) { |
| 258 | int w = (int)getWidth(); |
no test coverage detected