Giter Club home page Giter Club logo

pmesh's Introduction

PMesh

I wasn't really sure what to name this project, but P(rocessing)Mesh sounded about right. I saw a post on r/processing that had a grid of rectangles. Each rectangle would expand depending on its distance from the cursor. I first saw this post at 2AM and my brain was not powerful enough to comprehend what I was watching, so I figured I would try to code it up the following day. Turned out to be a cool little project!

Anyway, I decided to name my grid a PMesh. Each row of rectangles is called a Chain, and each rectange within a row is called a Link. I went with this naming convention because the final result sort of reminded me of chainmail, since the size of one rectangle would affect the positions of the other rectangles in the grid, kind of like how the contraction / expansion of one link in a chainmail will affect the positions of other links.

As a slight modification to the original Reddit post, I made each Link contract rather than expand as the mouse gets closer to it. I also added a slight alpha-gradient to the Links' color. This way, Links look kind of transparent when the mouse is far from them, but become fully opaque as the mouse gets closer to them.

Setup

To run this code, you'll have to install the Processing IDE. From there, you can just clone this repository with git clone https://github.com/rshiv2/PMesh.git and run the code. I've left some parameters in PMesh.pde for users to play around with. Hopefully the comments I've left will provide a good idea of what each of these parameters does!

pmesh's People

Contributors

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