r/generative • u/grimmeathookfuture • Nov 20 '18
Preferred tools?
Just curious what you all use. I got started with Processing, and like it well enough, but run into a number of issues with it.
- Language features / data structures. Some types of programming I find a bit clunkier and more verbose in Processing than say Python. For example, the other day I wanted to sort a list custom class objects based on distance to a point, and didn't really know how to do it in Processing concisely. Maybe I just need to figure out how to take advantage of the Java standard library better? (Is all of the Java standard library available in Processing?)
- Shareability. I know there are ways to make videos of processing sketches, but I like making interactive stuff. I used to use processing.js to share my Processing sketches via web pages, which was really convenient, but it seems like that project is deprecated now?
For #1, I'm most comfortable with Python, and I know there's processing.py, but it doesn't seem quite so well supported (similar to processing.js).
Should I switch over to p5.js? I'm not the biggest fan of Javascript as a language either, but it does at least solve #2, and maybe taking advantage libraries like lodash solves some of the issues with the language?
Do others have suggestions for completely different things to check out? I'm a lisp fan and dabbled with Clojure in the past, Quil also seems like an interesting option, though seems like a bit more work to get set up.
Thanks!
5
u/red_blue_yellow Artist Nov 21 '18
I use and love Quil. You're correct that it's more work to get set up, but it's totally worth it. This is a couple years old, but I wrote a guide to how I set up Quil and I have a small repo with utility functions.
For video, I generate frames with Quil, then combine them with ffmpeg.
Oh, and vi is an essential part of life.
2
u/MathAndMirth Nov 20 '18
I work with Python and the PyCairo and OpenCV libraries. I like the setup because I can use Cairo for the traditional drawing operations that Processing excels at, as well as Numpy/OpenCV for pixel-based operations, and even use both in the same program without much trouble. And with Numba for accelerating loops of numerical calculations, the performance can be good too. While I like the Processing API, I agree that relying on processing.py to be maintained for the long term seems dicey.
That being said, I'm making strictly 2D static images. If I wanted 3D or animation, I'd probably use p5.js or three.js. If you were thinking of using lodash to solve JavaScript language issues, you'll probably find the features of ES5/6/7, which have very good browser support now, to have fixed many of your issues with the language already.
2
u/[deleted] Nov 21 '18
Java, Eclipse, FFMPEG, Gimp
2
u/roxven Nov 21 '18
For 2D I use a Haskell Cairo setup I describe here.
For 3D I either write GLSL to raymarch, or generate scenes in my library immense and render with Cycles.
2
u/_Lycea_ Nov 23 '18
For me I like to use p5.js, I started off with the basic processing and didn't like the environments for it and the normal ide. Then I heard about the different port with scripting languages. Thats when I got at some point to p5.js and started to like it. I use it together with visual studio code and a view plugins to increase the usablilty, like a life reloading server that reloads as of when I make a change in a file, and it is really nice to see the changes directly. Also i use some plugins for processing and p5.js snippets that helps a lot. In my opinion p5.js has the andvantage of independency , you don't have to download anything or install anything to show it to someone and it is easy to implement in a web page.
The second alternative which I use for doodling animations is love2d (löve), this is not particullary a framwork for generative art but there are a lot of funktions to use for drawing and other base funktions and it works quite nice for the purpose.
As a bonus sometimes I use pico8 to try something out with limitations. It is a fantasy console and has 16 colors and an display size of 128x128 . But it is fun to try out something you did in a big tool on a small scale and see how it works there.
1
u/hellerve Nov 21 '18
I use mostly p5.js because it’s low to no hassle for me, which is especially important when I’m doodling or playing around with a new algorithm.
I’m also actively working on anima.carp, which is a Processing-like framework built on SDL2 (though I might switch the backend to Cairo). It’s written in Carp, a programming language that I co-maintain and love, so I’d like to get this to a more mature state very quickly. (I don’t want to give the full sales pitch, but if this intrigues you there’s a talk on YouTube where I livecode a demo and I wrote a blog post about the same piece; I nonetheless don’t suggest you switch to the framework because neither the framework nor the programming language are stable)
1
u/adicirstei Feb 09 '19
i recently found out about Clojure2D library. It alleviate a lot of pain points from quil.