A quickly made oval function, you need to make the following changes to the framework;
Put this line where all the subs are declared;
DECLARE SUB OVAL(BYVAL CX AS INTEGER , BYVAL CY AS INTEGER , BYVAL R1 AS INTEGER, BYVAL R2 AS INTEGER, BYVAL QU AS INTEGER, BYVAL CR AS INTEGER,BYVAL CG AS INTEGER,BYVAL CB AS INTEGER)
Put this sub at the end of the program;
SUB OVAL(BYVAL CX AS INTEGER , BYVAL CY AS INTEGER , BYVAL R1 AS INTEGER, BYVAL R2 AS INTEGER, BYVAL QU AS INTEGER, BYVAL CR AS INTEGER,BYVAL CG AS INTEGER,BYVAL CB AS INTEGER)
DIM AS DOUBLE RAD2DEG
RAD2DEG = ((4*ATN(1)) / 180 )
DIM AS INTEGER X1,X2,Y1,Y2,X
X2=CX+(R1*SIN((-QU)*RAD2DEG))
Y2=CY+(R2*COS((-QU)*RAD2DEG))
FOR X=0 TO 359+QU STEP QU
X1=CX+(R1*SIN(X*RAD2DEG))
Y1=CY+(R2*COS(X*RAD2DEG))
TRIANGLE(X1,Y1,X2,Y2,CX,CY,CR,CG,CB)
X2=X1
Y2=Y1
NEXT
END SUB
And use it like this;
OVAL ( CENTRE X , CENTRE Y , RADIUS 1 , RADIUS 2 , QUALITY , R , G , B )
Nb. Quality of 1 is highest quality ovals, Quality of 5 is less high quality but still acceptable.
It works by using the filled triangle function.
If you want wire frame change this line;
TRIANGLE(X1,Y1,X2,Y2,CX,CY,CR,CG,CB)
To ;
EDGE(X1,Y1,X2,Y2,CR,CG,CB)
Hope that helps
