BevelSupportPoints function

List<Vector2> BevelSupportPoints(
  1. double width,
  2. double height,
  3. int nSupports, {
  4. Easing widthEasing = EasingCosine,
  5. Easing heightEasing = EasingSine,
})

Implementation

List<VM.Vector2> BevelSupportPoints(double width, double height, int nSupports,
    {Easing widthEasing = EasingCosine, Easing heightEasing = EasingSine}) {
  // out[0]
  List<VM.Vector2> out = List.generate(nSupports, (i) {
    // make sure t assumes zero and one at the extremes
    double t = i / (nSupports - 1);
    return VM.Vector2(-width * widthEasing(t), height * heightEasing(t));
  });
  return out;
}