// by Tim Ratigan // plots magnitude of EGF for bitstrings not containing the pattern // 0000000001 public class Bitstring1 implements ComplexFunction { public Complex power(Complex z, int n) { Complex d = z; for (int i = 0; i < n; i++) { d = d.times(z); } return d; } public Complex eval(Complex z) { // \frac{1}{z^{10}-2z+1} Complex one = new Complex(1, 0); Complex d = power(z,10).minus(z.plus(z)).plus(one); return d.reciprocal(); } public static void main(String[] args) { Plot2Dez.show(new Bitstring1(), 512); } }