Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:16 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Archimedes Spiral for PicoMite

Author Message
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 05:23pm 22 Apr 2022
Copy link to clipboard 
Print this post

Here's a program I dug up from Analog Computing magazine #7 from 1982.
While the program is short, it took nearly 3 hours to complete on an Atari 400/800.
The PicoMiteVGA version shown below runs much faster.


' Archimedes Spiral from Analog Computing Mag #7
MODE 2
CLS
xp=144:xr=4.71238985:xf=xr/xp
For zi=-64 To 64
 zt=zi*2.25:z5=zt*zt
 xl=Int(Sqr(20736-z5)+0.5)
 For xi=0-xl To xl
   xt=Sqr(xi*xi+z5)*xf
   yy=(Sin(xt)+Sin(xt*3)*0.4)*56
   x1=xi+zi+160:y1=90-yy+zi
   Pixel x1,y1,RGB(green)
   Line x1,y1+1,x1,192,,RGB(black)
 Next xi
Next zi
 
Michal
Senior Member

Joined: 02/02/2022
Location: Poland
Posts: 125
Posted: 06:30pm 22 Apr 2022
Copy link to clipboard 
Print this post

With PicoMite and Waveshare 3.5 inches:
https://www.waveshare.com/pico-restouch-lcd-3.5.htm
16 sec

Micha?
Edited 2022-04-23 04:31 by Michal
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 671
Posted: 06:35pm 22 Apr 2022
Copy link to clipboard 
Print this post

Wow!!
For me it took only 7 seconds, but I overclocked the CPU.
Thank you for this! Tested it out and it is really impressive!

Greetings
Daniel
Edited 2022-04-23 04:38 by Amnesie
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 07:21pm 22 Apr 2022
Copy link to clipboard 
Print this post

17 seconds on the PicoMiteVGA
If you change to Mode 1 it only takes 14 seconds, but the Archimedes Spiral only occupies 1/4 of the screen
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 07:21pm 22 Apr 2022
Copy link to clipboard 
Print this post

(duplicate post deleted)
Edited 2022-04-23 05:22 by al18
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 08:08pm 22 Apr 2022
Copy link to clipboard 
Print this post



nice graph...
298ms on MMB4W under WINE on linux (between 200ms and 300ms depending the CPU load)
Edited 2022-04-23 06:14 by Volhout
PicomiteVGA PETSCII ROBOTS
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 09:08pm 22 Apr 2022
Copy link to clipboard 
Print this post

For a transparent version of the spiral, change the line command to a comment
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 05:30am 23 Apr 2022
Copy link to clipboard 
Print this post

  al18 said  Here's a program I dug up from Analog Computing magazine #7 from 1982.
While the program is short, it took nearly 3 hours to complete on an Atari 400/800.
The PicoMiteVGA version shown below runs much faster.


' Archimedes Spiral from Analog Computing Mag #7
MODE 2
CLS
xp=144:xr=4.71238985:xf=xr/xp
For zi=-64 To 64
 zt=zi*2.25:z5=zt*zt
 xl=Int(Sqr(20736-z5)+0.5)
 For xi=0-xl To xl
   xt=Sqr(xi*xi+z5)*xf
   yy=(Sin(xt)+Sin(xt*3)*0.4)*56
   x1=xi+zi+160:y1=90-yy+zi
   Pixel x1,y1,RGB(green)
   Line x1,y1+1,x1,192,,RGB(black)
 Next xi
Next zi


The original program was used in Compute! Magazine, March 1981 in an ad for the MTU graphics add-on for Commodore PET. Maybe Bachand got it from there.



Edited 2022-04-23 15:54 by toml_12953
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 02:41pm 23 Apr 2022
Copy link to clipboard 
Print this post

I see the program in Analog was changed slightly from the one in the MTU ad. I can’t believe MTU sold many of those graphics boards for $495, considering in 1981 you could have bought a 16K Atari 800 that included 320 x 192 graphics and graphics commands built into Atari Basic for $200 more. Both machines had a 6502 CPU.
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 03:25pm 23 Apr 2022
Copy link to clipboard 
Print this post

  al18 said  ...... I can’t believe MTU sold many of those graphics boards for $495, considering in 1981 you could have bought a 16K Atari 800 that included 320 x 192 graphics and graphics commands built into Atari Basic for $200 more. Both machines had a 6502 CPU.

But for $200 more all you'd have is a Home Video Game, and for Just a few bucks less you could have had a Commodore Vic 20 plus a 32k Memory expander, or in 1982 you could have had a Commodore 64, but no one was silly enough to waste 10 times as much on the TI99/4a until 1986 when TI was GIVING THEM AWAY FOR $300 WITH A $350 REBATE :)
I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 03:51pm 23 Apr 2022
Copy link to clipboard 
Print this post

  Rickard5 said  no one was silly enough to waste 10 times as much on the TI99/4a until 1986 when TI was GIVING THEM AWAY FOR $300 WITH A $350 REBATE :)


I waited until they not only gave you $50.00 for buying one but threw in a Speech Synthesizer! The TI actually wasn't a bad machine but both BASICs (internal and add-in Extended cartridge) weren't written in native 9900 code. They ran an interpreted code called GPL (Graphics Programming Language) Can you imagine running an interpreter that's executed using another interpreter? SLOW!! Microsoft wrote TI Extended BASIC but had to follow the TI syntax guidelines when doing so. That's why it's not very compatible with other versions of MS BASIC.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 04:44pm 23 Apr 2022
Copy link to clipboard 
Print this post

I messed with constants a bit to get this, which centers the image on screen and adjusts according to resolution:
' Archimedes Spiral from Analog Computing Mag #7
'MODE 2
CLS
radius = MM.HRES/10 '64
rfact = (radius*2.25)^2
xp = radius * 9/4 '144
xr = 1.5 * pi
xf = xr/xp
For zi = -radius To radius
 zt = zi*2.25
 z5 = zt*zt
 xl = Int(Sqr(rfact-z5)+0.5)
 For xi = -xl To xl
   xt = Sqr(xi*xi+z5) * xf
   yy = (Sin(xt) + Sin(xt*3)*0.4) * MM.VRES/8
   x1 = xi+zi+MM.HRES/2
   y1 = MM.VRES/2-yy+zi
   Pixel x1,y1,RGB(green)
   Line x1,y1+1,x1,MM.VRES,,RGB(black)
 Next xi
Next zi

do : loop until inkey$ <> ""

How happy, and patient, we were 40 odd years ago with our ~1 MHz computers...
Visit Vegipete's *Mite Library for cool programs.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 05:05pm 23 Apr 2022
Copy link to clipboard 
Print this post

The Sinclair Speccy is 40 years old today. :)

When it was announced several people at our Nascom user group were trying to find out if it would be a way to get colour on a Nascom-2. Existing colour boards for the Nascom-2 and 80-BUS cost a fortune.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 228
Posted: 05:42pm 23 Apr 2022
Copy link to clipboard 
Print this post

I never heard of the Nascom before. I don’t think it was popular on this side of the pond. The Sinclair computers WERE popular over here - probably due to the low cost.

Speaking of video boards for Z-80 machines, I bumped into this the other day https://z80kits.com/shop/rc2014-pi-pico-vga-terminal/ - a VGA Terminal board using the Pico to generate video.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 06:10pm 23 Apr 2022
Copy link to clipboard 
Print this post

  vegipete said  ...
How happy, and patient, we were 40 odd years ago with our ~1 MHz computers...


I often think so too. And we knew every byte by his first name...
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 08:12pm 23 Apr 2022
Copy link to clipboard 
Print this post

mmm.... many happy hours entering hex pairs into RAM using a machine code monitor. Then hope that it manages to save to tape - and that it will read back too!

Assembler? What's that? I couldn't afford Zeap and it seemed ages before you could get BASIC to run on a Nascom-1. Oddly enough, that RC2014 setup uses a version of BASIC that was modified by Grant Searle from the Nascom ROM BASIC (Microsoft BASIC 4.07).
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025