I want to accomplish something like in C#:

[![enter image description here](https://i.stack.imgur.com/Z8YpC.png)](https://i.stack.imgur.com/Z8YpC.png)

To do so I was thinking on 

```
1. get center of canvas
2. draw center ellipse using center
3. taking the center ellipse, do two loops, one to draw ellipses that are above center, and other loop to draw ellipses that are under center
(I assigned same `x` to all and changed `y` to set ellipses positions)
4. Everytime a cicle passed, update size (incrise it) and `Y` multiplying it by size and its indes in loop

```

I am using 15 as size of ellipse (width and height), then for each ellipse I increase it 1.4 times the size.

The code is: 

```
    SolidColorBrush color = new SolidColorBrush(Colors.Red);
    int ellipsesAbove = 5;
    int ellipsesUnder = 5;
    double size = 20;
    double x_center = 50;
    double y_center = 50;

    //------ Create center Ellipse
    Ellipse e = new Ellipse();
    e.Height = size;
    e.Width = size;
    e.StrokeThickness = 1;
    e.Stroke = color;
    e.Fill = color;
    e.Margin = new Thickness(x_center, y_center, 1, 1);
    this.Children.Add(e);
    //----loop to create above ellipses 
    //I SUBSTRACT SIZE IN Y
    for (int i = 2; i <= ellipsesAbove; i++)
    {
        Ellipse ac = new Ellipse();
        ac.Height = size;
        ac.Width = size;
        ac.StrokeThickness = 1;
        ac.Stroke = color;
        ac.Fill = color;
        double x = x_center;
        double y = y_center - (size * i); 
        ac.Margin = new Thickness(x, y, 1, 1);
        this.Children.Add(ac);
        size *= 1.4;
    }
    //reset size
    size = 15;
    //-------loop to create under ellipses
    //I ADD SIZE IN Y
    for (int j = 2; j <= ellipsesUnder; j++)
    {
        Ellipse uc = new Ellipse();
        uc.Height = size;
        uc.Width = size;
        uc.StrokeThickness = 1;
        uc.Stroke = color;
        uc.Fill = color;
        double x = x_center;
        double y = y_center + (size * j); 
        uc.Margin = new Thickness(x, y, 1, 1);
        this.Children.Add(uc);
        size *= 1.4;
    }

```

However I am getting unaligned and poorly distanced ellipses
[![enter image description here](https://i.stack.imgur.com/Lkc1k.png)](https://i.stack.imgur.com/Lkc1k.png)

How to improve code or loops to get correct result?