Giter VIP home page Giter VIP logo

ncs-analyzer's Introduction

ncs-analyzer

graphical interactive linear interpolation function generator

this is an early version. in the demo you can

  • pan and zoom the graph
  • move the orange points to fit the interpolation function to the data scatterplot
  • change the xDomain between hue, chromaticness and blackness
  • change blackness and chromaticness
  • toggle normalization

sample data: Natural Color System (NCS) compared to RGB HSL HSV color systems

goal: find a piecewise linear approximation of the ncs2rgb and rgb2ncs function

this seems to be the first attempt to find a rgb2ncs function ...

the function should be optimized for time (performance) at the cost of size. for this, we use only linear interpolation (not quadratic or cubic) and we limit the X values to a grid so we can find the segment by its index (X / gridSize)|0 and we can avoid binary search

based on svelte and layercake

Get started

Install the dependencies...

npm install
npm run build && npm start

Your app will be running at localhost:5000.

Developing

# if you didn't already install, run the install command
npm install
npm run dev

Your app will be running at localhost:5000.

Server-side rendering

This template also lets you pre-render your project, which will build out the elements that don't rely on any client-side JavaScript.

npm run build:ssr
npm start

Your app will be running at localhost:5000.

Hydrating

Sometimes you want to build out the HTML but your graphic still relies on some client-side JavaScript. In these cases, set hydrate: true in the config.json file. That will set the hydratable compiler option and the hydrate runtime option to true. It will also add a script tag to load the build/bundle.js JavaScript file.

Additional info

This is a fairly basic setup that has just enough to get you going with LayerCake and SSR rendering. For a more complete Svelte setup, take a look at Russell Goldenberg's svelte-starter.

ncs-analyzer's People

Contributors

mhkeller avatar rich-harris avatar conduitry avatar milahu avatar lukeed avatar antonwiklund99 avatar akauppi avatar cainux avatar crisfole avatar bevand10 avatar emiltholin avatar ivansanchez avatar wolfr avatar jul-sh avatar kandersonko avatar mehedi61 avatar matyifkbt avatar paulbgd avatar romankaravia avatar frederikhors avatar halfnelson avatar mvllow avatar pngwn avatar

Watchers

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