Ask HN: What do you use for programmatic drawing?
But what do you personally do, when you need a quick program that needs to draw some arbitrary graphics?
What languages and libraries do you use to draw something quick to see it, save it or animate it without a hassle?
[+] [-] susam|4 years ago|reply
LaTeX PGF/TikZ for complicated diagrams.
Lines and boxes drawn with ASCII symbols (e.g., +, -, |, <, >, ^, v, /, \, ', `, etc.) using Emacs for very simple diagrams.
PGF/TikZ has considerable learning curve, so it may seem like a hassle in the initial days of learning to use it. But after mastering it once, one can unlock a lot of power and flexibility that comes with it. The PGF/TikZ manual at http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf is really worth seeing. This manual, which is itself designed using PGF/TikZ, is a masterpiece!
[+] [-] kaycebasques|4 years ago|reply
[1] https://docs.corrily.com/docs/price-optimization-overview
[+] [-] ai_ia|4 years ago|reply
[+] [-] truly|4 years ago|reply
It works well enough for animations.
There are two versions: 3b1b and the community edition. You will most likely prefer the community edition.
Here is the quickstart tutorial:
https://docs.manim.community/en/stable/tutorials/quickstart....
[+] [-] cpach|4 years ago|reply
http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/pic.html
[+] [-] scotty79|4 years ago|reply
I could probably make Python script that generates Pic file and run it through Pic to generate the image but it won't work for any animations and I'd need another piece of software to display the graphic.
[+] [-] dkersten|4 years ago|reply
[+] [-] truly|4 years ago|reply
However, I am also on the lookout for a good programmatic graphics editor. I am thinking of developing my own, but time is an issue.
I have successfully also used Python libraries like this one to create some graphics:
https://pypi.org/project/svgwrite/
[+] [-] tmaly|4 years ago|reply
For Scratch, the pen tool extension works really well. I was just doing a demo on this for an elementary class the other day.
[+] [-] scotty79|4 years ago|reply
Is there a libraray that uses pyglet giving it the drawing interface more limilar to what other 2d APIs offer? Like the one suppoted by HTML Canvas tag?
EDIT:
Never mind. I just noticed pyglet.shapes offers something more palatable than OpenGL. :-)
and doing stuff is pretty clean:
[+] [-] scotty79|4 years ago|reply
I had multiple issues with pyglet with high monitor refresh rate, HDR and refresh rate mysteriously slowing down after I dragged the window around. While pygame works flawlessly.
[+] [-] slopdo|4 years ago|reply
https://processing.org/examples
[+] [-] zzo38computer|4 years ago|reply
[+] [-] jiehong|4 years ago|reply
[0]: https://p5js.org/
[+] [-] dummy_physicist|4 years ago|reply
[+] [-] scotty79|4 years ago|reply
But for arbitrary graphics I have no idea. I usually end up just launching Visual Studio, create new WinForms application and placing PictureBox component with empty bitmap or draw directly in OnPaint method of the Form.
[+] [-] tomjen3|4 years ago|reply