Category : Miscellaneous Language Source Code
Archive   : LADYBUG.ZIP
Filename : DEMO2.BUG

 
Output of file : DEMO2.BUG contained in archive : LADYBUG.ZIP
to "circle :X :Y :RADIUS
LOCAL "AMT
MAKE "PI 3.14159
MAKE "AMT :RADIUS * :PI / 180
PU SETXY :X :Y SETX XCOR - :RADIUS
SETH 0 PD
REPEAT 360 [FD :AMT RT 1]
PU SETXY :X :Y
end

to "rec ๐Ÿ˜€
REPEAT 2 [FD ๐Ÿ˜€ RT 90 FD 2 * ๐Ÿ˜€ RT 90]
end

to "anyshape :R ๐Ÿ˜€
REPEAT :R [FD ๐Ÿ˜€ RT 360 / :R]
end

to "cr
PU SETXY -115 -65
end

to "triangle :S
REPEAT 3 [FD :S RT 120]
end

to "square :S
REPEAT 4 [FD :S RT 90]
end

to "house :S
PU HOME PD SQUARE :S FD :S RT 30 TRIANGLE :S CR
end

to "countdown :X
IF :X = 0 [PR CHAR 32 STOP]
PR :X
WAIT 2
MAKE "X :X - 1
COUNTDOWN :X
end

to "blastoff
PU SETXY 8 0 SETH 0 PD
BK 10 FD 10
PU SETX 2 PD
BK 20 FD 20
PU SETX -12 PD
BK 20 FD 20
PU SETX -18 PD
BK 10 FD 10
PU SETXY 8 -10 SETH 135 PD FD 20 SETH 90 FD 20 SETH 45 FD 20
PU SETXY -18 -10 SETH 225 PD FD 20 SETH 270 FD 20 SETH 315 FD 20
PU SETXY 2 -20 SETH 135 PD FD 10 SETH 90 FD 20 SETH 45 FD 10
PU SETXY -12 -20 SETH 225 PD FD 10 SETH 270 FD 20 SETH 45 FD 10
CLEARWS
LOAD "DEMO3
START
end

to "polygon :REP :SIZE
REPEAT :REP [FD :SIZE RT 360 / :REP]
end

to "cont
PR [Can you find the "Rule of 360"] WAIT 8
PR [in this series of polygons?]
WAIT 5
PR [You're right, it's the Polygon procedure.] WAIT 8
PR [Let's use these shapes to make a drawing.]
WAIT 5 CS CT
end

to "polygons
JE REPEAT 3 [JL]
JP PR [Here's a procedure to draw]
JL JP PR [any polygon...] WAIT 10
JL JL PR [TO POLYGON :REP :SIZE]
PR [REPEAT :REP [ FD: SIZE RT 360 / :REP]
PR [END]
JL JL JP PR [Take a close look at how]
JL JP PR [the variable :rep is used.]
REPEAT 4 [JL] WAIT 5
JC PU SETX -80 PD
MAKE "REP 3
LABEL
end

to "label
IF :REP > 15 [CONT STOP]
PR SE [POLYGON] :REP
POLYGON :REP 20
WAIT 5
MAKE "REP :REP + 1
LABEL
end

to "start
JE JP PR [With Logo, you define]
JP PR [your own procedures...]
JP PR [your own commands.]
JL PR [TO TRIANGLE :SIZE]
PR [REPEAT 3 [FD :SIZE RT 120]]
PR [END]
JL PR [TO SQUARE :SIZE]
PR [REPEAT 4 [FD :SIZE RT 90]]
PR [END]
JL JP PR [These procedures let you break]
JP PR [a problem into "workable chunks."]
JL PR [TO HOUSE :SIZE]
PR [SQUARE :SIZE FD :SIZE RT 30]
PR [TRIANGLE :SIZE]
PR [END]
JL JP PR [You make Logo do what you]
JP PR [want it to do - - explore math,]
JP PR [geometry, logic, language!]
WAIT 20
JL PR [Here's some graphic tools we'll use]
PR [to create other drawings.]
WAIT 5
DRAW
JB
end

to "jb
SQUARE 100 PR "SQUARE WAIT 5
CS TRIANGLE 100 PR "TRIANGLE WAIT 5
CS REC 100 PR "RECTANGLE WAIT 5
HT CS CIRCLE 0 0 100 PR "CIRCLE WAIT 5
POLYGONS
SPACESHIP
CLEARWS
LOAD "DEMO3
START
end

to "je
CT CURSOR 1 1
end

to "JC
BG 0 CS CT
end

to "JL
PR "
end

to "JP
REPEAT 3 [JI]
end

to "JI
TYPE CHAR 32
end

to "WAIT :T
IF :T = 0 [STOP]
WAIT :T - 1
end

to "spaceship
SQUARE 10
PU LT 90 FD 20 RT 90 PD
SQUARE 10
FD 10 SQUARE 30
LT 60 TRIANGLE 30
RT 60 FD 30 SQUARE 30
FD 30 RT 30 TRIANGLE 30
RT 60 FD 30
RT 90 FD 30 LT 60
TRIANGLE 30
HT
COUNTDOWN 10
BLASTOFF
end


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : LADYBUG.ZIP
Filename : DEMO2.BUG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! ๐Ÿ˜€ I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/