Very Quick Fill Problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Very Quick Fill Problem

trackman1013trackman1013 Posts: 1Member
Hey, so i'm working on getting this fill function to work on my Oval, what am i doing wrong.

My function:

function DrawOval(xc,yc,a,b,c)

%Draws and Oval of Major Axis "a" and Minor Axis "b"
%centered at (xc,yc). Returns each x and y value.

for t=0:pi/180:2*pi
X=xc+a*cos(t);
Y=yc+b*sin(t);
plot(X,Y)
end
fill(x,y,c)

My program:

close all
figure
axis equal on
hold on

xc=0;
yc=0;
a=10.9;
b=8.8;

DrawOval(xc,yc,a,b,'b');

thanks a lot
Sign In or Register to comment.