draw: gwbasic vs qbasic vs fb

by mennonite (no login)

 

the code:

10 SCREEN 12 ' this is public domain
CLS ' 2006 mennonite
PALETTE 6, 256 ^ 0 * 58 + 256 ^ 1 * 58 + 256 ^ 2 * 10
FOR q = 1 TO 15
a = INT(RND * 10 + 1) * 10
IF INT(RND * 2) THEN b = -1 ELSE b = 1
xf = INT(RND * 140)
yf = INT(RND * 440 + 20)
FOR n = 1 TO 360 * 20 STEP 4
IF n = 1 THEN y = 0 ELSE y = y + 1 * b
DRAW "bm" + STR$(INT(n / 17) + 20 + xf) + "," + STR$(20 + INT(y / a) + yf)
DRAW "ta" + STR$(n MOD 360) + "bu8"
FOR x = 0 TO 1
CIRCLE (POINT(0), POINT(1)), 3, 6
CIRCLE (POINT(0) + x, POINT(1)), 4, 14
NEXT x
DRAW "ta" + STR$(n MOD 360) + "bd8"
NEXT n
NEXT q
IF INKEY$ = "" THEN 10

the screen: http://img134.imageshack.us/img134/4578/fusilliwv7.png

the gwbasic version: (added line numbers, ' on palette, changed screen 12 to 9)

10 SCREEN 9 ' this is public domain
20 CLS ' 2008 mennonite
30 rem PALETTE 6, 256 ^ 0 * 58 + 256 ^ 1 * 58 + 256 ^ 2 * 10
40 FOR q = 1 TO 15
50 a = INT(RND * 10 + 1) * 10
60 IF INT(RND * 2) THEN b = -1 ELSE b = 1
70 xf = INT(RND * 140)
80 yf = INT(RND * 440 + 20)
90 FOR n = 1 TO 360 * 20 STEP 4
100 IF n = 1 THEN y = 0 ELSE y = y + 1 * b
110 DRAW "bm" + STR$(INT(n / 17) + 20 + xf) + "," + STR$(20 + INT(y / a) + yf)
120 DRAW "ta" + STR$(n MOD 360) + "bu8"
130 FOR x = 0 TO 1
140 CIRCLE (POINT(0), POINT(1)), 3, 6
150 CIRCLE (POINT(0) + x, POINT(1)), 4, 14
160 NEXT x
170 DRAW "ta" + STR$(n MOD 360) + "bd8"
180 NEXT n
190 NEXT q
200 IF INKEY$ = "" THEN 10

Posted on Jan 3, 2008, 11:43 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
That's pretty weird... on Jan 3
 you should get the same size and shape each timemennonite on Jan 3
  more about using drawmennonite on Jan 3
   Couldn't you draw a simple circle using SIN and COS on Jan 3
    got a public domain routine that does it?mennonite on Jan 3
     * LOL@publicdomain on Jan 3
     Here's a complete function for you on Jan 3

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement