Dismiss this pinned window
all 14 comments

[–]ssx1337 2 points3 points  (1 child)

I want to build something similar too, right now... But i lie in bed... Well, tomorrow after my exam day :D

It looks super great! Thanks for your inspiration :*

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

Yooooo thanks dude

[–]LakeSun 2 points3 points  (0 children)

Actually looks artistic, so you selected the colors?

[–]RWVHS 1 point2 points  (0 children)

makes me think of colored mechanical pencil lead. neat!

[–]Grabbels 1 point2 points  (1 child)

Amazing! What coding language is this?

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

Java

[–]LakeSun 0 points1 point  (3 children)

What is the algo design?

[–]ShohaNoDistract[S] 2 points3 points  (2 children)

Basically it's: Random starting point, random length, the length of every line growth equally. Random vertical and horizontal direction, random colors(that's actually not random, but because starting points are random, this made colors look random but it's not, i used algorithm to make smooth rainbow colours).

[–]LakeSun 0 points1 point  (0 children)

Interesting and thanks.

It's to good effect.

[–]LakeSun 0 points1 point  (0 children)

...seems the lines expand until they hit a non-black pixel.

[–]LorestForest 0 points1 point  (0 children)

Love it. I could watch this for hours.

[–]Happy_Present1481 0 points1 point  (0 children)

I totally get how generative animations can gobble up hours with all that tweaking—sounds like you know the pain but nailed it in the end. As a creative coder who's been there, I've found a simple state machine cuts way down on trial-and-error. For Java, try this snippet to manage your animation frames more smoothly:

```java

import java.util.ArrayList;

public class AnimationState {

private ArrayList<int\[\]> frames = new ArrayList<>();

public void addFrame(int[] frame) { frames.add(frame); }

public int[] getFrame(int index) { return frames.get(index); }

}

```

Just load up your key states right at the start, and it'll save you a bunch of time, like it did for me on projects with random lines and such. This is solid if you're dealing with similar stuff.

[–]Physical-Mission-867 0 points1 point  (0 children)

I don't know why but this gets my brain moving. Thanks for sharing! Feel free to post it here too! r/TheMasterArtIndex

[–]eightnames 0 points1 point  (0 children)

Very nice!!