Made the kinda constellation animation you see sometimes in the backgrounds of things.

Video link

(surprisingly easy on resources given the O(n2) complexity

  • snap@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    very nice. I would very much love to know how you did that :)

    • snekmuffin@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      thank you! seems someone else already tagged you, but here’s the link to source just in case: https://codeberg.org/aketawi-study/rust-constellation-bgr/

      The basic idea is that I spawn a bunch of nodes with rando m velocitins and check the distance between each other at every frame. If the distance is within a certain radius, draw a line.

      To display it in the background I just have a script that launches it on startup, and a couple of rules in AwesomeWM and picom to make it transparent, unfocusable and borderless