Live data from Hacker News

Fishdraw: Procedurally Generated Fish Drawings

fishdraw.glitch.me

51–60 of 91 posts

Re: Fishdraw: Procedurally Generated Fish Drawings

#52
I love the simple style, this is great. I’ve been toying with procedurually generated drawings in Racket and find it mesmerising to observe how much conplexity can be generated from the permutations of a few rules. There’s still a lot of fish to catch in generative art

Re: Fishdraw: Procedurally Generated Fish Drawings

#53
post #45

Does anyone have a good list of resources for people who want to get a get baseline on understanding and implementing procedural generation?

The Nature of Code book is a great resource. Dan also deep dives on specific topics on his YouTube channel.

- https://natureofcode.com/book/

- https://www.youtube.com/c/TheCodingTrain

Re: Fishdraw: Procedurally Generated Fish Drawings

#54
post #28
post #24

Earlier quoted context omitted.

Hacked kindles work well for this.

Kindles are too small and have no color. I want a large colorful framed picture. E-ink would be awesome but that’s not cheap for color displays and def not for large ones.

The good thing is you only have to buy it once, and then you have unlimited amounts of art you can display.

Re: Fishdraw: Procedurally Generated Fish Drawings

#55
post #38

Earlier quoted context omitted.

Won't work: if(checkForSomething()) { let foo = 2; } else { let foo = 3; } console.log(foo); // won't work But: if(checkForSomething()) { var foo = 2; } else { var foo = 3; } console.log(foo); // will work That said, I religiously avoid "var" and just declare the variable beforehand with "let" because there are too many other gotchas with var. Less debugging headaches. And use "const" religiously as well, like C++ pe…

const in C++ is very different than const in JavaScript though. I guess you are well aware of that but I feel like being pedantic. This is allowed in JavaScript: const foo = {bar: 1}; foo.bar = 2;

It's not really any different if you keep in mind that foo is a reference here, and so that's what const applies to. The equivalent in C++ would be a const pointer to a non-const object.

Re: Fishdraw: Procedurally Generated Fish Drawings

#56
post #38
post #21

Earlier quoted context omitted.

Could you give an example? It seems like any "var" could be replaced with "let" at a different scope.

Won't work: if(checkForSomething()) { let foo = 2; } else { let foo = 3; } console.log(foo); // won't work But: if(checkForSomething()) { var foo = 2; } else { var foo = 3; } console.log(foo); // will work That said, I religiously avoid "var" and just declare the variable beforehand with "let" because there are too many other gotchas with var. Less debugging headaches. And use "const" religiously as well, like C++ pe…

That's exactly what I meant by "any "var" could be replaced with "let" at a different scope":

    let foo;
    if (checkForSomething()) {
       foo = 2;
    } else {
       foo = 3;
    }

Re: Fishdraw: Procedurally Generated Fish Drawings

#59

Earlier quoted context omitted.

I took a look. I can't really understand it (unless I spend the whole next week on it... which I will probably do). Could someone with more expertise in the topic explain me how it is done (high level overview)?

0) sepect random parameters for body size/shape, fin size/shape, etc. 1) draw fish outline 2) complete rest of the fish

Sounds a bit like /r/restofthefuckingowl.

Re: Fishdraw: Procedurally Generated Fish Drawings

#60

This is just lovely. But I am also tickled by the nominative determinism of the dots on the fish being generated using Poisson Disk sampling. https://github.com/LingDong-/fishdraw/blob/main/fishdraw.js#... https://en.wikipedia.org/wiki/Supersampling#Poisson_disk

Because poisson=fish in French? <
Post reply on HN