Little bit about me
I'm @kosamari on the internet pretty much everywhere except Myspace.
... and my favorite data type is Array
Array and Me
I like dealing with physical array like knit stitches on needle.
I make small programming language that spits out array to design knitting pattern...
Cat pattern by @hamishmurphy
GIF from Tumblr
...and turn those array into 0s and 1s to move knitting machine.
I also made D3 scarf !
Because of this, I got really interested in "print out" digital image as knitted fabric. In order to do this, I needed to learn how digital image is perceived by computers... turns out, it's also array of data.
Doing research was reading about a lot of math, & learning to use tools... I wonder, can I do all of this in a language I'm familiar (JavaSript) and a software I already use everyday (browser)?
The answer is YES, let's look at what we can do
What is Canvas
So, let's start with "what is Canvas?"
In order to talk to this canvas we created, we need to make something called
In other wards. creating canvas is like you are reserving piece of land, but you don't know where this land is located yet.
So, let's get coding, you can create canvas element like this, or write in your HTML and reference it
You might want to have this land in the city where there is a lot of skyscrapers and very 3d...
... or you might be putting vegetable garden in your back yard.
Talking to canvas
Now that we have context established, we can talk to canvas like draw shapes and fill with color.
We can even load picture into canvas.
There are all human understandable language to communicate with canvas...