Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:21 19 Apr 2024 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 : Bubble Universe

Author Message
Marcus J
Newbie

Joined: 02/12/2022
Location: United Kingdom
Posts: 1
Posted: 05:55pm 03 Dec 2022
Copy link to clipboard 
Print this post

Hi Folks

My first post on the forum.
I'm a retro computer collector mending BBCs and Amiga 500s mostly.
A couple of years ago I got attracted to the idea of building a CM2.
So, got a board and waveshare controller and built one... turns out that was a good move sadly.

Anyway a very interest piece of code is currently being discussed over on stardot forum.
So, Ive done a quick conversion for the CM2.
I'm not a great programmer so it can probably be improved upon.

10 n=200
20 r=pi*2/235
40 x=0:y=0:v=0:t=0.22
50 s=120
60 do
70 cls
80 for i=0 to n step 5
90 for j=0 to n step 5
100 u=sin(i+v) + sin(r*i+x)
110 v=cos(i+v) + cos(r*i+x)
120 x=u+t
150 c=i+j
180 pixel (u*s)+400,(v*s)+300,255*c
190 next j
200 next i
210 t=t+0.025
220 loop until 0


Marcus
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8566
Posted: 07:18pm 03 Dec 2022
Copy link to clipboard 
Print this post

Hi Marcus

Welcome to the forum. There is also a thread about this here where people have been playing with the code in interesting ways
Edited 2022-12-04 05:19 by matherp
 
Print this page


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

© JAQ Software 2024