Giter Site home page Giter Site logo

quil-examples's Introduction

Quil examples

Examples of Quil sketches.

Check src/quil_sketches folder and it's subfolders. Each .clj file is a separate sketch. Some of them shows particular Quil feature and some of them are simply beatiful animations. You can start with running them one by one and studying their sources.

How to run examples

Clone repo with examples to you machine:

git clone https://github.com/quil/quil-examples.git
Using lein REPL

Start REPL:

lein repl

Require selected sketch to run it:

user=> (require 'quil-sketches.gen-art.01-cross-with-circle :reload)

Note:

  • you should prefix sketch namespace with single quote: 'quil-sketches.gen-art.01-cross-with-circle
  • :reload option is needed if you want to run it several times. Otherwise sketch won't run on second and subsequent require calls.
Using lein run

Use following command to run selected sketch:

lein run -m quil-sketches.gen-art.01-cross-with-circle

When you close sketch JVM won't exit, so you need to do it manually e.g. using Ctrl+C combination.

Using LightTable

Start LightTable.
Open folder containing the project:

File -> Open folder

Open file containing sketch and evaluate it using following keys combination:

Ctrl+Shift+Enter
Using emacs

Open file with sketch:

emacs src/quil_sketches/gen_art/01_cross_with_circle.clj

Start cider:

M-x cider-jack-in

Evaluate opened file:

C-c C-k

Sketch will open. You can run other sketches by opening their files and evaluate their contents via C-c C-k

How to create your own sketch

It is simple. You can either modify existing sketch or create new one. To create new sketch first you need to create sketch file e.g. src/quil_sketches/my_super_sketch.clj and use some existing sketch as initial template (don't forget to modify namespace to quil-sketches.my-super-sketch).

Happy hacking!

quil-examples's People

Contributors

azhylka avatar nbeloglazov avatar

Watchers

 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.