Questions tagged [quil]

Clojure/ClojureScript library for creating interactive drawings and animations

45 questions
14
votes
1 answer

Lighttable and Quil

I apologize that I'm new to Clojure. I've found there's not much in the way of tooling or tutorials for the Clojure world that I've been able to digest so far, so I've downloaded Light Table ( http://www.lighttable.com/ ) which sounds like it should…
user2105464
  • 143
  • 5
4
votes
1 answer

Clojure, Quil: Creating/debugging generic functions

I would like to create a command line application that generates jpg images using Quil. I plan to write a couple of generic image processing functions to mix and match (some fn drawing shapes and some manipulating the pixel array). A simple example…
Daneel
  • 53
  • 3
4
votes
1 answer

Load/display image in clojure with quil

I've got the basic quil example working According to this tutorial the code to load/display an image in processing looks like this: PImage img; void setup() { size(320,240); img = loadImage("mysummervacation.jpg"); } void draw() { …
MLmuchAmaze
  • 347
  • 2
  • 13
4
votes
4 answers

How to do a for-loop in Clojure?

I'm learning myself some Clojure and I'm using Quil. I would like to know how to translate a for-loop into Clojure: This is how I would do it in Java or similar languages: for ( int i = 0; i < numSides; i++ ) { float posX = cos( theta * i ); …
Ricardo Sanchez
  • 3,945
  • 8
  • 44
  • 73
4
votes
2 answers

How do I live code in Clojure using Emacs / nrepl / Quil?

I have a fairly standard Quil file that I am editing with Emacs and nrepl. (defn setup [] (qc/smooth) (qc/frame-rate 24) (qc/background 200)) (defn draw [] (draw-world)) (qc/defsketch run :title "Circles!" :setup setup :draw draw …
sdasdadas
  • 20,387
  • 19
  • 57
  • 135
3
votes
1 answer

Arc stroke smoothness

I am currently making a clock with quil and Daniel Shiffman's video tutorial, but I have a trouble drawing arc that the arc drew the stroke little bad than line. I don't know what's the problem or maybe my code is wrong or something to create an…
Ampersanda
  • 1,581
  • 15
  • 31
3
votes
2 answers

Inspect state in fun-mode in Quil using the REPL?

I'm writing a sketch in Clojure/Quil in fun(ctional)-mode. Sometimes, I want to be able to inspect what the current state holds. However, when I try to call Quil's state from the REPL I get the following: (q/state) ==> NullPointerException …
cwj
  • 1,884
  • 4
  • 21
  • 36
3
votes
0 answers

Quil: Don't even open the window

I'm trying to use quil to procedurally generate images. I think it's really great, but I'm not trying to display the image at all. I'm just trying to save the image to a file. Is it possible to not actually open the window and just save the file…
River Tam
  • 2,492
  • 3
  • 28
  • 45
3
votes
1 answer

Performance of pixel transformation using clojure and quil

Let's assume I'd like to wright an ocr algorithm. Therefore I want to create a binary image. Using clojure and quil I came up with: (defn setup [] (load-pixels) (let [pxls (pixels) ] (letfn [(pxl-over-threshold? [idx] (if (>…
MLmuchAmaze
  • 347
  • 2
  • 13
3
votes
1 answer

How does Clojure state work?

I know what state is by concept, but I can't understand how it's been implemented in this example: https://github.com/quil/quil/blob/master/examples/gen_art/31_oo_circles.clj I just simply don't see it. State implementation happens on lines 100,…
Ricardo Sanchez
  • 3,945
  • 8
  • 44
  • 73
2
votes
1 answer

Update state with if on Quil

I am trying to make 10 PRINT code with Quil. I try to transform this code from the twitter post https://twitter.com/ACharLuk/status/913094845505445890 which is using luna This is my code for it (ns tenprint.core (:require [quil.core :as q] …
Ampersanda
  • 1,581
  • 15
  • 31
2
votes
1 answer

How to handle slow drawing functions in quil functional mode

I am trying to build a cartographic quil visualization derivative of this bicycle station map animation. I am trying to use the new default functional mode in quil, because it looks like this handles a lot of the work of dealing with mouse events…
Peter
  • 4,041
  • 4
  • 25
  • 38
2
votes
1 answer

Clojure macro inside another macro: how to generate string from symbol

Probably the title is not 100% correct, but let me show you the issue: (defmacro nvp! [n width height] `(q/defsketch (symbol (str (name '~n) "-viewport" )) :title (name '~n)) In short: there's a macro called defsketch (it's…
Mate Varga
  • 2,574
  • 2
  • 12
  • 14
2
votes
1 answer

Clojure GUI for cropping images

I'm making a GUI for selecting regions to crop from images. I have been using Seesaw and cans select rectangular regions, but cannot find a way to set an image to the background of seesaw.canvas. This suggests using icons on labels. Can I make a…
user945754
1
vote
0 answers

Quill editor - HTML controls on Quill text area

I am trying to build a text editor for my application using react quill. My requirement is to build a sentence template and in that template, there will be some HTML controls like some free texts and some dropdown options. Is it possible to build an…
AjItH V S
  • 79
  • 5
1
2 3