Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Kernel Bob
Kernel Bob
@kbob@chaos.social  路  activity timestamp last week

I'm starting a new "build thread" (not building anything except pixels, but they're good pixels).

This is the "Bubble Universe" graphics hack. I'm going to try to have some fun with it. Follow or ignore hashtag #BubbleUniverse for more.

馃У 1/N

#BubbleUniverse #BuildThread #GenerativeArt

Your browser does not support the video tag.
This video cannot be previewed
Open original
40,000 colored particles swarm across a black background in a roughly circular area, leaving a complexly textured, ever shifting surface.
  • Copy link
  • Flag this post
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp last week

History. As best I can tell, the bubble universe was invented by Twitter user @yuruyurau in 2020 as a very terse Processing.py sketch and first published in this tweet.

https://xcancel.com/yuruyurau/status/1226846058728177665

Edit: add screen capture of tweet.

馃У 2/N

#BubbleUniverse

A tweet. Source code followed by an animated image of the bubble universe.

銈yuruyurau
10 Feb 2020
W=540;N=200;x,y,t=0,0,0
def setup():size(W,W);noStroke()
def draw():global t;clear();[F(i,j)for i in range(N)for j in range(N)];t+=.1
def F(i,c):global x,y;r=TAU/N;u=sin(i+y)+sin(r*i+x);v=cos(i+y)+cos(r*i+x);x=u+t;y=v;fill(i,c,99);circle(u*N/2+W/2,y*N/2+W/2,2) #銇ゃ伓銈勩亶Processing
A tweet. Source code followed by an animated image of the bubble universe. 銈yuruyurau 10 Feb 2020 W=540;N=200;x,y,t=0,0,0 def setup():size(W,W);noStroke() def draw():global t;clear();[F(i,j)for i in range(N)for j in range(N)];t+=.1 def F(i,c):global x,y;r=TAU/N;u=sin(i+y)+sin(r*i+x);v=cos(i+y)+cos(r*i+x);x=u+t;y=v;fill(i,c,99);circle(u*N/2+W/2,y*N/2+W/2,2) #銇ゃ伓銈勩亶Processing
A tweet. Source code followed by an animated image of the bubble universe. 銈yuruyurau 10 Feb 2020 W=540;N=200;x,y,t=0,0,0 def setup():size(W,W);noStroke() def draw():global t;clear();[F(i,j)for i in range(N)for j in range(N)];t+=.1 def F(i,c):global x,y;r=TAU/N;u=sin(i+y)+sin(r*i+x);v=cos(i+y)+cos(r*i+x);x=u+t;y=v;fill(i,c,99);circle(u*N/2+W/2,y*N/2+W/2,2) #銇ゃ伓銈勩亶Processing
  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp last week

Paul Dunn ( @zxdunny ) followed a few months later with an even terser BASIC version and a demo on YouTube.

https://www.youtube.com/watch?v=G5aOBh7qQe8

馃У 3/N

#BubbleUniverse

  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp last week

@larsbrinkhoff got into the act with Javascript and PDP-10 assembler versions. The sources are on Github, and a video of the PDP-10 is on YouTube.

(Lars, what display are you emulating on the '10?)

https://github.com/larsbrinkhoff/bubble-universe

https://www.youtube.com/watch?v=hIU7iYWZWSY

馃У 4/N

#BubbleUniverse #Javascript #PDP10

GitHub

GitHub - larsbrinkhoff/bubble-universe: "Bubble Universe" display hack

"Bubble Universe" display hack. Contribute to larsbrinkhoff/bubble-universe development by creating an account on GitHub.
  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp last week

Several others have implemented it; it seems to be popular with the retrocomputing crowd. I found out about it when @PaulaMaddox ported it to her FPGA 6502 simulator a few days ago.

馃У 5/N

#BubbleUniverse #FPGA

https://mastodon.social/@PaulaMaddox/115984089839706205

  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp last week

And now I've implemented it. But instead of porting it to the slowest most decrepit retromachine I can find, I'm going the other direction: What kind of visual effects can I achieve if I throw a decent GPU at it?

The video above in 馃У 1 is a screen capture from my Javascript + WebGPU implementation. It's running at 20 FPS, using about 5% of the CPU and 3% of the GPU. More to come...

馃У 6/N

#BubbleUniverse #Javascript #WebGPU

  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp 4 days ago

I wrote another one! I ported my Javascript + WebGPU implementation to Python + wgpu-py, and now I have a desktop app.

And I pushed it to Github. "Share and enjoy!"

https://github.com/kbob/bubble-universe

馃У 7/N

#BubbleUniverse #Javascript #WebGPU #wgpu

GitHub

GitHub - kbob/bubble-universe: The infamous Bubble Universe graphics hack, using WebGPU

The infamous Bubble Universe graphics hack, using WebGPU - kbob/bubble-universe
  • Copy link
  • Flag this comment
  • Block
Kernel Bob
Kernel Bob
@kbob@chaos.social replied  路  activity timestamp 8 hours ago

I finally got my head around WebGPU/wgpu enough to make my own render graph. Now the bubble universe thing is decomposed into a graph of render passes, and I've got some simple parameter animation going.

In this screencap, I'm varying the particle size and transparency and varying the number of particles in two ways in sync with the universe's revolution. The color map is just doing its own thing; that wasn't planned.

馃У 8/N

#BubbleUniverse #wgpu

Your browser does not support the video tag.
This video cannot be previewed
Open original
The bubble universe graphics hack goes through various particle densities and particle sizes over the course of a 12.5 second loop.
  • Copy link
  • Flag this comment
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About 路 Code of conduct 路 Privacy 路
Bonfire social 路 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct