Giter Site home page Giter Site logo

alanmartines / golden-faces Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sampoder/golden-faces

0.0 0.0 0.0 178 KB

⚱️ Web app to calculate the ratios of your face and comparing the average to the Golden Ratio

Home Page: https://grt.sampoder.com

HTML 19.91% JavaScript 71.79% CSS 8.30%

golden-faces's Introduction

How Gold is Your Face?

For this year's Maths Week, I've built a web app that uses a photo to calculate a set of ratios based on measurements of the user's facial features. It then calculates the mean average of those ratios and compares them to the infamous golden ratio: 1.61803398875.

Many have theorised that having a face that is close to the golden ratio will mean you have "a beautiful face". A fun fact that I learnt this Maths Week was that the Mona Lisa has a face that closely follows the golden ratio! Maybe that's why people line up for hours to view it? But ultimately the definition of "a beautiful face" is subjective, as we learnt in TOK.

To build the web app I used p5.js, a programming library focused around graphics that builds on top of JavaScript & the HTML Canvas element. The entire codebase has been open sourced at https://github.com/sampoder/golden-faces/ but here is a short snippet of my code that sets up the camera:

cnv = createCanvas(windowWidth, windowHeight);
cnv.mouseClicked(handleMouseClicked);
cnv.parent("canvas");
capture = createCapture(VIDEO);
capture.hide();

If you'd like to see how golden your own face is you can use the app at https://grt.sampoder.com & compare your result with other members of the community at https://airtable.com/shri5Iq1UD1PaYppJ.

golden-faces's People

Contributors

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