function elipsis(a,b,color)
hold on
x = a;
y = 0;
asqr = a^2;
bsqr = b^2;
a22 = 2 * asqr;
b22 = 2 * bsqr;
xslope = b22 * a;
yslope = 0;
fmid = bsqr * (0.25-x) + asqr;
% Περιοχη 1
while (xslope > yslope)
    image(x,y,color)
    y = y + 1;
    yslope = yslope + a22;
    if fmid >= 0
        x = x - 1;
        xslope = xslope - b22;
        fmid = fmid - xslope;
    end
    fmid = fmid + yslope + asqr;
end
% Συνορο περιοχων
fmid = fmid - (yslope + xslope)/2 + 0.75*(bsqr - asqr);
% Περιοχη 2
while(x >= 0)
    image(x,y,color)
    x = x - 1;
    xslope = xslope - b22;
    if fmid <= 0
        y = y + 1;
        yslope = yslope + a22;
        fmid = fmid + yslope;
    end
    fmid = fmid - xslope + bsqr;
end