Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 25, 2022 11:13 am GMT

Code Art abstract artworks for your creations

Have you ever searched internet to find a cover for your post? I did! Artists created quite a few of beautiful images, but whenever I see a nice pic I may wish slightly different color, or font, or angle, or some other effect...

Is it possible to make a software generating artworks? Yes, and here is it!

https://code-art.pictures/

Using

  • Just open the app, or click and you get some random artwork
  • Do you need the file? No problem, click Download button and you have it
  • Do you want tweaking the image? There's a comprehensive menu under Options button. You may change size, font, color, angle and much other effects.

How does it work?

Glad you asked. Here's the repo. The app is powered by WebGL2 which I learned from WebGL2 Fundamentals. Just like for any other WebGL app, much of work is the preparation of the scene, and it contains several steps:

  • Rasterize textures
  • Generate several sets of scene parameters (font, angle, scroll position etc)
  • Estimate the expected pic fill ratio for each params set. I experimented a lot, and found out the more text visible on pic, the better
  • Of generated params set, pick one yielding the greatest fill ratio
  • Compute scene vertices
  • Upload the data to GPU, and render the scene

To render UI I use Svelte. To parse JS files I use Acorn JS in Web Worker.

Can I use images in my posts?

Of course! There are small watermarks in the image corners, please don't remove them, otherwise give explicit credit near the image, thank you.

Have anything to say?

You are welcome. Feel free to write a comment here or file an issue.


Original Link: https://dev.to/alekseiberezkin/code-art-abstract-artworks-for-your-creations-5c08

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To