Giter Site home page Giter Site logo

images-with-evolution's Introduction

using evolution to make useless things

Spu7Nix made a video on putting images/videos into geometry dash with this same algorithm, and after watching it i immediately sole his idea because everything that can be made in javascript eventually will be.

The principle behind it is using a small amount of shapes to represent an image as opposed to a bitmap.

For the sake of the school computer I quickly coded this on, it doesn't generate as many shapes as it could. The process is as follows:

  • Make a lot of random shapes. The traits that can be changed are size and rotation
  • These shapes are ranked based on how "good" they are (which is how much they contribute to the color difference between images)
  • The top 10 or so survive and get to have children, who have slight variations in their traits
  • We do this a few times. sort everyone, make children, etc
  • Then the winner is picked, which is the shape with the highest score out of all of the others.
  • Now we have a single shape on the screen.

Warning: This thing is s l o w. Like 40 sec on average PER SHAPE for a full screen render. If you wanna use this dumpsterfire, use small images.

ooh look the examples wait why are they all garfield

(this one took a whole 40 minutes to render!! sped up by 256x) also casually linking my sromg comics lol image

image

and here we see the majestic garfield phone. no idea how long it took

image image

images-with-evolution's People

Contributors

mrfluffball avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.