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
    11
    ·
    2 months ago

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

    • snekmuffin@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      3
      ·
      2 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

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

        Looking awesome. Thank you for your time and the explanation