Giter VIP home page Giter VIP logo

dice's Introduction

dice

Takes a source image, converts it to a grid of dice, and prints out instructions for recreating it with real dice.

How to Use

  • Must be run in Processing 2, not 3. In the /images folder there is a file named source.jpg. Replace that file (while keeping the name the same) with whatever source image you would like to see recreated in dice.

Flags

At the top of DiceProject.pde there are a couple of global variables you can change to affect your results. Firstly, there's a constant named DICE_TYPE that by default is set to NORMALA_DICE. You can change that to be any of the types directly above it (NORMAL/BLACK/WEIGHTED/INVERTED) to get different results in your output image. The WEIGHTED_DICE option will give you the best looking output image, but is not feasible to recreate with real nice. Essentially it uses different shades of white to help emphasize the effect of the higher-number dice.

Output

Running the code produces a couple of helpful files. When run, you will see your image in a sample window but it will also be saved to a file called DicedImage.jpg in the root folder for the project. A text file called instructions.txt is also produced that will give you line-by-line instructions to recreate the diced image with physical dice, should you want to build a real-world instance of your image.

dice's People

Contributors

pacoswifty avatar

Watchers

James Cloos 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.