Hacker News new | past | comments | ask | show | jobs | submit login
K-D Tree Art Generator (colab.research.google.com)
75 points by hyperific 3 months ago | hide | past | favorite | 24 comments



Geometric abstraction was advanced by Russian abstract painters from 1910-20 or so. Look for constructivism and supremism. They are much closer to what you are exploring than cubism. That early abstraction was looked down on after the Russian revolution because it didn't adhere to the new cultural programs. It gave way to social realism fairly quickly in Russia. Germans adopted it and Bauhaus was directly influenced by it. Cubism is actually an evolution of multiple perspective depiction. It wasn't so much about cubes and angles as showing top, down, left, etc all in the same image instead of just one perspective. Some think of it as a style that Picasso invented, but there were many influences that evolved over time and it wasn't just a style but a whole process. Many other painters of the time used a multi-perspective approach.


Despite how different this is, looking at the results at the bottom using the default parameters really gives me the feeling of some dungeon generators I've seen in the past. I'm sure it wouldn't be good when it came down to it, but it might be interesting to try and convert this to a dungeon generator.


> This notebook will generate randomized cubism artworks inspired by Piet Mondrian

Sorry to be pedantic. For people just discovering art from the early 20th century period, this fun project doesn't generate Cubist-style art. Cubism was a completely different genre. While Mondrian was inspired by Cubism in his earlier period, the art we think of when we think of Mondrian isn't Cubism by a long shot. Here's a good example of Cubism, Picasso's Girl with Mandolin:

https://www.pablopicasso.org/girl-with-mandolin.jsp#google_v...

And a side note. We nerds think we can generate Mondrians at will. Here's a "typical" Mondrian (he had many sub styles):

https://smarthistory.org/mondrian-composition-ii-in-red-blue...

There's even a programming language named Piet ostensibly designed to let you generate Mondrians. It has been featured here on HN:

https://www.dangermouse.net/esoteric/piet/samples.html

Notice the samples don't look anything like an actual Mondrian.


I remember an article (long since lost) where a student in a class on generative art chose to try recreate Mondrians, and what he and the teacher discovered was just how painterly the originals were, and it was very difficult to generate something that actually looked like a Mondrian.

I really ought to find that article again.


Thank you, I thought exactly the same when I read that sentence. For a moment I doubted my memory was faulting me, but your comment confirmed my mental sanity.


I'm guessing the author skimmed the Wikipedia entry.


Since we are discussing Mondrians in the context of trees, I thought I would mention "Mondrian Forest" [1]. Interesting but relatively unknown algorithm to construct random forests over online data.

[1] https://arxiv.org/abs/1406.2673


> Piet is a programming language in which programs look like abstract paintings.

sorry for being pedantic but you should delete the whole last section of your pedantic comment.


How dare you be pedantic about my pedantry


I prefer these derivations over the red blue and yellow


This could make for an interesting UI for exploring clusters in data. I only wish K-d trees could handle higher dimensions


You'll love this site :)

https://treevis.net/


What do you mean ? A K-d tree handles k dimensions. Generating a useful 2-D representation (=projection) of more dimensions is the hard part.


I remember reading that for k-d trees to be able to split on k dimensions the dataset needs to be > 2^k, which becomes unwieldy pretty quickly


… yes to the 2^k only because if not met, the performance devolves to a linear search. By themselves, k-d trees can handle any number of records.


yep, also i think while they could have issues with dataset sizes less than 2^k, it's interesting to note their use in accelerating clustering algos like dbscan. they do make neat visualizations though https://marimo.app/?slug=x5fa0x


For low dimensional (such as 2D) projections of high dimensional data, especially useful for visualization, take a look at UMAP - https://umap-learn.readthedocs.io/en/latest/


I can do the same with few lines in Processing.


Did you?


Cool story. Let's see it.


Wow, more geberative art please

I need to learn!


Well, .... I was expecting orange coloured art made from Kraft Dinner noodles. Disappointed to say the least.


As tomcam has already pointed out, Mondrian is in no way a Cubist.

I would also argue that the colours are nowhere near those of Mondrian. 'classic' Mondrian paintings feature a very exact and reduced aesthetic consisting only of pure applications of red, blue, yellow, white, black, and gray.

As an artist with a history of collaborating with computer engineers, I can say that Mondrian, Van Gogh and the post/impressionists seem to constitute the vast majority of artists who are used in projects like this (style transfer, non-photorealistic rendering, image generation etc). I can see the attraction: they are simple to conceptualize and have a fairly shallow tonal range, being largely defined by their colour and form. However, I would love to see more attention paid to artists like Rubens, Turner, Rembrandt etc.


Clicking leads to Google login screen. For sharing something, it’s probably better to generate some static content and link to that.




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

Search: