[HN Gopher] Trianglify.io - Low Poly Pattern Generator ___________________________________________________________________ Trianglify.io - Low Poly Pattern Generator Author : sysadm1n Score : 210 points Date : 2022-09-18 14:21 UTC (8 hours ago) (HTM) web link (trianglify.io) (TXT) w3m dump (trianglify.io) | qrohlf wrote: | One thing that folks may find interesting about this project on a | technical level is that it's fully stateless including the | backend that's responsible for interacting with Stripe Checkout, | processing payments, and sending emails with receipts and links | to re-download patterns. | | The thing that makes that possible is that I'm using a seedable | PRNG for the pattern generation and have a custom serialization | format for all of the possible pattern parameters. This means | that any pattern can be represented by a single short string like | `w:1440!h:900!x:random!v:0.63!c:0.06!s:9gjk5s!f:sp!i:0.30` and | reproduced with 100% accuracy. | | That means instead of a database, I can just store the entire | purchased pattern directly within the Stripe transaction within | the `client_id` field using this compressed representation. Then | it's just a matter of reading it back from the Stripe API when I | get the "purchase completed" webhooks in order to build the | correct attachments and send the customer their assets via email. | This keeps my own service totally stateless & database-free, and | also has the very nice property of allowing me to quickly and | easily access the pattern by copy-pasting the client-id from the | Stripe dashboard if I ever need to grab it for customer service | reasons! | savolai wrote: | It says you can use the library on your website if the website | is open source. When does a WordPress website qualify as open | source, or not? Or is the talk about gplv3 just trying to scare | people because it's unclear to them what this requirement | actually means? | | Not criticizing your business model, just curious. Thanks for | the tool, liked the aesthetics. | mr-karan wrote: | Quite a cool approach. Although only one downside I see here is | that you're just relying on Stripe to let you access order | history? What if they don't let you access this data via APIs | for data older than a certain time period? Or is that not much | of a concern here? | josiahpeters wrote: | I know that people are beating you up over the price, but this | is great. | | 1. Someone could generate the same asset for themselves using | your open source library. Which is great for someone who has | time over budget. | | 2. You are providing value in your packaging of that time | savings. | | 3. You created a very cheap way to offer this using server less | and stateless. Props to you for making something that is | financially sustainable for a long time. | | Number 3 is the most interesting of the above. That's no easy | feat and I applaud you for it. | worldmerge wrote: | That's so cool!!! | swiftcoder wrote: | It's pretty, but there is an odd singularity when you scrub | between zero and non-zero variance. Is zero variance handled as a | special-case for some reason? | idiotsecant wrote: | zero variance is all copies of the same triangle tessellated | together. By definition a non-zero variance has to introduce | change in at least 1 triangle and in doing so has to | recalculate all connected triangles. It's hard to imagine how | there couldn't be a strange blip when transitioning from zero | to non-zero. | [deleted] | valtism wrote: | You can get this for free, along with a bunch of other cool | designs on https://coolbackgrounds.io/ | rcarmo wrote: | I used this to generate some two dozen wallpapers of various | color schemes that were on my desktops for _years_ (I still use | them on iPhone and iPad). Loved it, and also loved the result | since they were varied and interesting to look at without being | distracting. | | I now have a set of scripts that downloads the Bing wallpaper of | the day for Mac and Linux, and I like those as well, but | sometimes miss the gradients and ambiance these generated since | (in Windows at least) extrapolating the dominant color in those | photos for desktop theme highlights mostly results in... brown. | monkeydust wrote: | Nice, would like to see this type of interface for other | generative art algos. | [deleted] | KMnO4 wrote: | > Can I use the Trianglify javascript library on my website? | | > Yes, as long as your website is open-source and complies with | the terms of the GNU General Public License v3. If you're | interested in purchasing a commercial license for the Trianglify | javascript library, please get in touch. | | Bleh. This along with the $8 export fee makes me really tempted | to spend the 2 hours building out a similar library and webpage | and release it as MIT. | daxuak wrote: | Why does strip ask for canvas access in the demo? How is that | related? | mywacaday wrote: | I found that really visually pleasing, will be using it to make a | few screen savers. Great job! | [deleted] | swayvil wrote: | Nice. Passably pretty and tasteful. This could be useful. Do you | have a javascript random-generator version that I can plug into | my page? | qrohlf wrote: | Author here - interesting to see this pop up on HN again! | | Since there are a lot of questions in the comments that might be | answered by prior writing/discussions, here are a couple relevant | links: | | 0. Trianglify.io is a GUI for my GPL-licensed node library of the | same name, which is available for use in OSS projects for free: | https://qrohlf.com/trianglify/ | | 1. Trianglify (the library) first became popular because of an HN | post eight years ago. Discussion here: | https://news.ycombinator.com/item?id=7578002 | | 2. I've written a short Medium article on why Trianglify.io | exists and how I arrived at the current freemium/micropayments | model for monetizing it: https://medium.com/@qrohlf/i-sell- | triangles-on-the-internet-... | CompuIves wrote: | Thank you for creating this! I remember using this for the | header of my portfolio website before I got my first job. Happy | to see that it's still active, I hope that the monetization | model is working out well! | chrismorgan wrote: | > _micropayments_ | | I don't think it's reasonable to call $8 micropayments. Now if | you were selling the individual triangles _pro rata_ ... | MauranKilom wrote: | Without looking at the code, just playing with the sliders, | this is just: | | - Generate points on a grid, | | - perturb each one by a random (variance-scaled) vector, | | - compute Delaunay triangulation, | | - color each triangle by some function (pretty clear for | Gradient, the others I can't intuit) | | ...right? | | Not meant to diminish the work (it's clean and simple, nice | job!), just wondering how close I got. | martin_a wrote: | How much does it pay you monthly, if I may ask? | textninja wrote: | I am dying to know the answer to this. I can't get over the | fact people are paying $8 for downloads of randomized | triangles, but then again NFTs are a thing so I shouldn't be | too surprised. | martin_a wrote: | Honestly, I'd be totally cool if it pays some bills because | it fixes somebodies problem. I just wonder if projects this | small can really be monetized. | artemonster wrote: | Wait, no subscription and credit card required? | cedilla wrote: | Not even an Enterprise variant for unlocking LDAP/SSO | integration. | crisbal_ wrote: | Well, apparently there is. Just press export and you will find | it costs 8$. | cedilla wrote: | I didn't even notice, as you can just right-click and | download. It's also not mentioned in the FAQ, which just | states that "You own the copyright to any patterns produced | using this tool, just like you'd own the copyright to a | design you made using Photoshop or Illustrator." | | Soo... a hybrid of donation button and tax on people who | don't know about right-click - save image? | qrohlf wrote: | Basically, yes! Since the fundamental functionality is | powered by my (free) open-source library, trianglify.io is | a time-saving tool for those who want a quick GUI instead | of having to download and learn the npm library. | | It's part of a series of experiments that I've run on | monetizing open source, which you can read about in the | article I wrote a while back here: | https://medium.com/@qrohlf/i-sell-triangles-on-the- | internet-... | | That said, right-click > save as image is supposed to be | disabled on that particular DOM element, but I'm guessing | you probably have an extension or user-script that re- | enables it. Which is fine, you're probably not the target | audience for this! Trianglify.io is mostly used by | designers working on professional projects for whom $8 to | save 20-30min of tedious work in Illustrator is a very good | value proposition. | LukeShu wrote: | > That said, right-click > save as image is supposed to | be disabled on that particular DOM element, but I'm | guessing you probably have an extension or user-script | that re-enables it. | | FYI, even without an extension, you can bypass it being | disabled by holding down the shift key while right- | clicking (at least in Firefox). | dahart wrote: | > right-click > save as image is supposed to be disabled | on that particular DOM element | | Having done some of my own monetizing experiments, I was | surprised by how often people don't make any attempts to | circumvent what is written on the site. Text appeared to | be much stronger than efforts to prevent free service. | | Still, it's kinda funny to me if this works well enough | to make any sales. It's not possible to prevent download | of images you serve, there are several ways to save them | in all the major browsers without any plugins. Are you | serving the full size image?Intentionally? | cedilla wrote: | Well, I know what my designer colleagues pay for stock | backgrounds, so I agree that it's more than fair. | Wouldn't even raise an eyebrow. | | You're right, I do have an extension against common | annoyances. Totally forgot about it since I usually | screenshot anyways. | Retr0id wrote: | The Firefox "Allow Right-Click" addon remedies this | situation: https://addons.mozilla.org/en-GB/firefox/addon/re- | enable-rig... | edg-l wrote: | you don't need an extension, just press shift and right | click | lf-non wrote: | And if you want an svg, you can trace the bitmap with | inkscape. | mrstone wrote: | Looks nice, but $8 for a PNG? Come on. | usefulcat wrote: | Solution: don't buy it | tarr11 wrote: | Are you upset by the profit margin, or something else? | mrstone wrote: | I don't assess the value of an image of triangles to be $8. | That's all. | lelandfe wrote: | Kandinsky is in shambles | https://www.tallengestore.com/products/figurines-at-the- | grea... | nomel wrote: | For a quick sanity check, $12 is the cost of most 4K, | slightly older, full length, feature films. | yellow_lead wrote: | The code is open source here so im not sure why the export | costs $ https://github.com/qrohlf/trianglify | monsieurbanana wrote: | Hn: Open source devs, monetize your work while keeping it | open and free! | | OP: does that | | Hn: no not like that | duxup wrote: | IMO the price gets the attention. | mrstone wrote: | If it was like, $1 or something, I would be willing to buy | it. $8 is entirely too much. | crazygringo wrote: | What's your hourly rate as a designer, and how many | minutes would it take to put together all the triangles | in Illustrator? | | If you make more than $16/hr and it would take you 30 | minutes to put this together triangle-by-triangle, color- | swatch-by-color-swatch, then $8 is not too much, correct? | cinntaile wrote: | Not just that... If he has to do any kind of customer | support it rapidly becomes a money losing business at $1. | Looks like it wasn't worth it at $4 either. | dharma1 wrote: | Inflation | cedilla wrote: | It's less than a stock background costs, and less than | the work would cost to recreate it yourself. | yakshaving_jgt wrote: | If it were $1, you still wouldn't buy it. | | The customers who are this price sensitive are always the | worst. They're the most needy, and the most likely to | churn. | | When a contract is $50,000 all you ever hear from the | client is "Invoice paid. Thanks!". | idiotsecant wrote: | This is exactly the kind of sales model that helps everyone, | though. If this frustrates you then you aren't thinking about | it hard enough. The author offers the library that generates | these images for _free_ with a GPL license. If you are | interested in the end product but don 't want to / can't spend | 8 dollars you can build it yourself easily thanks to the work | the author did and released for _free_. If you 'd rather not | break out the IDE or can't then you can give the author a small | amount of money to do it for you. Everyone wins. There are no | losers in this situation. | diimdeep wrote: | It is really amazing what people take money for. | morphicpro wrote: | https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE... | Nekorosu wrote: | I felt a bit of irritation regarding the price at first, but | after giving it a second thought and understanding it was based | on OS lib, got okay with it. It sounds like a bold statement: | "Learn to program or pay." Like it! | mavu wrote: | This is very pretty! | Waterluvian wrote: | About 20 years ago when I got started with GIS in 9th grade, my | geography teacher told me about Color Brewer, this website to | help pick colour palettes for maps. I noticed that the last name | of one author was "Brewer." | | Your app has "colour brewer" as a label. | | Is this a coincidence? Did Brewer coin the name all those years | ago? Or does "colour brewer" predate or exist separately from | that website, such as, "brewing up some colours" or something? ___________________________________________________________________ (page generated 2022-09-18 23:00 UTC)