Post by Admin on Jan 16, 2020 4:29:29 GMT
The generated program is the PROCt("",n) commands.
They were created with the TURTLE IDE version 1 supplied on this board
Bellow END there is the library that is for attaching to turtle images you may create
The point of using the TURTLE IDE is that you can easily rotate created images once your designed images are completed and generated
Try out this simple program:
They were created with the TURTLE IDE version 1 supplied on this board
Bellow END there is the library that is for attaching to turtle images you may create
The point of using the TURTLE IDE is that you can easily rotate created images once your designed images are completed and generated
Try out this simple program:
MODE 8
PROCt("m",500)
PROCt("d",1)
PROCt("c",15)
PROCt("f",100)
PROCt("l",90)
PROCt("f",100)
PROCt("l",90)
PROCt("f",100)
PROCt("l",90)
PROCt("f",100)
PROCt("u",1)
PROCt("l",90)
PROCt("f",10)
PROCt("l",90)
PROCt("f",10)
PROCt("p",1)
END
DEFPROCt(mess$,amt%)
PRIVATE angle,x%,y%,pen$,dracol%,sz%
IF sz%<1 THEN sz=1
GCOL dracol%
IF pen$="" THEN pen$="down"
IF mess$= "r" THEN angle=angle - amt%
IF mess$= "l" THEN angle=angle + amt%
IF mess$= "f" THEN VDU 23,23,sz%|:PROC_turtle(amt%,angle,pen$,x%,y%)
IF mess$= "u" THEN pen$="up"
IF mess$= "d" THEN pen$="down"
IF mess$= "p" THEN FILL x%,y%
IF mess$= "c" THEN IF amt%=16 THEN amt%=0
IF mess$= "c" THEN GCOL amt%:dracol%=amt%
IF mess$= "s" THEN sz%=amt%
VDU 23,23,sz%|
IF mess$= "m" THEN
x%=amt%:y%=amt%
pen$="move"
ENDIF
PROC_turtle(0,angle,pen$,x%,y%)
ENDPROC
DEFPROC_turtle(coun%,angle,pen$,RETURN x%,RETURN y%)
PRIVATE sx%,sy%
IF pen$="move" THEN sx%=x%:sy%=y%
IF pen$="up" OR pen$="down" THEN
sx%+=coun%*COS(RAD(angle))
sy%+=coun%*SIN(RAD(angle))
IF pen$="down" THEN LINE x%,y%,sx%,sy%
ENDIF
x%=sx%:y%=sy%
ENDPROC