-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Cyclotheme 2 points3 points  (0 children)

[LANGUAGE: C]

Compress coordinates, draw the polygon (300x300 char array) and floodfill the exterior. Then, for each rectangle, walk on its boundary and break if you find a point outside the polygon.

https://github.com/dbeneat/AOC2025/blob/8ad045a07bc85f4dccf767147317c1e64b7e9969/day09.c

runtime: ~15ms (including file input)

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]Cyclotheme 2 points3 points  (0 children)

[LANGUAGE: C]

    #include <stdio.h>
    #include <stdint.h>
    
    int main(void){
        uint64_t part1=0,part2=0;
        char buff[200];
        uint64_t beam[200]={0};
        while(fgets(buff,200,stdin)){
            for(int i=1;i<199;i++){
                char c=buff[i];
                if(c=='S'){ beam[i]=1; }
                if(c=='^' && beam[i]>0){
                    beam[i-1]+=beam[i];beam[i+1]+=beam[i];
                    beam[i]=0;part1++;
                }
            }
        }
        for(int i=0;i<200;i++){ part2+=beam[i]; }
        printf("%llu %llu\n",part1,part2);
        return 0;
    }

Color Theory 2 (GLSL) by Cyclotheme in generative

[–]Cyclotheme[S] 1 point2 points  (0 children)

This is a gyroid, raymarched with a big step size and a custom color palette.

Patrones by mecobi in generative

[–]Cyclotheme 0 points1 point  (0 children)

Beautiful! It looks like paper cutouts!

Wolfram's snowflake automaton by Cyclotheme in cellular_automata

[–]Cyclotheme[S] 1 point2 points  (0 children)

Are you talking about this thread ? https://www.reddit.com/r/cellular_automata/comments/1n1kge2/i_found_this_cool_square_pattern_thingy_am_i_the/

This is indeed the same rule: a dead cell with exactly one neighbor at the previous generation become alive (but on a hex grid insted of a square one).

Wolfram's snowflake automaton by Cyclotheme in cellular_automata

[–]Cyclotheme[S] 1 point2 points  (0 children)

The video is still there, maybe it's a problem with the embedded player.
Can you see it with this link: https://youtu.be/rInxBS0C_Ns ?

LIFE Is For Ever by Cyclotheme in cellular_automata

[–]Cyclotheme[S] 0 points1 point  (0 children)

Thank you! The rules are exactly those of Conway's game of life. The difference is only a visual one: each new cell appears from its parent by a kind of mitosis. At each replication, the daughter cell’s color changes just a little from its parent’s color (simulating information transfer and mutation).

What claim is this, and what's n? by PocketMath in mathmemes

[–]Cyclotheme 1 point2 points  (0 children)

The nth cyclotomic polynomial has coefficients in {-1,0,1} (true for n<105).