Fork me on GitHub
#quil
<
2019-08-12
>
kingcode13:08:33

Is it possible to draw lines using a dotted pattern? I looked at stroke and fill fns, bit they don’t seem to allow that..

Eric Ervin01:08:32

I translated this from an example in java processing.

(defn dotted-line [x1 y1 x2 y2 dots]
  (doseq [i (range dots)]
    (let [x (q/lerp x1 x2 (/ i dots))
          y (q/lerp y1 y2 (/ i dots))]
        (q/point x y))))

kingcode01:08:51

@U9U0G3Q8Y Very nice - Thanks!

pleasetrythisathome20:08:36

hey there! i’m working on a immersive LED sculpture project using the amazing https://github.com/heronarts/LXStudio and i’m running into an issue. I’ve been able to use quil to run lxstudio successfully, but lxstudio uses a few callbacks that are usually defined in the main processing sketch, namely void initialize(final heronarts.lx.studio.LXStudio lx, heronarts.lx.studio.LXStudio.UI ui) and void onUIReady(heronarts.lx.studio.LXStudio lx, heronarts.lx.studio.LXStudio.UI ui). Does anyone know how might be able to extend quil to implement these methods?