<p>Here is pseudo-code of how I setup an array representing the MandelBrot set, yet it becomes horribly stretched when leaving an aspect ratio of 1:1.</p>

<pre><code>xStep = (maxX - minX) / width;
yStep = (maxY - minY) / height;

for(i = 0; i &lt; width; i++)
 for(j = 0; j &lt; height; j++)
  {
   constantReal = minReal + xStep * i;
   constantImag = minImag + yStep * j;
   image[i][j] = inSet(constantReal, constantImag);
  }
</code></pre>

<p>Thanks!</p>

It probably has to do with how you are displaying the
```
image
```
array.  You use the width variable i as the first index, but usually the first index should be the slowest changing, that is, the height.
Try changing the last line to
```
image[j][i] =
```
...