For the third installment of YCAM's Guest Researcher Project, YCAM Interlab invited San Francisco-based design engineer Reza Ali, whose work explores visual spatial design, fluid user interfaces, software engineering and digital fabrication, to do a three month research and development residency from December 2015 to February 2016. Prior to Reza's stint at YCAM, Reza explored numerous generative and parametric approaches to designing / finding new forms and fabricating these forms during his Artist-in-Residency at Autodesk in 2014. Inspired by beautiful forms and influenced by online 3D printing model repositories like thingiverse and online co-design tools like Cell Cycle by Nervous System, and fueled by wanting to democratize 3D form design, decrease the barriers to entry and mitigate the challenges involved in designing for digital fabrication technologies. At YCAM, Reza extended his research and focused on creating web applications and interfaces that attempt to envision what the future of generative and parametric form (co)design could be like. Through this research, Reza developed eight javascript libraries to enable computational design applications in the browser and beyond. In addition, he created two applications (hello world, vase), that showcase how these libraries can be used together to create interfaces for exploring and co-designing form. As a whole, this work enables others to explore computational and generative approaches to designing form in ways that are immediate and visual. With theses libraries a designer can create a parametric form, that adheres to constraints like material properties and aesthetics, and expose the form's parameters for users to tweak for their needs. Thus enabling the creation of thousands of options. They can then share those designs with others for feedback and further customization. They are able to bypass the standard prototyping process, a slow task that demands time and patience. With more varietal possibilities, more time to iterate and an emphasis on real-time and collaborative feedback loops, we are able to rapidly prototype forms at a speed unlike we've ever experienced (especially with the advent of low cost, high speed, ubiquitous 3D printing).



The eight javascript libraries (cga.jslgp.jsmda.jsgaf.jsguf.jssps.jsnsc.jsmhf.js) were influenced by the Unix philosophy of minimalism and modularity. Thus they can be used separately or all together. Each library tackles a unique challenge involved in the creation, manipulation, visualization and exporting of 3D forms and 2D paths in a web application. These libraries aspire to bring computational & parametric modeling / design to the web. g-code generation, cnc machining, tool path generation, laser cutting paths, robotic motion planning, and more. The tutorial below showcases some of the libraries and how to use them: 

cga.js is a collection of basic computational geometry algorithms. A couple algorithms include the convex hull of points, line intersection, triangulation, and polygon expansion. It also contains many of the smaller algorithms found in Computational Geometry in C by Joseph O'Rourkecga.js aspires to be the mathematical mind that powers all types of complex geometry operations for geometric modeling and manipulation. 

mda.js, [half-edge] mesh data structure and algorithms, is a collection of java script classes that represent a half-edge mesh and functions that operate (smoothing, subdivide, extrude, etc) on the mesh and answer questions about the mesh's properties (queries, and integrity checks). mda.js aspires to be one of the core data structures that helps to enable modeling and manipulation of three dimensional shapes.

sps.js, super particle system, is a library for simulating particles and springs on the cpu. In addition to core elements, like particles, springs, angular springs, it provides extensible behaviors aka "forces" (vortex, attraction, homing, damping, etc), and physics solvers (Euler, Runge Kutta, and Verlet). sps.js aspires to be the particle simulation engine that enables all types of generative / computational design approaches. 

lgp.js, also known as lets get [3D/2D] printing, is a collection of functions dedicated to reading & writing popular 3D printing file formats (OBJ, STL). It also helps to write out images and SVG paths for laser etching and cutting. Easy file reading and writing is powered by lgp.js' file reader and writer and can be extended to export various other formats following the examples provide in the repository. 

guf.jsgeometry utility functions, is a small collection of functions that calculate geometric properties of a mesh. The key feature it currently provides is normal calculation (face & vertex normals). guf.js ultimately helps in the process of rendering meshes so you can see if your mesh's normals are normal and oriented properly. 

mhf.js is a collection of math helper functions. This small but useful library provides functions such as gaussian, map, clamp, and limit3. This library aspires to eventually be a collection of very useful math functions for generating noise, fall offs, distributions, etc.    

nsc.js, new shiny camera, is a minimal camera for viewing 3D objects in WebGL applications. This framework independent camera provides a very simple maya like camera for viewing objects. This library aspires to eventually be a collection of cameras for viewing and navigating space. 

gaf.js WebGL application framework is composed of an App class that helps create an environment like Processing, Openframeworks, Cinder so you can just override the setup and draw methods and get going without having to care too much about the HTML canvas or setting up a valid WebGL context or setting up a draw loop via requestAnimationFrame (which is used inside of gaf.js). gaf.js aspires to provide a flexible & modular internal app framework to help power all types of web apps.

The eight javascript libraries are open source projects licensed under the Apache License 2.0. You can download all the source code here or find them on npm

The main difference between the Apache License and well known MIT license is that Apache license has a provision which avoids patent risks (from enforcement of patent right by uses/contributors). Basically you can copy, edit, publish like MIT license, and you don’t have to publish source codes like GPL. for more information, please check: http://www.apache.org/licenses/LICENSE-2.0


Hello WorldVase are web applications, built using the eight libraries developed, that allow users to customize (co-design) forms, download them for 3D printing, and share their customized design. Both applications share a similar interface. The most important app buttons live on the top right corner of the page, these buttons toggle the application's options (form parameter user interface, download panel, the sharing popup and credits popup). Hello World and Vase each have unique form parameters but the other option menus are the same in both apps. These applications make it extremely simple to share and co-create because the form parameters are encoded in the app's URL as they are changed. This also allows a user to undo and redo by simply going back and forward in their browser. Lastly, once a form has been customized, it can be shared either though a the url, a short link, and / or Twitter, Pinterest and Facebook sharing buttons, which are built into the app for easy distribution (and future remixing) on these social channels. 

The Hello World app is a simple demo that makes a box, cup, plate, and / or a bowl. The box's dimensions and other properties can be set by tweaking the parameters exposed by the sliders in the UI. Furthermore, precise numbers for the box's parameters can be dialed in using the app's URL api (i.e. http://syedrezaali.com/apps/helloworld/?Width=1&Height=3&Depth=2.5...). In addition to a simple box, Hello World exposes the ability to generate smooth boxes, cups, bowls, and plates. Once the user has configured the form to their liking, they can click the download icon to show the download panel and select whether they want to download an OBJ or STL file for 3D printing. 


The Vase app allows for more complex form creation than the Hello World app. Specifically, this app enables the creation and exploration of faceted forms (vases, lamp shades, cups, glasses, bracelets, and rings). This application exemplifies how a current design trend / fad can be codified and parametrized by a designer and then further co-designed by users to fit their style and needs. Vase and Hello World are simple examples of what can be made using parametric modeling techniques and the libraries developed. There are tons of other form applications to be built and explored in this on-going research. 

Designer & Developer: Reza Ali
Output: 3D Prints & Web Apps & Javascript Libraries
Residency: YCAM Interlab GRP Vol3
Residency Coordinators: Keina Konno, Ito Takayuki Tsubasa Nishi,
YCAM Interlab Staff: Junji Nakaue, Tsubasa Nishi, Clarence Ng, Naoki Ise, Yohei Miura, 
Credit: Thank you YCAM for hosting me in Japan for three months. I had the time of my life exploring and researching. Also, I'd like to thank James George and Kyle McDonald for their input before and during the residency. Lastly, I'd like to thank all the YCAM Interlab staff for supporting my obsession and for making the residency experience warm and welcoming.  
Duration: 3 Months
Year: 2015/2016