Code Monkey home page Code Monkey logo

linkages3's Introduction

Linkage Editor

This is a UI for making N-bar linkage systems with one degree of freedom and any number of rotary inputs. Here's an example making Theo Jasen's Strandbeest Linkage:

Theo Jasen's Strandbeest Linkage

Play around with this example here: http://tinyurl.com/gwcuhhr

To run locally, first install npm, clone this repository, then run:

$ npm install
$ npm run-script build

Then open index.html with a browser (I've only tested in the lastest versions of Chrome). You should see a single, loney rotary input that looks like this:

Image of basic linkage

Here are the controls so far:

  • Press space to toggle pause
  • When paused:
    • Click and drag a ground vertex to move it around
    • Some ground verticies are used as references for rotary inputs, so dragging them will change the phase the input
    • Hover over any bar*, then press w or s to change its length
    • To add an additional ground vertex connected to the linkage, click on two different places on the background, then click on a vertex on the linkage
    • To add additional bars, click a bar, or on any two verticies of the linkage, then click once on the background
    • To add a new rotary input, hold down r and then click somewhere on the background
    • To delete parts of the linkage, click on a vertex, then press d. Note that this only works if other parts of the linkage don't depend on the bars connected to the vertex.
    • To see the path that a vertex traces, click on a vertex, then press space to unpause
    • To automatically optimize the linkage to follow a path, click a vertex, then press o, then draw the desired path for that vertex. Press space to stop the optimization.
    • To select a rotary input, click the vertex that a bar is rotating around
  • When unpaused:
    • Press w or s to increase or decrease the speed of a selected rotary input, or t to reverse its direction. If no rotary input is selected, these changes in speed will apply to all of them.

* any bar except one between a rotary input and its reference vertex

Rotary inputs will automatically reverse if they're about to put the linakge into an impossible configuration.

linkages3's People

Contributors

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