Alok Menghrajani

Security engineer at Square. Previously co-author of Hack and put the 's' in https at Facebook. Maker of CTFs.

Home | Contact me | Github | Twitter | Facebook

I experimented with a novel way to combine code and bezier curves. The goal was to make 3d modeling easier, but there's probably a wide range of applications.

I started by thinking of a bezier curve as a function which takes a t parameter and returns a pair of coordinates (f(t) -> (x, y)). I then experiemented with combining bezier curves and code (I picked javascript, an arbitrary choice). For example, a curve could be used to specify a color, or rotation or scale transformation.

My vision for the whole code & curve manipulation is to feel like Bret Taylor's user interface (from "Inventing on Principle"). In order to get there, I implemented my own bezier curve editor, a CSG (constructive solid geometry) library and started working on a code editor.

I ran into some numerical stability issues, but some of my early results (I combined a chess piece profile with Square's logo) looked promising:

pawn | king | rook | bishop | queen


use your mouse to rotate the piece