Page 1 of 1

Pentagram

Posted: Thu Aug 17, 2017 9:53 am
by Mr. Kibernetik
This program draws a star with color fill and outline:

Code: Select all

mx,my = #.scrsize()
xc = mx/2
yc = my/2
mr = #.min(mx,my)/3
#.angle(#.degrees)
#.drawcolor(1,0,0)
#.drawsize(10)
> r, mr..0,-1
  #.drawline(xc,yc-r,xc,yc-r)
  > a, 54..630,144
    #.drawline(r*#.cos(a)+xc,r*#.sin(a)+yc)
  <
  #.drawcolor(1,1,0)
  #.drawsize(1)
<
star.PNG
star.PNG (18.4 KiB) Viewed 1315 times

Re: Pentagram

Posted: Mon Aug 21, 2017 5:50 pm
by rbytes
This code runs fine after running it through the My Notes app to restore the line feeds. I hope there is a way that you can get the SPL editor to substitute and reinsert the line feed characters that are missing. I'm not sure if they are CHR$(10),CHR$(13) or both.

It would be much more efficient to be able to copy Forum code from Edge and paste it right into the SPL editor without all the lines being squished into one line.

Thanks

It is good to know that the syntax problems were not in my hardware or software. :D
SPL is a very cool program and amazingly fast.