Author Topic: Pi roll  (Read 1383 times)

Galileo

  • Guest
Pi roll
« on: February 04, 2017, 12:20:33 PM »
Code: [Select]
// pi roll.bas SmallBASIC 0.12.6 [B+=MGA] 2016-05-21
// Adapted to Yabasic 2.78.0 by Galileo 02/2017

pie$="    3.141592653589793238462643383279502884197169399375105820974944592307816406286"
xmax = 640 : ymax = 640
open window xmax,ymax
backcolor 0,0,0
clear window
cx = xmax / 2 : cy = ymax / 2 : pIndex = 1 : n = 50
while((r * 6) < cy - 30) //the screen scolls when print near bottom
  n = n + 10
  pIndex = pIndex + 1
  r = n ^ .6
  a = a + .33
  x = cx - r * 6 * cos(a)
  y = cy - r * 6 * sin(a)
  size$=str$(80 - 1.45 * r)
  col=(val(size$))*4
  color col,col,col
  text x, y, mid$(pie$, pIndex, 1),"swiss"+size$
wend

B+

  • Guest
Re: Pi roll
« Reply #1 on: February 04, 2017, 10:06:26 PM »
Well I hope nobody thinks I made this colorless! But I did have problem with overlapping background color of letters... ;)

BTW, this was inspired by .... hmm... what shall we call him? Menn, Mennonite, BestOfQBasic, makeurownproglang, figOSdev...
« Last Edit: February 04, 2017, 10:08:04 PM by B+ »