The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

FOOD FIGHT! by Llyr2002-06-03 12:42:46
  And/or clutter fight. by Llyr2002-06-03 12:46:17
    Debug this by huitzilopochtli2002-06-03 12:51:23
      Aack! by Llyr2002-06-03 12:52:40
        please dony lynch me .. it, infact, is by huitzilopochtli2002-06-03 12:54:28
          *ducks QBASIC, apologizes for wrong lang.* by Llyr2002-06-03 12:56:34
            Attack by huitzilopochtli 2002-06-03 12:57:48
HAVE THIS (it even works)

SCREEN 12
RANDOMIZE TIMER

'Zadvanje konstanti
CONST m = 20 'Povecanje def:20
CONST b = 10 'Gustoca mreze (za b = 20 korak je jedna jedinica def:10

CONST h = m * .8 'Donja i gornja granica iscrtavanja (po X i Y osi) def:m * 0.8
CONST s = .1 'Korak iscrtavanja (preciznost) def:0.05
CONST i = .1 'Tolerancija (debljina linije) def:0.01

'INPUT "Unesite jednadzbu/nejednadzbu (za pomoc napisite help", jednadzba$


'Crtanje mreze
FOR n = 0 TO 640 STEP b
LINE (n, 0)-(n, 480), 8
LINE (0, n)-(640, n), 8
NEXT n
LINE (0, 0)-(120, 20), 4, BF

'Crtanje osi i ispisivanje jedinica
LINE (320, 0)-(320, 480), 4 'Y os
LINE (0, 240)-(640, 240), 4 'X os
LOCATE 1, 1: PRINT "Jedinica: "; b / 20


znak$ = "=" 'Podrzava samo >,<,=,<>
a = RND 'Slucajni broj (0-1)
'Crtanje funkcije
FOR x = -h TO h STEP s 'Pomak po X
FOR y = -h TO h STEP s 'Pomak po Y

'Ljeva strana jednadzbe
l = (SIN(x * .01 - y) * 3 + COS(x * .3) * 5) * SIN(y) ^ 2

'Desna strana jednadzbe
d = SIN(y + x) * COS(y + x)

IF znak$ = "<" AND l < d - i AND l < d + i THEN xcrt = x: ycrt = y
IF znak$ = ">" AND l > d - i AND l > d + i THEN xcrt = x: ycrt = y
IF znak$ = "=" AND l > d - i AND l < d + i THEN xcrt = x: ycrt = y
IF znak$ = "<>" AND l < d - i AND l > d + i THEN xcrt = x: ycrt = y

IF xcrt * m + 320 < 120 AND -ycrt * m + 240 < 20 THEN xcrt = 0: ycrt = 0 'Granicnik (da ne crta preko teksta

PSET (x * m + 320, 479), 14 'Crta na dnu ekrana koja pokazuje do kud je program izracunao
PSET (xcrt * m + 320, -ycrt * m + 240) 'Tocke od kojih je sastavljena funkcija

IF INKEY$ <> "" GOTO 1 'U slucaju pritiska bilo koje tipke izlazi iz petlje i prebacuje na zavrsnnu poruku
NEXT y
NEXT x



'Zavrsna poruke (titrajuci "PRESS ANY KEY")
1 w = .001
DO
LOCATE 2, 1: PRINT " "

tim = TIMER
DO
LOOP UNTIL TIMER - tim > w

LOCATE 2, 1: PRINT "PRESS ANY KEY"

tim = TIMER
DO
LOOP UNTIL TIMER - tim > w
LOOP WHILE INKEY$ = ""

[ Reply ]
              Aaaaa! Too much QBASIC/Croatian! by Llyr2002-06-03 13:00:22
                Crawls out by huitzilopochtli2002-06-03 13:03:40
                  Wouldn't that by CartaMusica2002-06-03 13:08:58
                    Me whatchfull is by huitzilopochtli2002-06-03 13:16:08
                  okay, truce :) (n/t) by Llyr2002-06-03 13:11:08
                    *evil grinning time* Hihihi (n/t) by huitzilopochtli2002-06-03 13:18:30
                      Sneak attack!!! by saxguy022002-06-03 14:59:06
                        Aagh! Binary! by Llyr2002-06-03 15:05:03
                          10101010111111100000! by saxguy022002-06-03 15:08:56

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)