03-12-2023, 01:02 PM
(03-11-2023, 10:22 AM)johnno1956 Wrote: Well... THAT was embarrassing!! Wrong source AND wrong forum! That was a conversion that was supposed to go on the RCBasic forum... Obviously my keyboard was in motion before the brain was engaged... *sigh*
I had a couple of minutes to spare... Here is the N7 version of the program. Spinning or not? An illusion or not?
Code:visible xmax = 600
visible ymax = 600
set window "Spinning? Yes or No?", xmax, ymax
set redraw off
' Charlie Veniot's BASIC Anywhere Machine mod of the program by B+
' https://basicanywheremachine.neocities.org/sample_programs/BAM_SamplePrograms?page=spinning_dots_illusion
visible pi = 3.141592654
visible roundAroundLmt = 3
visible x0 = xmax / 2
visible y0 = ymax / 2
visible a24 = pi * (2 / 24)
visible r = 240
visible loopcnt = 0
visible tinyCircleCnt = 0
do
if loopcnt < roundAroundLmt
tinyCircleCnt = 11
endif
if loopcnt = roundAroundLmt
tinyCircleCnt = 0
endif
if loopcnt > roundAroundLmt
if tinyCircleCnt < 11
tinyCircleCnt = tinyCircleCnt + 1
endif
endif
for a = 0 to pi * 2 step pi / 180
set color 82, 82, 82
draw ellipse x0, y0, 251, 251, true
for i = 0 to tinyCircleCnt
if loopcnt > roundAroundLmt - 1
a24i = a24 * i
xs = x0 + (r * cos(a24i))
ys = y0 + (r * sin(a24i))
xe = x0 + (r * cos(a24i + pi))
ye = y0 + (r * sin(a24i + pi))
set color 192, 192, 192
draw line xs, ys, xe, ye
endif
cv1 = cos(a + (pi * (i/12)))
x = x0 + (cv1 * r * cos(a24 * i))
y = y0 + (cv1 * r * sin(a24 * i))
set color 255, 255, 255
draw ellipse x, y, 10, 10, true
next
'wait(4)
if keydown(KEY_ESCAPE, true) = 1
wait 999
end
endif
fwait 60
redraw
next
loopcnt = (loopcnt % 15) + 1
until keydown(KEY_ESCAPE, true)
Enjoy...
J
WITCHCRAFT!