rh12503 / triangula

Generate high-quality triangulated and polygonal art from images.
MIT License
3.85k stars 123 forks source link

triangles with gradient #9

Open jadsongmatos opened 3 years ago

jadsongmatos commented 3 years ago

it would be possible to use overlapping triangles with gradient to get different results

rh12503 commented 3 years ago

Could you please elaborate on your desired effect? I'm trying to keep Triangula less bloated, so you might also want to consider using a vector editor (eg. Illustrator) instead if possible.

jadsongmatos commented 3 years ago

I made this demonstration of a triangle with gradient, where in the image on the left we have the test image converted to opaque triangles and in the image on the right we have the image of the test with gradient triangle

bitmap

here you have a demonstration done manually in inkscape

Screenshot_20210424_231057

I chose to do a test with a black and white image because I thought it would be easier to show a gradient in just one color channel

esferas-metalicas-01-1

rh12503 commented 3 years ago

Sorry about the late reply, I thought I'd already left one earlier!

I understand your desired effect now, but I don't think there is a way to easily implement it, as there are too many factors involved, for example the direction of the gradient and the colors.

The gradient effect option when exporting would probably be the closest thing you can get. Applying a Gaussian blur in an external editor could work too.

jadsongmatos commented 3 years ago

yes, I understand that it would be very complex, maybe an alternative to colors would be to analyze one channel at a time, varying only in intensity

rh12503 commented 3 years ago

There may be a way to do it, but I feel implementing it is beyond my current abilities.

I'll be happy to accept a PR from anyone who gets it working!