Clojure/ClojureScript library for creating interactive drawings and animations
Questions tagged [quil]
47 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
- 379
- 2
- 14
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
- 4,935
- 11
- 56
- 86
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
- 23,917
- 20
- 63
- 148
3
votes
1 answer
How load html content into Quill wysiwyg editor?
I want to use @vueup/vue-quill ^1.0.0-beta.7 on my control panel admin based on vue ^3.2.29.
Unfortunately, I noticed that loading HTML content is not working for me. Quill converts
tags to
tags for me, also removing classy and css styles,…

Grzyb9k
- 123
- 1
- 1
- 7
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
- 2,016
- 3
- 21
- 36
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
- 2,473
- 5
- 28
- 38
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
- 3,096
- 4
- 31
- 51
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
- 379
- 2
- 14
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
- 4,935
- 11
- 56
- 86
2
votes
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
- 99
- 6
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
- 2,016
- 3
- 21
- 36
2
votes
2 answers
Quil sketch on a Reagent canvas
I have an html canvas and would like to display a Quil sketch on it. Most of the Quil examples use defsketch to draw onto a canvas defined on a static html page. I would like to do it onto the canvas within this Reagent component:
(defn my-component…

Chris Murphy
- 6,411
- 1
- 24
- 42
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,219
- 4
- 28
- 40