Expensive Lines
Each artwork is created with svg lines by calling draw(artworkId, x1, y1, x2, y2, colorR, colorG, colorB).
Calling:
draw(artworkId, 5,125, 130,250, 16,185,129)
draw(artworkId, 5,5, 250,250, 147,197,253)
draw(artworkId, 130,5, 250,125, 59,130,246)
Would produce:
artworkId may be [0-3999]. All other values must be [0-255]. x and y coordinates use svg the viewbox so higher y is farther down; higher x is farther right. Lines are drawn with an svg stroke-width=10.
You can practice drawing here.
After 50 lines are drawn within an artwork (by you or anyone else), whoever drew the most lines may grant() the NFT to themselves.
There is a 4,000 artwork cap. All are drawn in parallel.
Call tokenURI(tokenId) to retrieve the NFT's svg. Clients, such as this one, are non-authoritative. All data lives on the blockchain.
The material costs of an artwork include all transaction fees (or optional ether) spent when calling draw().
Do material costs influence anything? I don't know. That's part of the experiment here. Nothing in the contract is influenced by material costs though.
A reminder: this is an unaudited contract. Use at your own risk. To participate, you will need to know how Ethereum works, how to run functions on a contract, and how to svg works. If you don't know these things, you can definitely learn. But I'd advise against using this until you do.
FAQ
Why did you make this?
I wanted to experiment with a new pattern for building things together. For example, with a similar approach, you could apply collective human ingenuity in place of many of the AI or randomly generated NFT projects we've seen so far. I'm also hoping to learn some things about "material costs" for digital art along the way. There are also a bunch of ways that desctruction could take over this experiment, and I want to see how creative projects fight those kinds of things. I'm interested in expanding on these concepts outside of art eventually.
How did you get the idea for this?
At restaurants with my kids, when we're waiting for our food, sometimes they give us crayons. We draw things together like this. Also I really loved r/place and Loot.
These lines aren't expensive enough. Can I make them more expensive?
Yes, you may send ether along with your calls to draw(). It increases the material cost that clients may read. However, it has no influence over the workings of the contract. I plan to use the proceeds for future web3 projects.
Why can't I draw dots or other shapes?
Dots get too expensive. I know these are expensive lines, but things get out of hand with dots and gas. Other shapes give too much power to an individual. Ex: you wipe out an entire artwork with one big square.
Will you launch this on another chain?
Probably not. The lines probably wouldn't be as expensive if I did. I'd love to hear about how it goes if you do.
How do I read the image of an artwork?
Call tokenURI(tokenId) decode:
Can I add a background color?
The svg is transparent, but you can add a background with individual lines. It'll take 26 to fill up the canvas. I experimented with adding a random background color based on the block hash, but in testing, it ended up looking bad more often than not.
Should I trust this client?
Sort of. It's the first client, but it's not authoritative and I'll post others here as I learn of them. The authority on the state and contents of all NFTs is the contract.
What if I run in to rate limits on my client?
Say hi in discord and and try running the client locally.
Why not fractional ownership for NFTs?
I'm really interested in exploring it, but it seems dramatically more complicated and the systems around it are less mature. If you know a lot about this, I'd love to chat.
Why aren't the material costs embedded in the NFT?
Transaction costs are not finalized until after a transaction completes, so the contract cannot read them. Also reading historical data from the blockchain from a contract is difficult.
How can I test what my line will look like before I send it?
Create a file, `test.svg` with:
And open it in your browser. Pay particular attention to your y coordinates.How do I see how many lines I've drawn in an artwork?
You may use the convenience function, linesBy(artworkId, address).
Where's the roadmap?
There isn't one. This is a one-time experiment.