Find points in spiral

With this code I get the result shown in image 1.
but I want something like in image2.
Any sugestions?

	var distance	:int = .1;
	var length 	:int = 20;

	for(var point :int = 0; point < length; point++) 
	{
   		var randomPos :Vector3; 
	   	randomPos.x = point * distance * Mathf.Cos(distance);
		randomPos.y = 0;
	 	randomPos.z = point * distance * Mathf.Sin(distance);
        var systemTemplate :GameObject = Instantiate(Sphere, randomPos, Quaternion.identity);
		
		distance += 1;
	}

your variable distance is INT and you are assigning float.
change to

var distance : float = .1;

For more refined result use:

distance += .4f;

In the last line.

If you however want to have more or less equal distance between each star, things will get a little more complex.