private Vector3 Coordinate(float x, float y, float n, float k1, float k2, float a) { z1 = Complex32.Multiply( Complex32.Exp(new Complex32(0, 2f * math.PI * k1 / n)), Complex32.Pow(Complex32.Sin(new Complex32(x, y)), 2 / n) ); z2 = Complex32.Multiply( Complex32.Exp(new Complex32(0, 2f * math.PI * k2 / n)), Complex32.Pow(Complex32.Sin(new Complex32(x, y)), 2 / n) ); return(new Vector3(z1.Real, z2.Real, z1.Imaginary * math.cos(a) + z2.Imaginary * math.sin(a))); }
public static Complex32 Exp(Complex32 value) { return(Complex32.Exp(value)); }