ryeguy_24 19 hours ago

Merry Christmas HN. Ever year, the original T * sin(t) Christmas tree gets posted. This year, I wanted to call out my favorite modification by Silvia Hao. It’s beautiful. One year, I’ll try to add to its beauty. But for now, I’ll just appreciate it. She posted it here: https://community.wolfram.com/groups/-/m/t/175891

  • Arnavion 14 hours ago

    Silvia Hao's version is the one submitted here to HN, actually.

    • dylan604 11 hours ago

      Someone was too excited about Santa to actually you know click the link

      • frogulis 11 hours ago

        The GP commenter (ryeguy_24) is the original poster of this article, leaving additional information about what they posted.

      • acer4666 11 hours ago

        Some was too excited about Santa to, you know, read the usernames of the submitter and commenter

        • Arnavion 2 hours ago

          Guilty as charged.

        • TheSpiceIsLife 9 hours ago

          Some kind of Pareto Principle: 80% of people read 20% of the usernames.

          • deskr 7 hours ago

            Wrong. It says that 20% of people will argue with you and be confident that they are right even though they are more wrong.

            • TheSpiceIsLife 3 hours ago

              100% of the people I live with will argue with me 20% of the time and be wrong 80% of those times.

            • romanobro56 7 hours ago

              Pareto victim right here

              • JadeNB 5 hours ago

                > Pareto victim right here

                I'm pretty sure deskr was making a joke.

  • JadeNB 5 hours ago

    I checked the post, but it's from someone who's far more comfortable with Mathematica than I am, so I hope you won't mind my asking about the maths.

    First, the T vs. t in T * sin(t) doesn't mean anything, right? Second, the ' in the title T * sin(t)' doesn't belong, right?

    Then I think that this is graphing essentially (t * sin(t), t * cos(t), t + something), which is a cone if the something is constant, which I believe it is—and that certainly matches the graph. And the rest is about choosing an aesthetically pleasing step size and accomplishing the lovely twinkling and colors, right?

    • ryeguy_24 3 hours ago

      I added the prime in the title to indicate that this version is a bit different from the original t * sin(t) post.

      • JadeNB 2 hours ago

        OK, thanks. Is the rest of it right?

jll29 9 hours ago

That's a beautiful animation (and useful maths ;-).

In the spirit of minimalism, Merry Christmas to all HNers with this little but time-tested command:

  $ xmastree 5 9 2024`
                                *
                               ***
                              *****
                             *******
                                *
                               ***
                              *****
                             *******
                                *
                               ***
                              *****
                             *******
                                *
                               ***
                              *****
                             *******
                               ***                              
                               ***                              
                               ***                              
                               *** 
Source: https://github.com/jochenleidner/ltools/blob/main/src/bin/xm...
Lerc 11 hours ago

I made this Bauble dweet as a Christmas themed exercise in 2020 https://www.dwitter.net/d/20993

    function u(t) { 
        t||(c.width/=6)  // shrink canvas to 1/6 at t==0
        M=a=>x.filter=a?"none":"blur(1px)brightness(90%"
        M();x.drawImage(c,0,0)
        for(i=n=90;--i;)
          x.fillRect(
           160-S(X=i+t*4)*(1-(v=C(i*n))*v)*n,
           v*n+n,
           4,
           2,
           x.fillStyle="#F"+(i+10),M(C(X)<0))    
    }

with u(t) is called 60 times per second. t: elapsed time in seconds. c: A 1920x1080 canvas. x: A 2D context for that canvas. S: Math.sin C: Math.cos
foobar1962 9 hours ago

My first time seeing it. Thanks for posting, and thanks to HN for being the kind of place that stuff like this gets posted.

noduerme 10 hours ago

I went to Hopscotch in Portland with some friends tonight, tried out the "quantum trampoline" [0]... spent most of my time in socks wondering if that was written in plain ol' javascript or p5. Happy Holidays, folks.

[0] https://www.behance.net/kuflex?locale=en_US#

Alifatisk 9 hours ago

I think this would be perfect on openprocessing.org, I just don't know how to implement that.

BobbyTables2 15 hours ago

Now make 30% of the bulbs randomly burn out :)

  • hippich 15 hours ago

    Randomly wouldn't be that bad. But whole segments - way more noticable!

    • nuodag 10 hours ago

      usually a bunch of lights are wired in series, if one burns out all stay dark.

      Find and replace the broken one, and all light again!

layer8 17 hours ago

Or a drill.

  • block_dagger 17 hours ago

    This is not a drill. It really is Christmas.

    • layer8 16 hours ago

      The function is neither a drill nor a Christmas tree, but similar to how it happens to look (≈) like a Christmas tree, it also happens to look like a drill. This is what I wanted to point out. It’s a multipurpose function.

      • Uncorrelated 14 hours ago

        block_dagger was making a pun based on the sense of drill as a training exercise. A similar joke went over the heads of nearly everyone on a recent episode of Taskmaster:

        https://www.youtube.com/watch?v=6PJkA3o_Im0

        • noduerme 10 hours ago

          English being the global language makes it easier to get a lift, but much harder for anyone to pick you up.

      • DrSAR 15 hours ago

        It is also not a pipe

        • arcticbull 13 hours ago

          Cici n'est pas un arbre de Noël tabarnak

          • bjconlan 10 hours ago

            Haha, oh I miss the Quebecois. Appropriation of Catholic vernacular make for the best profanities.

    • corobo 11 hours ago

      I wish I had more to add, but I do not. This proper tickled me, thank you. lmao