6 hexagons are red, one blue, arranged in a honeycomb pattern, where 1 hexagon is surrounded by 6 others

Did you know a Hexagon can be constructed using the angle pi/3 a lot of times? This is because a hexagon is made of 6 triangles with equal side length - the radius of the hexagon. The inner angles of these triangles is pi/3. Using this information and the trigonometric functions sin and cos can be used to draw such a picture.

      • Dem Bosain@midwest.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 days ago

        There was a programming language in the old old Apple computers called Logo. It was basically a drawing program language. You had control of a ‘cursor’ called a turtle, and you would give it commands like “forward 5, left 90, forward 5, left 90…” and it would draw shapes. I’m sure there’s a wiki for it is you want more info.

  • LordKitsuna@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    4 days ago

    I’m going to work off the assumption that they were supposed to all be red but one of them refuses to not be blue and we are just pretending that’s a feature now

  • over_clox@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    Did you know that 355/113 is an extremely close approximation of π? It’s accurate to the first 6 decimal places.

    That’s accurate enough for most everyday uses except the most demanding scientific and engineering purposes.

      • over_clox@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        You’re right. But as the other commenter suggested, if you’re on an embedded system or otherwise limited system, or even using another language missing certain constants and/or functions, it’s a good thing to know.

        You could also just pull the constant from memory, assuming you have the brain memory space that I apparently have…

        3.1415926535897932384646233832795020841971693993751

      • Riskable@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 days ago

        If you’re using an embedded version of Python that’s missing the math module. Because somebody couldn’t be bothered to fix the floating point math in C for platforms that don’t have an FPU 🤷

    • funkless_eck@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      non joke answer: the bee is compelled to build wax, wax takes a comparative large amount of effort and calories to produce, so they evolved to use a shape that requires the least effort and takes the most space. It could’ve been squares, but squares are harder to form and less compact, so it’s likely they started with blobs/circles, and over millions of years, more closely, densely packed hives survived where others didn’t until they ended up at the idea shape of a hexagon.

      • redlemace@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        I know, and you’re right. It’s space efficiency and strength. Hexagon is much stronger than squares.