vogelDisc function

(double, double) vogelDisc(
  1. int i,
  2. int n,
  3. double turn
)

VogelDisc from shadow.glsl — S3.

Implementation

(double, double) vogelDisc(int i, int n, double turn) {
  final r = math.sqrt((i + 0.5) / n);
  final theta = i * 2.3999632 + turn;
  return (r * math.cos(theta), r * math.sin(theta));
}