Organic circle
Creating organic and natural moving objects was always a big joy for me. Now i made a organic circle data class. This class does not display anything. Instead it returns a pointfield with point objects. Encapsulating the view from the data, enables the posibility to display the data like you want. I made the organic circle class for as2 and as3 as well. In this example i played with some filter effects and bitmap redrawing. If you press the mouse the circle radius will be reduced.
How to use:
var _organiccircle:OrganicCircle = new OrganicCircle();
_organiccircle.radius = 40;
_organiccircle.pointamount = 64;
_organiccircle.fractalsize = 60;
_organiccircle.intensity = .4;
_organiccircle.speed = 1;
_organiccircle.startAnimation();var _circle:Sprite = new Sprite();
_circle.x = 200;
_circle.y = 200;
addChild(_circle);
var _timer:Timer = new Timer(50,0);
_timer.addEventListener("timer",onRedraw);
_timer.start();
private function onRedraw(event:TimerEvent) : void
{
var ar_points : Array = _organiccircle.pointfield;
var n : int = ar_points.length;
var p : SimplePoint = ar_points[0];
_circle.graphics.clear();
_circle.graphics.lineStyle(1, 0x000000, 100);
_circle.graphics.moveTo(p.x, p.y);
while (n--)
{
p = ar_points[n];
_circle.graphics.lineTo(p.x, p.y);
}
}
Download example and class: organiccircle.zip
![[del.icio.us]](http://www.bigsource.de/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.bigsource.de/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.bigsource.de/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.bigsource.de/wp-content/plugins/bookmarkify/google.png)
![[Mixx]](http://www.bigsource.de/wp-content/plugins/bookmarkify/mixx.png)
![[MySpace]](http://www.bigsource.de/wp-content/plugins/bookmarkify/myspace.png)
![[StumbleUpon]](http://www.bigsource.de/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://www.bigsource.de/wp-content/plugins/bookmarkify/twitter.png)

