Ben's Blog

maple syrup, self sustainability ben March 24, 2017

Protected: Boiling day

This content is password-protected. To view it, please enter the password below.

I.T., web development ben March 20, 2017

Feature feature feature draw feature feature

Since the success of the Mandala maker, I’ve been pumping out a ton of features, improvements and bug fixes. They are too numerous to list but a few stand out.

  • Collaborative editing using websockets for drawing mandalas with multiple people on the same session.
  • Drawing without mandalas, there are only so many Mandalas one can collaboratively draw and so I created http://draw.akrin.com which leverages all the Mandalagaba goodness for drawing and removes the mandala specific layer.
  • Read only mode guided by artists who like to livestream their drawing, I created a read-only mode to the collaboration. This way, people can watch but not participate.
  • An iOS app was born
  • High resolution renders are possible for $2, the charge helps with server costs and makes it a bit fairer if one was going to make money using the tool.
  • Not visible but noteworthy nonetheless, an intricate server strategy was put in place to alleviate future waves, load balancing had to be built from scratch because of the collaboration layer.
  • many, many, many other little things 🙂

 

In terms of use, while the initial tsunami is dead, the project was picked up by artists and educators. I can’t post all all the pictures for privacy but I can’t tell you how awesome it feels to receive pictures like these:

Kids enjoying a Mandala making lab somewhere in China

19518702961134851451

 

 

 

Artist Peter Draws created more amazing work:

peterdraws

 

 

 

The mandala maker was deployed on big touch screens which turned it into a more social activity much like arcade games.

IMG_8010IMG_0485

 

 

 

Here’s draw.akrin.com: Click to pop out.

maple syrup, self sustainability ben March 18, 2017

No sap production for weeks, getting the bucket ready for better weather ahead.

The porcupine started exploring new paths, probably prompted by the warmer few days we had when we did the first round of sugaring. IMG_8282

IMG_8283

maple syrup, self sustainability ben February 28, 2017

Tough sugaring so far

Very tough sugaring so far, the weather isn’t cooperating. The conditions on the ground are horrible with ice and melting snow, you never know what will happen on the next step you take. Then you need to handle utensils in these conditions, next to a raging evaporator, glasses covered with steam, at night, by yourself. The potential is real for a freak accident that involves boiling, burning, impalement and maple syrup. We also had a wind storm which blew everything away but the cover on the evaporator thank god; a building around the evaporator will be very nice.

Some trees produce profuselyIMG_8205

The sap wagon
IMG_8204

Got stuck… had to shovel snow out from underneath the sap wagonIMG_8211

boiling awayIMG_8209

Hello fogginess my old friendIMG_8215IMG_8220

FuuuuuuuuuuuuuuuckIMG_8221

The reward: 1.5 gallons of unadulterated maple sweetnessIMG_8230

maple syrup, self sustainability ben February 21, 2017

The first collection

I got about 30 gallons of sap, handling  full time work and a homestead can be challenging, I finished at dusk. It is a great chore to end the day with, I just wish I could do things at a more leisurely pace.IMG_8191

maple syrup, self sustainability ben February 19, 2017

Maple sugaring, season 2

We are ramping up again for our second season of Maple sugaring. With perfect weather ahead:

Screen Shot 2017-02-17 at 8.54.26 AM

And based on a UVM study, I tend to prefer tapping early even with the chance of cold snaps as Winter & Spring figure out who the new boss is. Essentially from what I gather, you can’t tap too early but you can tap too late. I also really like the taste of early flow and the season is spread out in more manageable chunks of labor.

This sled is proving to be invaluableIMG_8163

The wife & kid are traveling but the neighbors are here to helpIMG_8165

Cleaning the tanks and buckets takes a long while, it’s amazing we did it last year without a well for water.IMG_8170

It takes a lot of work to get everything ready, we will apply a lot of lessons learned last year. I uncovered the evaporator and didn’t even have to kick out a raccoon.

I.T., web development ben February 04, 2017

HTML Canvas smooth drawing & websocket live collaboration

Intro

For a while I’ve been polishing a way to have not only a smooth drawing/writing algorithm for HTML Canvasses, but also have it be “streamed” over the network for live collaboration. While the work has been mostly integrated into projects such as Mandalagaba, here I present it in its most basic form so that it may be dissected.

Demo

Draw by dragging your mouse/finger/stylus bellow, fire up another browser to test network repeat. Canvas is used by others online (sorry for anything obsene the internet has left on it) and cleared every hour.

Quick start

  1. download & decompress html_canvas_smooth_writing.tar.gz
  2. if you don’t have it already, install NodeJS
  3. run the websocket server

    [code]node websocket_server.js[/code]

  4. edit index.html and replace all occurences of “ben.akrin.com”  by the host/ip which is running your websocket server. If you are testing on your computer, 127.0.0.1 will do. Alternatively, you can leave it set to “ben.akrin.com” and use my websocket server, in which case step 2 & 3 aren’t necessary, and you’ll have limited latitude as to how many changes you can implement. But it’s perfect for just trying & dissecting the code.
  5. navigate to index.html

(tested on Mac, Raspbian & Ubuntu)

Rendering Pen Strokes

The usual method

Drawing on an HTML Canvas is usually done by collecting coordinates at which “touch” is being detected and drawing straight lines in between. While this makes for a simple implementation with decent results it has multiple issues:

  • straight lines do not represent well the curvatures of human drawing & writing
  • the joins between lines of various orientations can add seams
  • these problems are exacerbated on devices which sample touch slowly, resulting in less coordinates to represent a pen stroke

Here is a classic example of what this looks like:

IMG_0196The quadratic curve method

To make drawing and writing smoother, we use quadratic curves to link our coordinates. Here’s a basic explanation of how it works:

you need 2 canvasses overlaid on top of each other (z-index is highly relevant here). The way it works is that the top canvas is the one that you draw on.
IMG_0197IMG_0198

The reason for this is that a pen stroke is getting redrawn entirely every time new coordinates come in. This is because with quadratic curving, the final shape of a stroke is never fully known until all coordinates are. So every time coordinates come in (mouse move event),  we clear the temp_canvas and redraw the whole stroke. The operation happens fast enough that it is invisible.

When you are finished with your stroke (mouse up event), the temp_canvas is cleared and the whole stroke is committed (redrawn) on the permanent canvas.

What it looks like with our quadratic curving algorithm:

IMG_0201

Network Streaming

Here is how we add network streaming to the pen strokes. Emitting your pen stroke to other clients is easy, you simply blast your current coordinates to a websocket which will repeat it to other clients. When you receive coordinates from other clients though, you can’t use temp_canvas to render them as it might conflict with your current drawing. To this effect we add yet another canvas between permanent_canvas and temp_canvas which will render network events.

IMG_0199IMG_0200

Much like temp_canvas, collaboration_canvas is meant for temporary rendering and when other clients finish their pen stroke (mouse up), the instruction to commit to the permanent canvas is sent through the websocket.

That’s it

It’s hard for me to document every step of the code; I don’t know your coding level, it’s asynchronous and has lots of bits & pieces which serve specific purposes. I hope however with the basic theory explained, and the code boiled down to its essentials, that you can dissect it easily. Feel free to use the comments section for questions.

self sustainability, wood ben February 01, 2017

Traveling Wood

With decent snow, a new chainsaw, a large sled and the recently discovered “tire splitting” technique, we’ve been amassing a large quantity of wood.

Here’s what getting it home looks like, I’ve been working on 4 poplars which domino’d onto one another during the last surprise wind storm.

[mejsvideo mp4=”http://ben.akrin.com/videos/traveling_wood.mp4″ ogg=”http://ben.akrin.com/videos/traveling_wood.mp4.ogv” webm=”http://ben.akrin.com/videos/traveling_wood.mp4.webm” poster=”http://ben.akrin.com/videos/traveling_wood.mp4.jpg” width=”640″ height=”360″]

The sled & ATV combo is also a great way to move children around.

[mejsvideo mp4=”http://ben.akrin.com/videos/traveling_breihus.mp4″ ogg=”http://ben.akrin.com/videos/traveling_breihus.mp4.ogv” webm=”http://ben.akrin.com/videos/traveling_breihus.mp4.webm” poster=”http://ben.akrin.com/videos/traveling_breihus.mp4.jpg” width=”640″ height=”360″]

nature encounters ben January 29, 2017

The porcupine's favorite tree

The porcupine breaks many twigs from the pine tree at the center of this picture. The tree was in the same state last year and there is a clear path where the bark is more worn. I wonder what’s special about this tree that the porcupine took a liking to it.

IMG_8057

nature encounters ben January 29, 2017

I spy a red fox

IMG_8047This picture doesn’t do justice to spectacle of a red fox moving against the white snow

Posts pagination

← Previous 1 … 72 73 74 … 119 Next →

Recent Posts

  • Red Shouldered Hawk
  • Protected: 2026 Fireflies
  • Gondola PlottyBot v2
  • Corkscrew Sounds a Mystery no Longer
  • Copper

Recent Comments

  1. ben on PlottyBot
  2. Selmo B on PlottyBot
  3. santry on Gondola PlottyBot v2
  4. santry on Built Me Another
  5. ben on Built Me Another

Archives

  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • March 2010
  • December 2009
  • October 2009
  • September 2009
  • August 2009
  • June 2009
  • May 2009

Categories

  • 3D modeling / printing
  • aesthetics
  • agriculture
  • AI
  • all out geekery
  • apiculture
  • apple
  • Books
  • building
  • canning
  • crochet
  • electronics
  • foraging
  • homestead automation
  • hunting
  • I.T.
  • Lego / Duplo
  • life in the U.S.
  • maniacal paranoia
  • maple syrup
  • miscellaneous
  • nature encounters
  • old vinyls
  • organs
  • plots
  • plotters
  • poultry
  • preserving
  • self sustainability
  • solar power
  • specular holography
  • trip to a new life
  • unix / linux
  • video games
  • water
  • web development
  • web games
  • wood
Theme by Bloompixel. Proudly Powered by WordPress