The 7-digit counter is mind blowing, I'll add it to the list of examples!
Thank you!
1,152 karma · joined March 9, 2015
The 7-digit counter is mind blowing, I'll add it to the list of examples!
Thank you!
At least the exploit doesn't work until you start changing the code.
EDIT: Patched it by checking for backslashes and the word "constructor".
It is inspired by a project that I saw on HN a while ago. I wasn't able to find it again, so I made my own version. I swear, only after finishing Pulsar I managed to find https://tixy.land/ again.
As a bonus, I wanted to run these animations on my DIY LED frame. Check out the video:
https://github.com/Stanko/pulsar/tree/dev#led-retro-frame
Here are a few technical details:
It is built in TypeScript and open source. User code is executed in a web worker to minimize the risk of malicious use (tbh I'm proud of the solution, and I find it quite nifty). Initially, I used to render everything as an SVG, but in order to create GIFs for the LED frame, I switched to canvas. Not to mention that SVG gave me a few headaches which I'll cover in a blog post (if I ever write one). The syntax highlighter is a trick I found on Stack Overflow. The textarea is transparent, and as you type in it, I take the code, highlight and copy it into a div which overlays the textarea.
It was really fun to build and I hope you had some fun playing with it.
I made it around last new year's eve, so here is a simple animation of a Christmas tree:
https://muffinman.io/pulsar/?grid=classic&animate=both&code=...
Videos:
https://raw.githubusercontent.com/Stanko/retro-frame/dev/ret...
https://raw.githubusercontent.com/Stanko/retro-frame/dev/ret...
I wanted something that has a feel of an art object and sits on the shelf, rather than being a smart object that you can control with an app.
The whole thing is open source and you can make it yourself:
https://github.com/Stanko/retro-frame
Disclaimer - This was my first ever python project and I just made it work. ATM a friend of mine is helping me refactor everything. Repo also needs images of a new wooden frame I made.
Edit: Formatting.
Fun story, while we were in high school, my friend's computer broke down. All of his music was on it, so I borrowed him a bunch of CDs. He really liked Zappa's "Strictly Commercial" compilation and he became obsessed. Fast forward a couple of years and he is the one sending me Zappa's bootlegs and weird recordings which I would probably never heard otherwise. He even created a compilation for me, which he named "Almost Commercial" and I cherish it dearly :)
And thanks for the video, they sound really good!
I'm proud of my scribbles and the whole process, but I didn't expect the post would explode on HN. It really made my day.
I've been writing for a while now. Mostly front-end development, random experiments and creative coding.
My most popular post that was on the first page of HN earlier this year: https://muffinman.io/blog/draw-svg-rope-using-javascript/
I'm pretty proud of my generative, pen plotted drawings: https://muffinman.io/art/
And one of my favorites: https://muffinman.io/blog/breaking-down-krypton/
Edit: Typo.
I started drawing with code a couple of years ago, and I absolutely love everything about it. It brought fun back into programming for me.
Since then, I try to get more people into it. My main argument is that it isn't as hard as it looks like. Often code will be pretty simple and straight-forward but result in visually pleasing images. That's why I wrote a few of these posts [1] and had a talk or two about my drawings.
I'll be happy to answer any questions.
[1] https://muffinman.io/archive/#generative
EDIT: Typos
edit: typo
Plotting is the reason I always try to generate vector images. I'll probably try to plot a drawing with these ropes. But I would like to add some kind of shading and to figure out how to tie knots.
EDIT: Fixed it, thanks again!
P.S. Unfortunately I had some bad experiences with leaving contact info public.
I've kept the interactive image short on purpose, so it doesn't cover too much content. Then I tried to squeeze as much movement in that short area.
I may go back and update examples a little bit.
Woah! This kinda exploded, thank you so much for the kind words!
Lately, I'm trying to add more interactivity to my posts. Mainly inspired by amazing work of Bartosz Ciechanowski [1].
I started drawing with code a few years ago and completely fell in love with it. Problems like this one scratch my itch for creative programming.
I hope some of my posts will inspire people to try making pictures using code, just for the sake of it. Programming should be fun :)
edit: typos
It seems great and way more user friendly than what I have. I might steal your code for the next iteration.
I'll write a proper readme and make my repo public today.
EDIT: Here it is: https://github.com/Stanko/retro-frame
Diffuser also makes a difference as the controller I'm using doesn't allow me to control the brightness. I should really write a blog post :D
I'm lazy, but I plan to do the full write up and to open source everything. I use it to display pixel art, and during the night it automatically switches to the clock mode.
I love yours as well and it would be great if you can put the code on GitHub. Mine is using ESP32 as well (Adafruit's MatrixPortal M4). It is running Circuit Python though. I love it dearly and I played with an idea of making it as a product.
My longest living website of any kind. Technical blog, mostly frontend and javascript, but recently I created a section for my generative, pen plotted art.
It is made with Zola and deployed on GitHub Pages. Design is my own, I think the fourth iteration.
I fell in love with generative art this year, and it became my favorite thing to do. Neon is the first presentable thing I made.
I wrote a short post how to set it up on heroku to avoid GitHub quotas problem: https://muffinman.io/running-staticman-on-heroku/
I would love to share one small, rather personal project of mine - it is a web adaptation of the book my brother wrote, using authentic letters our father sent us while being stuck in Sarajevo during the war in the nineties.
Thank you!
Please note that "Low Poly" mode is on by default - it improves performance and allows you to see changes in realtime. When you are satisfied with the results, you can switch it on to download smoother image.
As you play with parameters, unique URL will be generatred for easy sharing.
Any feedback is welcome! <3
The output are vector images which I plan to pen plot (I ordered AxiDraw plotter) and make them available on my site.
For those interested in how it works, I wrote a blog post: https://muffinman.io/metaballs-generative-art/
Cheers!
As for how it works, I plan to do a full write up on my blog. But I'll give you a short summary.
- I generate a random vector field (https://en.wikipedia.org/wiki/Vector_field). It is not completely random, I pull them all slightly to the right, as chaos is rarely visually pleasing.
- Then I generate random starting point for each line.
- For each point, I find all vectors in certain radius, and apply their force to the dot. The further away the vector is, the weaker force applies to the point. This will give me next point.
- I repeat the process for the new point, until line is out of bounds or line reaches length of 100 point.
- Now line looks like a array of points (x, y coordinate pairs). Using these points, I draw smooth bezier curve.
That sums it up I think. The whole thing has some random aspects, params controlled by the user and some I tweaked how I like them to give what I think is visually pleasing. Try enabling debug mode and playing with controls.
This codepen is my initial exploration, the code is very similar to the final think and it might be easier to understand.
https://codepen.io/stanko/pen/rNavBvN
EDIT: Formatting.
Honestly, I really like "neon" color chaos. But it shouldn't be too hard to change. If you want to try it locally, you only need to change few lines responsible for color generation:
https://github.com/Stanko/neon/blob/master/src/utils/generat...
"rng" property is a seeded random generator you can use instead of Math.random
I'll add a short section in readme about running it locally.