Hacker News new | past | comments | ask | show | jobs | submit login
Lavalamp.app (lavalamp.app)
95 points by narco_snow on Nov 17, 2020 | hide | past | favorite | 32 comments



Finally a true random number generator available as a web app.



This seems more like metaballs than a lava lamp simulation. The balls interact before they touch.


Actually, these are blurred circles. Apparent when you set the "fuzziness" slider to zero.

Metaballs are different. They are essentially a visualization of electric or gravitational fields. For the traditional formula in 2D, each pixel is colored based on the weighed sum of the inverses of the distances to the center of each "ball".


Yep, metaballs. I'm planning on upgrading to the "double density relaxation" algorithm to make it more lava-y. I've never done that before, and the algorithm is pretty complex...

Here's a good example if you're interested. https://peeke.nl/simulating-blobs-of-fluid


This heats up the computer as well, just like the real thing!


Seems interesting, but the colour palette is just awful.


Yep, it uses the same trick as metaballs to cause the blobbing and sets the contrast really high. This makes the colors pretty weird... I started with a color picker but it was a pretty poor experience.


You can change the colors in the settings.


RGB sliders would have been better here. I find it quite difficult to use HSV without a visual color wheel.


The color picker is equally awful.


I made something similar, called PlasmaJS which you can view here: http://plasmajs.com


Cooooool



At first sight the thing which differs most from an actual lamp is that if two blobs collide they merge and then 'unmerge' only to continue with same shape and in in the same direction as before the collision. Takes away some of the magic, still: nice.


Yeah I had thought of making them stick together...

I'm going to upgrade it to use this algorithm in the future https://peeke.nl/simulating-blobs-of-fluid

Should be super neato then :)


A lot of people hating on this in the comments, but other than; yes, those absolutely God-awful default colours I’d say it’s pretty neat.


> God-awful default colours

The 1970s throwback wouldn't be complete without it.


Does anyone else have issues with the sliders?


They seem very sensitive on granularity of the slider (esp brightness), however the response of them effecting anything seems like the environment is bogged down drawing the window and ignoring slider input until it can catch its breath.


I'd like a slider to control viscosity/stringiness. It's a nice idea, but I agree the sliders need work.


Right now it's just using the metaball trick (high contrast and blur filters), so fuzziness is as close as that will get. A future version will have more realistic lava that correctly "blobs". I'll make sure and add sliders for those :)

Algorithm if you're interested. https://peeke.nl/simulating-blobs-of-fluid


Laval.app was too expensive I'm guessing


And .amp doesn't allow public registration.


Err... lavala.mp

*which of course is already taken


The default colors are pure torture and the HSV sliders don't function correctly.


You can use the share button to get a link to other colors. Personally, that gnarly green is my favorite color. Glad I got the chance to torture you.


Ah doesn’t work in my browser. Promise of the web in action


Does it actually not work or did you not give it enough time to warm up? It's a lava lamp!


I had to buy brakleen, candle wax, candle dye, distilled water, ethylene glycol, dish soap, food coloring, and a capping machine to fix mine. What a PITA. Old lava lamps bought off eBay. I should've just hit the refresh button and waited.


Vertically oscillating metaballs don't really look much like a lava lamp.


I mean... Kinda. Lol. Just enjoy the pretty colors and stop being a curmudgeon.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: