// ===========================================================================//	IkedasChaos.java	1996 Yushin Hozumi All rights reserved.//						Author:Yushin Hozumi// ===========================================================================package	StudioRAIN.chaos;import StudioRAIN.geometry.*;import StudioRAIN.chaos.*;public class IkedasChaos implements ChaosGenerator2D{	float a, b;		public IkedasChaos( float inA, float inB )	{		a = inA;		b = inB;	}	public Vector2D transform( Vector2D inVector )	{		float theX = inVector.getX();		float theY = inVector.getY();		float theX2 = theX * theX;		float theY2 = theY * theY;		float theT = 0.4F - 6.0F / ( 1.0F + theX2 + theY2 );		float theSinT = ( float )Math.sin( theT );		float theCosT = ( float )Math.cos( theT );		return new Vector2D		(			a + b * ( theX * theCosT - theY * theSinT ),			b * ( theX * theSinT + theY * theCosT )		);	}	public String getScript()	{		return 			"t(n) = 0.4 - 6 / ( 1 + x(n) * x(n) + y(n) * y(n) )\n" +			"x(n+1) =  ( " + Float.toString( a ) + " ) + ( " + Float.toString( b ) + " ) * ( x(n) * cos( t(n) ) - y(n) * sin( t(n) ) )\n" +			"y(n+1) = ( " + Float.toString( b ) + " ) * ( x(n) * sin( t(n) ) + y(n) * cos( t(n) ) )\n";	}}