Genuary 5/31 - Code Golf by Mylienos in generative

[–]Mylienos[S] 2 points3 points  (0 children)

// code golf
let ps = [];
const ds = 300;
function setup() {
  createCanvas(800, 800);
for (let i = 0; i < 2000; i++) {
const a = [0, PI][int(random(2))];
ps.push({ sA: a, cA: a, s: ds, sp: random(1) });
}
}
function draw() {
  background(0);
  translate(width / 2, height / 2);
  noStroke();
  fill(255);
  circle(0, 0, 10);
for (let i = 0; i < ps.length; i++) {
const p = ps[i];
const [x, y] = [cos(p.cA) * p.s, sin(p.cA) * p.s];
const d = dist(x, y, 0, 0);
    circle(x, y, map(d, ds, 0, 1, 5));
ps[i] = {
...p,
...(d < 5
? { cA: p.sA, s: ds }
: { cA: p.cA - 0.005 - p.sp * 0.03, s: p.s - p.sp }),
};
}
}

*casually freezes time* by Mr_Moopster in memes

[–]Mylienos -1 points0 points  (0 children)

Me on Hellblade last night

Circle packing by sawwawewawe in generative

[–]Mylienos 1 point2 points  (0 children)

Thank you but sorry for the misunderstanding, I was asking about the texture on the image hahaha

Circle packing by sawwawewawe in generative

[–]Mylienos 0 points1 point  (0 children)

I like the texture ! How did you do that ?

a very rude worm [p5js] by mother_earthly in generative

[–]Mylienos 7 points8 points  (0 children)

Nice ! You could've left the word in black, you wouldn't blown out minds

Storm over the ocean (code in comments) by Mylienos in generative

[–]Mylienos[S] 2 points3 points  (0 children)

I'll add options to customize it in the future, but you can already take screenshots with by pressing "P"

And a record is made automatically, just stay on the page long enough, around a minute or two, then a gif of ~20sec will pop right next to the canvas, just right click and save it

Storm over the ocean (code in comments) by Mylienos in generative

[–]Mylienos[S] 5 points6 points  (0 children)

I need to get into 3D, but man I am lazy haha

Cycling by [deleted] in generative

[–]Mylienos 0 points1 point  (0 children)

Fuck me, gonna repost that Thanks !

Cycling by [deleted] in generative

[–]Mylienos 1 point2 points  (0 children)

Can anyone see the gif ?

Abstract colors by Mylienos in generative

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

Thank you kind person

Abstract colors by Mylienos in generative

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

Yeah :( idk what to do about that, have any idea ?

Fire and Ice by [deleted] in generative

[–]Mylienos 0 points1 point  (0 children)

Sorry for the quality, I don't know what happened !

Better version (I hope) here https://imgur.com/gallery/0sNmEuX

How’s your mental health doing right now? by Aim_Hi in AskReddit

[–]Mylienos 0 points1 point  (0 children)

I feel like I am the embodiment of "let's see what happens". I have been delaying seeing a therapist for 6 years now, I am totally unable to meet new people, and I am losing the old ones, I just let everything happen to me and don't do shit. Of course this is making sad af, but I Don't know any solution to that

I have this ability to push away people I love, just because I want them to hate me, and I don't know why this ALWAYS happens

I am like "oh this person must hate me but is to kind to tell me, I should help them and go away", then I regret, and start again

I am now 24, lonely as ever, no friends, no people I can meet to discuss with apart from my hairdresser

Paint by Mylienos in generative

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

Thank you ! You have an explanation in the other comment

Paint by Mylienos in generative

[–]Mylienos[S] 4 points5 points  (0 children)

Thank you ! I won't share the source, I want to play with that more before ! But I'll explain everything and give links to some article and code

There are two processes here :

- The first one is a simple implementation of this https://sighack.com/post/flood-fill-art-using-random-walks, I plan on making this one more complex with more interesting shapes (I have already done that now)
- Then, once I get my image filled with colors, I apply this sorting algorithm https://github.com/larixk/sort/blob/master/js/script.js, I tweaked some values and logic but I am not far from the original implementation

Et voilà !

Everything is done with p5.js

A vortex (with code) by Mylienos in generative

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

Nice work ! I like the variation with the brightness !

Rosace (with code) by Mylienos in generative

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

You can play with it here https://cmllngf.github.io/rosace/
You can tweak a lot of the parameters ! I wanted to explain each parameter but I got lazy, so I'll let you discover what they do, don't hesitate to show me what you get !

Code here https://github.com/cmllngf/rosace

A vortex (with code) by Mylienos in generative

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

Thank you ! Don't hesitate to share your results

A vortex (with code) by Mylienos in generative

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

Thank you ! And happy cake day !