2021 Alive and Mostly Well

Standing at the end of another year, I couldn’t have possibly imagined what this year would hold. I think I can safely and with absolute certainty say that this year has never been and will never be like any other. While my professional life continued to prosper, 2021 has been a year of immense personal sadness. I lost a parent during the course of my mandatory quarantine and had to grieve alone.

Day Two

I got approval to leave quarantine to attend the funeral. Singapore has a thing called visits on compassionate grounds, which requires a negative covid test and special arrangements to be escorted to the location. I won’t be able to hug anyone or touch anyone but I’ll be able to say goodbye. I pushed to be includedd in the ceremonies, which are usually only reserved for men, and I’m really happy that I get to do that.

Day One

Today was a really hard day. I lost the man who raised me. The man who was there for all my milestones. We didn’t always agree but he had a heart of gold and was always there for his family, his friends, his neighborhood, his community. Words can’t begin to express the immense grief I feel. The grief I feel as I process this loss alone from the confines of a hotel room 5 miles away, 3 days shy of being released from quarantine, devoid of the ability to hug and be hugged.

Playing With Shapes

Didn’t make a lot of progress today and decided to play around with shapes instead. Here’s a heart -> https://codepen.io/shortdiv/pen/zYxGQBm?editors=1010

Back to Primitives

Geometry is the basis for drawing any shape in ThreeJS. As I covered in earlier posts, geometry in ThreeJS consists of vertices and faces, which can be defined by hand in order to create custom geometry. Of course, this task of defining your own vertices and faces is ambitious and requires a firm understanding of how math works in ThreeJS—knowledge which I currently do not have. To keep things simple, ThreeJS offers default 3D shapes known as primitives so you don’t have to grok geometry to generate common shapes like spheres and cubes.

Curveball

Most shapes in ThreeJS and WebGL can be created using primitives many of which, you can use to create composite geometries, like this really neat christmas tree. Creating complex and unique geometries however takes effort and can be difficult to achieve by simply compositing, mutating and ”extruding” existing primitives in ThreeJS. A better approach, as I highlighted in a previous post, is to utilize the methods like Geometry in ThreeJS that give you the flexibility of defining vertices and faces for custom polyhedrons.

Walking at angles

Walking at angles When drawing in 3D and even in 2D, we rely on shapes to make up a larger geometry, which then go on to form a more complex scene. This may seem rather straightforward but to a machine the task of drawing shapes could not be more complicated. This is largely because most machines only know how to render triangles. Take the humble square. Ordinarily, a square is drawn from point to point around the perimeter of the square, so in the figure below we’d draw a square from 1 → 2 → 3 → 4.

A Cube in 3d

Because we’re starting from the basics, this week we’ll focus largely on shapes and rendering shapes to the screen. This task may seem trivial but I assure you there’s a lot happening to occupy a week’s worth of content. To keep things simple, we’ll create our 3D images using ThreeJS, a JS library that abstracts a lot of the complexities of WebGL so you can write graphics with the power of JavaScript!