Author Topic: Archimedes spiral  (Read 3048 times)

Aurel

  • Guest
Archimedes spiral
« on: September 17, 2019, 07:13:39 AM »
in LogicBasic:

Code: [Select]
Var T Decimal, A Decimal, R Decimal, Xs Decimal, Ys Decimal
Var X0 Decimal, Y0 Decimal, X1 Decimal, Y1 Decimal

Window Res = 150, 250

T = 0.7 'starting point of spiral
A = 0.03 'increment size - spiral trail width
Xs = 125; Ys = 75
X0 = 0; Y0 = 0 'start point of line

While 1 = 1
  R = A * T
 
  X1 = R * Cos(T) * 50
  Y1 = R * Sin(T) * 50
  Straight Ys + Y0, Xs + X0, Ys + Y1, Xs + X1, Black
  X0 = X1; Y0 = Y1
  T = T + A
  Wait Events
Loop

Galileo

  • Guest
Re: Archimedes spiral
« Reply #1 on: September 17, 2019, 09:20:36 AM »
Code: [Select]
// Ported from ZX81 Sinclair BASIC to Yabasic by Galileo, 10/2018

5 OPEN WINDOW 320, 200 : WINDOW ORIGIN "CC"
10 LET A=1.5
20 LET B=0.7
30 FOR T=0 TO 30*PI STEP 0.05
40 LET R=A+B*T
50 LINE TO R*COS(T),R*SIN(T)
60 NEXT T

Galileo

  • Guest
Re: Archimedes spiral
« Reply #2 on: September 17, 2019, 09:23:46 AM »
Text mode in iBASIC

Code: [Select]
1 REM iBASIC version 09/2019
5 screen window mode 45,60
7 window title "Espiral arquimediana"
10 LET A=1.5
20 LET B=0.7
30 FOR T=0 TO 7*PI STEP 0.05
40 LET R=A+B*T
45 let x = R*COS(T)+32 : let y = R*SIN(T)+22
50 locate y,x : print "*"
60 NEXT T
70 input "",a$

B+

  • Guest
Re: Archimedes spiral
« Reply #3 on: September 17, 2019, 04:43:05 PM »
I made a little modification of Archimedes Spiral:
« Last Edit: September 17, 2019, 04:54:47 PM by B+ »

Aurel

  • Guest
Re: Archimedes spiral
« Reply #4 on: September 18, 2019, 09:43:44 AM »
Nice one Mark and Galileo too  :)
I just found it on LogicBasic forum..
hmm this LogicBasic seems very nice dialect...

B+

  • Guest
Re: Archimedes spiral
« Reply #5 on: September 18, 2019, 03:29:34 PM »
Hey Aurel! Looks like this LogicBasic is just getting started:

Aurel

  • Guest
Re: Archimedes spiral
« Reply #6 on: September 18, 2019, 05:41:03 PM »
Maybe 1-2 years old ..i think
I never download it and try..