Instructions:
To use turtle library:EXEC "PRG1:TURTLE.LIB"To use AA line library:
EXEC "PRG1:ALINE.LIB"More documentation on usage is included in the respective libraries.
Root / Submissions / [.]
EXEC "PRG1:TURTLE.LIB"To use AA line library:
EXEC "PRG1:ALINE.LIB"More documentation on usage is included in the respective libraries.
'Draw a red anti-aliased line ALINE 100,100,250,200,#RED 'Erase it ELINE 100,100,250,200,0
EXEC "PRG1:ALINE.LIB" 'Try making these smaller to generate shorter lines W=400 H=240 ACLS AVG=0 NUM=0 WHILE TRUE LINES=0 FRAME=MAINCNT WHILE MAINCNT==FRAME X0=RND(W):Y0=RND(H) X1=RND(W):Y1=RND(H) C=RND(&HFFFFFF) OR &HFF000000 'Try replacing ALINE with ELINE or GLINE ALINE X0,Y0,X1,Y1,C INC LINES WEND AVG=(NUM*AVG+LINES)/(NUM+1) INC NUM CLS COLOR #TWHITE,#TBLACK ?AVG COLOR #TWHITE,0 WENDThis generates random lines on the screen and prints how many lines on average are drawn per frame. On my New 3DS:
RANDOMIZE 0, whatever 'should be a constant tooEDIT lol I said "inaccurate" instead of "accurate", making it a double negative oof
I know that I can't take no more It ain't no lie, I wanna see you out that door Baby, bye, bye, bye...It's interesting that you mention probability. "using probability..." the tests will measure the AVERAGE drawing time. 'splaining is now illegal.
GPSET X,Y,C,#G_ALPHA2There's also a nice little demo program if you run MAIN.PRG.