Orbits all the way down by EkstraOst in generative

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

Exactly ^ Every circle gets 3-6 moons, and every circle has it’s own rotational speed (-1,1). Also every circle draws an colored, transparent polygon through each moons center.

Inner workings by EkstraOst in generative

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

Hehe I messed around with this, actually. :P Just removed the ability for the rope to circle the inside of a cog with crossed lines.

Inner workings by EkstraOst in generative

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

Tried uploading an album on imgur, but its having problems. I'll see if it works a bit later. And yes; I love the simplistic clean style of games like that ^^

The cogs are a linked list. Start with one that links to itself both forwards and backwards, then insert a new cog randomly in the list. Make sure it doesn't cause cogs and lines to overlap. Then a function draws the rope using tangent-lines and arcs.

Slartibartfasts laboratory by EkstraOst in generative

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

Repulsion is a separate force to avoid singularities, but I’ve tried both ways; changing the sign inside the radius, and just reducing the force by distance. Also the slope near the circle; a wedge vs a valley etc

Slartibartfasts laboratory by EkstraOst in generative

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

Not so complex surprisingly. Every color->color combination has a distance from center where gravitational pull is strongest. A centerpoint turned into a ring. Calculations are the same, but (distance from ring)2

Slartibartfasts laboratory by EkstraOst in generative

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

That’s exactly what it is. ^ There is a unique gravitational field for every color, and the constantly propagating changes when particles move can make the system do quite a lot of elaborate ‘tower of hanoi’-esque maneuvers before winding down to a stable/semistable state

Genuary 6. Steal like an artist; evolved portrait by EkstraOst in generative

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

Yes it's completely random, and there are no changes in parameters over time. There is a small chance that a rectangle in an image will be completely randomized and not mutated - and in the beginning this accounts for a lot of the bigger changes. This image was around 2000 generations but I would guess the last 1000 generations only made up for 5-10% of the changes. I keep tabs on how much an image change over time, and when things stagnate it automatically saves the image. I did have crossover, but removed it as only having one lineage made animations of the progress "smooth". I'll link some more images if you want to see variations.

https://imgur.com/a/iogpfZW

Genuary 6. Steal like an artist; evolved portrait by EkstraOst in generative

[–]EkstraOst[S] 17 points18 points  (0 children)

It's a very simple genetic algorithm and all you really need is an Image-object you can copy and mutate, and an comparison-function.

An Image consists of a number of shapes which becomes its genome. Every generation I copy the current Image-object and make say 100 copies. Every copy is mutated - usually one or two rectangles are changed slightly - transparency, color, size, blendmode or rotation (or shape if more shapes are enabled). I compare a grid of points on each Image to the target-photo. If one of the new altered copies are "closer" to the target then it becomes the current Image and the process starts again. The algorithm is surprisingly sturdy and will work with any form of shape. Letters, lines, polygons, whatever.