Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the QB equivalent of PLOT85 1

Status
Not open for further replies.

xwb

Programmer
Jul 11, 2002
6,828
GB
I'm translating a program written in BBC Basic to QBasic. I can figure out most of it except this strange command called PLOT85. It is something to do with graphics. Does anyone know of an equivalent command or set of commands to emulate PLOT85?

Thanks
 
I've just got a collection of source code with no documentation and just for fun, I'm translating some of the graphics programs to QBasic and then, if it works, to C.

This is the original program in BBC Basic. It is just a fast fill method for an ellipse. I know I could just use the circle command for this but this is the shortest example I could find that uses PLOT85.

I think the MODE1, VDU23, VDU29 and COLOUR commands are to do with setting up the graphical mode. The plotting commands look like MOVE, DRAW and PLOT85. It looks like a relative coordinate system like QB since there are two consecutive MOVE and PLOT85. I've tried

1) Changing the MOVE/PLOT85 to LINE/PSET
2) Changing the PLOT85/PLOT85 to LINE/PSET
3) Changing the MOVE/DRAW to LINE/PSET

It sort of works but it would really help to know what DRAW and PLOT85 is really meant to do.

10 REM Fast Ellipse Fill
20 MODE1
30 VDU23,1,0;0;0;0;
40 VDU29,640;512;
50 COLOUR1:G COL0,1
70 INPUT "X RADIUS =",RX
80 INPUT "Y RADIUS =",RY
100 XY%=RX/SQR(2): YX%=RY/SQR(2)
110 MOVE XY%,YX%: MOVE XY%,-YX%
120 PLOT85,-XY%,YX%: PLOT85,-XY%,-YX%
130 FOR X%=XY%+4 TO RX STEP 4
140 Y5=RY*SQR(1-(X%/RX)^2)
150 MOVE X%,Y%: DRAW X%,-Y%
160 MOVE -X%,Y%: DRAW -X%,-Y%
170 NEXT X%
180 FOR Y%=YX%+4 TO RY STEP 4
190 X%=RX*SQR(1-(Y%/RY)^2
200 MOVE X%,Y%: DRAW -X%,Y%
210 MOVE X%,-Y%: DRAW -X%,-Y%
220 NEXT Y%
260 END

 
Thanks - that was just what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top