// see the last post "using complex numbers" for more details class Complex{ float x,y; Complex(float xp,float yp){ x=xp; y=yp; } // addition Complex add(Complex two){ return new Complex(x+two.x,y+two.y); } // multipliction Complex mult(Complex two){ return new Complex(x*two.xy*two.y,x*two.y+y*two.x); } // complex conjugation (inverting the sign of the imaginary part) Complex cc(){ return new Complex(x,y); } // "inversion"= 1/z Complex invers(){ float rsq=x*x+y*y+1E10; return new Complex(x/rsq,y/rsq); } // nth power of z Complex pwr(int n){ Complex result=new Complex(x,y); float h; for (int i=2;i<=n;i++){ h=result.x*xresult.y*y; result.y=result.y*x+result.x*y; result.x=h; } return result; } // absolute value, squared float rsq(){ return x*x+y*y; } }

Recent Posts
 A rosette in a roman mosaic is an exponential transform of a periodic tiling
 Fractal tiling of a sphere with octahedral twocolour symmetry
 A fractal tiling of both octahedral and icosahedral symmetry
 A variant of the Apollonian gasket with icosahedral symmetry
 Apollonian gasket as a fractal in tiled hyperbolic space
Recent Comments
Archives
 September 2019
 August 2019
 July 2019
 April 2019
 March 2019
 November 2018
 October 2018
 September 2018
 August 2018
 March 2018
 February 2018
 January 2018
 December 2017
 November 2017
 September 2017
 August 2017
 July 2017
 June 2017
 May 2017
 February 2017
 January 2017
 November 2016
 February 2014
 January 2014
 December 2013
 November 2013
 October 2013
 September 2013
 August 2013
 May 2013
 April 2013
 March 2013
 February 2013
 January 2013
 December 2012
 November 2012
 October 2012
 September 2012
 August 2012
 July 2012
 June 2012
 May 2012
 April 2012
Categories
Meta