Giter Club home page Giter Club logo

mona's Introduction

reddit mona lisa meme thing in c.

written by nick welch <[email protected]>.  author disclaims copyright.

build requirements (ubuntu/debian package names):

    pkg-config
    libx11-dev
    libcairo2
    libcairo2-dev
    libglib2.0-0
    libglib2.0-dev

and of course g++ and make (build-essential package should cover it)

to run:

    make
    ./mona
    Control-C in terminal to quit

the path to the mona.png image is hardcoded in the source code, so without
tweaking that, you must run it from same directory.

feel free to modify the NUM_POINTS and NUM_SHAPES #defines to play around with
different variations.  to run it against another image, change "mona.png" to
"whatever.png" in the code (or merely copy your image over mona.png) (it must
be a png), and modify the WIDTH and HEIGHT #defines accordingly.  text can
produce some cool looking results.

WARNING to those who might scrutinize the code:

the code is REALLY REALLY REALLY REALLY messy and ugly and bad.  i started off
with some old code and frantically pulverized it into what it is.  the result
is a mix of c and c++, different syntax styles, etc.  it's horrible.  i was in
a rush, only had a few hours to do it, and needed to get to sleep to wake up
for a flight the next day.  now it works and i have little motivation to go
back and clean up something that was basically a random whim.  it's not
impossible to understand or anything, but it's not pretty either.

also, one drawback vs. the web version is that you can't see the random
attempts onscreen -- you only see the current "best" version.

mona's People

Contributors

mackstann 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.