## 3 Passively Augmenting Mobile Devices
### Mobile 3d  
Mobile3D is an OpenScad library facilitating the design of mobile device augmentations. OpenScad is an open-source Computer Assisted Design (CAD) software using a high level functional programming language to specify the shape of any object. It supports fully parametric parts, permitting users to rapidly adapt geometries to the variety of devices available on the market.  
Mobile3D is organized in different files that are all based on a single library containing generic standard elements (basics.scad) ranging from simple useful shapes to more advanced augmentations such as the ones presented in the following sections. A series of device-specific files adapt the elements of basics.scad and are also available for the iPhone 5, 6, and 6 Plus and for the iPod Touch. For example, a generic horn usable as a passive amplifier for the built-in speaker of a mobile device can be simply created with the following call in OpenScad:  
include <basics.scad> SmallPassiveAmp(); To generate the same object specifically for the iPhone 5, the following code can be written:  
include <iPhone5.scad>iPhone5_SmallPassiveAmp();  
Finally, the shape of an object can be easily modified either by providing parameters as arguments to the corresponding function, or by overriding them globally before the function is called. If this approach is chosen, all the parts called in the OpenScad code will be updated, which can be very convenient in some cases. For example, the radius (expressed in millimeters here) of iPhone5_SmallPassiveAmp() can be modified locally by writing:  
include <iPhone5.scad>  
iPhone5_SmallPassiveAmp(hornRadius=40);  
or globally by writing:  
include <iPhone5.scad>  
iPhone5_SmallPassiveAmp_HornRadius = 40;  
iPhone5_SmallPassiveAmp();  
Mobile3D is based on two fundamental elements that can be used to quickly attach any prosthetic to the device: the top and bottom _holders_ (see Figure 4). They were designed to be 3D printed using elastomeric material such as _NinjaFlex\({}^{\circledR}\)_ ([[https://ninjatek.com](https://ninjatek.com)]([https://ninjatek.com](https://ninjatek.com))) in order to easily install and remove the device without damaging it. They also help reducing printing duration, which is often a major issue during prototyping. These two holders glued to a laser-cut plastic plate form a sturdy case, whereas completely printing this part would take much more time.  
Figure 4 presents an example of an iPhone 5 augmented with a passive amplifier. The bottom holder and the horn were printed separately and glued together, but they could also have been printed as one piece. In this example, the bottom and top holders were printed with PLA (PolyLactic Acid), which is a hard plastic, and they were mounted on the plate using Velcro\({}^{\circledR}\). This is an alternative solution to using _NinjaFlex\({}^{\circledR}\)_ that can be useful when augmenting the mobile device with large appendixes requiring a stronger support.  
The passive amplifier presented in Figure 4 was made by overriding the default parameters of the iPhone5_SmallPassiveAmp() function:  
include <lib/iPhone5.scad>  
iPhone5_SmallPassiveAmp_HornLength = 40;  
iPhone5_SmallPassiveAmp_HornRadius = 40;  
iPhone5_SmallPassiveAmp_HornDeformationFactor = 0.7;  
iPhone5_SmallPassiveAmp();  
An exhaustive list of all the elements available in Mobile3D can be found on the project webpage ([[https://ccrma.stanford.edu/~rmichon/mobile3D](https://ccrma.stanford.edu/~rmichon/mobile3D)]([https://ccrma.stanford.edu/~rmichon/mobile3D](https://ccrma.stanford.edu/~rmichon/mobile3D))).  
Figure 4: iPhone 5 augmented with a horn used as passive amplifier on its built-in speaker (instrument by [PERSON]).