Pentagram

Post Reply
User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Pentagram

Post 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 1317 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Pentagram

Post 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.
The only thing that gets me down is gravity...

Post Reply