Commit 37c30e5a by Ben

Submitting website and changing directory structure

parent c2a3f285
baseHeight=2;
airChannelHeight=2;
restHeight=1;
chamberHeight=2;
clipHeight=2;
wallThickness = 2;
cameraPCBLength = 18.5;
cameraConnectorLength = 2.4;
cameraHeadLength = 5;
mountHole1DistanceFromRear=3;
mountHole2DistanceFromRear=13;
mountLength = 17;
pcbSlopeAngle = 10;
cameraHeadAngle = 85;
$fn = 100;
precision = 2;
function sideHeight() = baseHeight + airChannelHeight + restHeight + chamberHeight + clipHeight;
function mountHeight() = baseHeight + tan(pcbSlopeAngle) * mountLength;
function cameraHeadTowerHeight() = (sin(cameraHeadAngle)*cameraHeadLength)+mountHeight();
function cameraHeadTowerWidth() = (cos(cameraHeadAngle)*cameraHeadLength)+wallThickness;
module precision(){
translate([-precision/2,0,0]){
children();
}
}
module sidePCB(side){
union(){
difference(){
cube([wallThickness,mountLength,mountHeight()]);
translate([0,0,baseHeight]){
rotate([pcbSlopeAngle,0,0]){
precision(){
cube([2+precision,25,mountHeight()]);
}
}
}
}
translate([side,2,baseHeight-0.5]){
rotate([pcbSlopeAngle,0,0]){
cube([0.5,15,2]);
}
}
}
}
module sideCameraHead(){
difference(){
cube([wallThickness,cameraHeadTowerWidth(),cameraHeadTowerHeight()]);
translate([0,0,mountHeight()+wallThickness]){
rotate([cameraHeadAngle,0,0]){
precision(){
cube([2+precision,5,5]);
}
}
}
}
}
module sideSection(side){
union(){
sidePCB(side);
translate([0,mountLength,0]){
sideCameraHead();
}
}
}
module basePlate(){
difference(){
translate([-wallThickness*2.5,0,0]){
cube([wallThickness*6,mountLength+cameraHeadTowerWidth(),wallThickness]);
}
/*
translate([wallThickness/2,mountLength+cameraHeadTowerWidth()-mountHole1DistanceFromRear,-1]){
cylinder(6,1);
}
translate([wallThickness/2,mountLength+cameraHeadTowerWidth()-mountHole2DistanceFromRear,-1]){
cylinder(6,1);
}
*/
translate([wallThickness*2.5-0.3,mountHole1DistanceFromRear,-1]){
cube([2.4,2.4,4]);
}
translate([wallThickness*2.5-0.3,mountHole2DistanceFromRear,-1]){
cube([2.4,2.4,4]);
}
translate([-wallThickness*2.5-0.3,mountHole1DistanceFromRear,-1]){
cube([2.4,2.4,4]);
}
/*
translate([-wallThickness*2.5-0.1,mountHole2DistanceFromRear,-1]){
cube([2,2,4]);
}*/
}
}
module installationPins(){
translate([wallThickness*6-2+0.1,mountHole1DistanceFromRear,18]){
cube([1.9,1.9,4]);
}
translate([wallThickness*6-2+0.1,mountHole2DistanceFromRear,18]){
cube([1.9,1.9,4]);
}
translate([0,mountHole1DistanceFromRear,18]){
cube([1.9,1.9,4]);
}
}
module installationHelper(){
union(){
cube([wallThickness*6,mountLength+cameraHeadTowerWidth(),20]);
installationPins();
/*
translate([0,mountHole2DistanceFromRear,18]){
cube([2,2,4]);
}
*/
}
}
module cameraHolderAssembly(){
difference(){
union(){
for (i=[-1.2,1.2]){
translate([i*wallThickness,0,0]){
sideSection(-0.25+(1+i*0.62));
}
}
basePlate();
}
//I could put an indentation in for the camera head!
translate([wallThickness,mountLength+1,mountHeight()+wallThickness+0.5]){
rotate([cameraHeadAngle,0,0]){
precision(){
cylinder(6,2.4,2.4);
}
}
}
}
}
module clip(direction){
rotate([90,0,direction]){
polygon([[0,0],[0.5,0],[0.5,6],[-0.5,4],[0,3.5]]);
}
}
//cameraHolderAssembly();
/*
translate([-20,0,0]){
cameraHolderAssembly();
}
*/
//import("/Users/bensenior/Downloads/wwgc_manufacturers_kit_v2.2/Google Cardboard IO 2015 Technical Drawings/Viewer - Body.dxf");
use<CameraHolder.scad>;
//TODO : Animation exposes a "denk fehler" with centering the objects. Don't do this. May require a rethink! Try setting $t=0!
//We shouldn't have started on the face, but on the furthest tip... perhaps not have used center either... use same transitions for folding as for not folding, but try to figure out how to fold around the pivot. Basically, the recursive nature of the system should mean that everything beyond each fold is also moved as a sheet, and it continually curls up one fold at a time (unless we have multiple at a level, e.g. to start folding the camera cable chamber early).
//What will come out of this will be an instructional video,
//...where I just have to put a voice over onto it, and perhaps, some camera zoom positions.
//cardboard depth
cDepth=1;
unitWidth=135; //Change me to make the headset wider
unitHeight=75;
unitDepth=30; //Change me to win more room for camera length/hub width
topHollowDepth=10; //Change me for more height to house usb hub and connectors
perforationWidth=3;
perforationHeight=0.3;
bottomHollowDepth=12; //Change me to make room for more cable bend
pd=64;
cableHoleRadius=4;
cameraSlitWidth=1;
cameraSlitLength=8;
cableChannelWidth=15;
noseFactor=7;
IRledHoleRadius=1.5;
cableOutHoleRadius=5;
folded = false;
$t = 1 ;
$fn = 100;
mountHole1DistanceFromRear=3;
mountHole2DistanceFromRear=13;
/*
colour1="red";
colour2="green";
colour3="yellow";
colour4="pink";
*/
colour1="cyan";
colour2="cyan";
colour3="cyan";
colour4="cyan";
module perforation(){
square([perforationWidth,0.3]);
}
module perforatedLine(adjust){
//Interleave perforations
n = floor(unitWidth/perforationWidth)-2;
translate([(-unitWidth/2)+adjust[0]+perforationWidth,0+adjust[1],0+adjust[2]]){
for (i = [0:2:n-1]){
translate([perforationWidth*i,0]){
perforation();
}
}
}
}
module f1(){
color(colour1){
difference(){
square([unitWidth,unitHeight],center=true);
for (i=[-1,1]){
translate([i*unitHeight/3,0,0]){
circle(unitHeight/2.6);
}
}
mark("f1",-1);
}
}
}
module t1(){
color(colour2){
difference(){
square([unitWidth,unitDepth],center=true);
translate([unitWidth/2-unitDepth/2-5,0,0]){
circle(cableOutHoleRadius);
}
rotate([0,180,0]){
translate([-30,0,0]){
mark("t1 - EyeSkills.org",side=1);
}
}
}
}
}
module t2(){
color(colour3){
difference(){
square([unitWidth,topHollowDepth],center=true);
mark("t2");
}
}
}
module t3(){
color(colour1){
difference(){
square([unitWidth,unitDepth-cDepth*2],center=true);
//cable channel
translate([unitWidth/2+cDepth-cableChannelWidth,topHollowDepth/2-cableChannelWidth/2+cDepth+cDepth,0]){
square([cableChannelWidth,cableChannelWidth]);
}
circle(IRledHoleRadius);
mark("t3",-1);
}
}
}
module t4(){
color(colour2){
difference(){
square([unitWidth,topHollowDepth],center=true);
mark("t4");
}
}
}
module b1(){
color(colour3){
difference(){
square([unitWidth,unitDepth],center=true);
polygon([
[10,unitDepth/2-10],
[unitWidth/noseFactor,-unitDepth/2-cDepth],
[-unitWidth/noseFactor,-unitDepth/2-cDepth],
[-10,unitDepth/2-10]
]);
mark("b1");
}
}
}
module b2(){
color(colour4){
difference(){
square([unitWidth,bottomHollowDepth],center=true);
polygon([ [unitWidth/noseFactor,-bottomHollowDepth],
[-unitWidth/noseFactor,-bottomHollowDepth],
[-unitWidth/noseFactor,bottomHollowDepth],
[unitWidth/noseFactor,bottomHollowDepth]
]);
mark("b2");
}
}
}
module b3(){
color(colour1){
difference(){
square([unitWidth,unitDepth-cDepth*2],center=true);
for (i=[-1,1]){
translate([i*pd/2,+unitDepth/2-cableHoleRadius,0]){
circle(cableHoleRadius);
}
//TODO: load the mountHoldDistance values from the actual mount holder file
/*
translate([i*pd/2,-unitDepth/2+cDepth+mountHole2DistanceFromRear,0]){
circle(cameraSlitWidth);
}
translate([i*pd/2,-unitDepth/2+cDepth+mountHole1DistanceFromRear,0]){
circle(cameraSlitWidth);
}
*/
}
//Nose
polygon([
[10,-unitDepth/2+10],
[unitWidth/noseFactor,unitDepth/2],
[-unitWidth/noseFactor,unitDepth/2],
[-10,-unitDepth/2+10]
]);
//cable channel
translate([unitWidth/2+cDepth-cableChannelWidth,-bottomHollowDepth/2-cableChannelWidth/2-cDepth,0]){
square([cableChannelWidth,cableChannelWidth]);
}
projection(){
translate([pd/2+6,(unitDepth/2)-9,-20]){
rotate([0,0,180]){
installationPins();
}
}
translate([-1*pd/2+6,(unitDepth/2)-9,-20]){
rotate([0,0,180]){
installationPins();
}
}
}
mark("b3",-1);
}
}
}
module b4(){
color(colour2){
difference(){
square([unitWidth,bottomHollowDepth-cDepth],center=true);
mark("b4");
}
}
}
module s1(){
color(colour3){
square([unitHeight-topHollowDepth-bottomHollowDepth,cableChannelWidth]);
}
}
module nf(){
//Nose fold 1
color(colour4){
translate([-unitWidth/noseFactor/2,0,0]){
square([unitWidth/noseFactor,10]);
}
}
//Nose fold 2
//translate([-unitWidth/noseFactor/2,0,0]){
// square([unitWidth/noseFactor,10]);
//}
}
module mark(t,side=-1){
translate([side*unitWidth/2.2,0]) {
text(t,unitDepth/10);
}
}
module reposition(folded=false,translate1,translate2,direction){
let (fold=(!folded)?[0,+translate1+translate2,0]:[0,translate1,direction*translate2],
r=(!folded)?[0,0,0]:[direction*90*$t,0,0]){
translate(fold){
rotate(r){
//Only want the difference of the perforation with the first child
for ( i = [0:1:$children-1] ){
if (i==0){
difference(){
children(i);
perforatedLine([0,direction*-translate2,0]);
}
} else {
children(i);
}
}
}
}
}
}
//The flattened view
module foldIt(folded){
difference(){
f1();
perforatedLine([0,-unitHeight/2,0]);
}
//Need to add perforation (1mm)
reposition(folded,unitHeight/2,unitDepth/2,1){
t1();
reposition(folded,unitDepth/2,topHollowDepth/2,1){
t2();
reposition(folded,topHollowDepth/2,(unitDepth-cDepth*2)/2,1){
t3();
reposition(folded,unitDepth/2-cDepth,topHollowDepth/2,1){
t4();
}
}
}
}
reposition(folded,-unitHeight/2,-unitDepth/2,-1){
b1();
reposition(folded,-unitDepth/2,-bottomHollowDepth/2,-1){
b2();
reposition(folded,-bottomHollowDepth/2,-(unitDepth-cDepth*2)/2,-1){
b3();
reposition(folded,-unitDepth/2+10,0,1){
nf();
reposition(folded,perforationHeight+(unitWidth/noseFactor)/2,0,1){
nf();
reposition(folded,perforationHeight+(unitWidth/noseFactor)/2,0,1){
nf();
}
}
}
reposition(folded,-(unitDepth-cDepth*3)/2,-bottomHollowDepth/2,-1){ b4();
}
}
}
}
translate([unitWidth/2,unitHeight/2-bottomHollowDepth+cDepth*2,0]){
rotate([0,0,270]){
reposition(folded,0,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
reposition(folded,cableChannelWidth,0,1){
s1();
}
}
}
}
}
}
}
//The folded view
/*
foldIt(true);
translate([-250,0,0]){
foldIt(false);
}
*/
use<CameraHolder.scad>;
use<CardboardCore.scad>;
use<lensRemovalTool.scad>;
use<InstallationHelper.scad>;
//These are the mounting units for holding the camera in place to look back at the eyes
translate ([-26,0,0]) cameraHolderAssembly();
translate ([26,0,0]) cameraHolderAssembly();
//This is a simple tool you can poke through the cardboard, which helps align the mounting units perfectly and reliably for glueing. It can be screwed down to a desk.
translate ([-8,40,0]) cameraHolder();
//This is a simple tool to help you screw the lens off tiny endoscopic cameras. Modify to fit your lens size.
translate ([0,70,0]) lensRemovalTool();
//This is the cardboard core which you can laser cut and fold
translate([-140,120,0]){
foldIt(false);
}
//If you want to see how it looks when folded, just uncomment this line
translate([140,50,0]){
foldIt(true);
}
include <CameraHolder.scad>;
module cameraHolder(){
difference(){
union(){
translate([wallThickness*3.5,-mountLength/3,0]){
cube([86,20,3],center=true);
}
translate([-32,-15,-18.5]){
installationPins();
}
translate([32,-15,-18.5]){
installationPins();
}
}
translate([-wallThickness*4.5,-6,0]){
cylinder(3.2,1,3,center=true);
}
translate([+wallThickness*4.5*2,-6,0]){
cylinder(3.2,1,3,center=true);
}
}
}
cameraHolder();
\ No newline at end of file
module lensRemovalTool(){
difference(){
cube([40,20,2],true);
cube([4.2,4.2,4],true);
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
Paradigm Shift by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
Say hello to Paradigm Shift, my first addition to HTML5 UP in more than a year (!!!).
Took things in a slightly different direction with this one, partly to mess with CSS
grid (which this one relies on pretty heavily) but mostly to get back to making weirder
and more experimental designs/layouts. Anyway, hope you dig it, and thanks for the
continued support despite the lack of updates :)
Demo images* courtesy of Unsplash, a radtastic collection of CC0 (public domain) images
you can use for pretty much whatever.
(* = not included)
AJ
aj@lkn.io | @ajlkn
Credits:
Demo Images:
Unsplash (unsplash.com)
Icons:
Font Awesome (fontawesome.io)
Other:
jQuery (jquery.com)
Responsive Tools (github.com/ajlkn/responsive-tools)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/* breakpoints.js v1.0 | @ajlkn | MIT licensed */
var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e<t.events.length;e++)n=t.events[e],t.active(n.query)?n.state||(n.state=!0,n.handler()):n.state&&(n.state=!1)}};return e._=t,e.on=function(e,n){t.on(e,n)},e.active=function(e){return t.active(e)},e}();!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.breakpoints=t()}(this,function(){return breakpoints});
/* browser.js v1.0 | @ajlkn | MIT licensed */
var browser=function(){"use strict";var e={name:null,version:null,os:null,osVersion:null,touch:null,mobile:null,_canUse:null,canUse:function(n){e._canUse||(e._canUse=document.createElement("div"));var o=e._canUse.style,r=n.charAt(0).toUpperCase()+n.slice(1);return n in o||"Moz"+r in o||"Webkit"+r in o||"O"+r in o||"ms"+r in o},init:function(){var n,o,r,i,t=navigator.userAgent;for(n="other",o=0,r=[["firefox",/Firefox\/([0-9\.]+)/],["bb",/BlackBerry.+Version\/([0-9\.]+)/],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/],["opera",/OPR\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)/],["edge",/Edge\/([0-9\.]+)/],["safari",/Version\/([0-9\.]+).+Safari/],["chrome",/Chrome\/([0-9\.]+)/],["ie",/MSIE ([0-9]+)/],["ie",/Trident\/.+rv:([0-9]+)/]],i=0;i<r.length;i++)if(t.match(r[i][1])){n=r[i][0],o=parseFloat(RegExp.$1);break}for(e.name=n,e.version=o,n="other",o=0,r=[["ios",/([0-9_]+) like Mac OS X/,function(e){return e.replace("_",".").replace("_","")}],["ios",/CPU like Mac OS X/,function(e){return 0}],["wp",/Windows Phone ([0-9\.]+)/,null],["android",/Android ([0-9\.]+)/,null],["mac",/Macintosh.+Mac OS X ([0-9_]+)/,function(e){return e.replace("_",".").replace("_","")}],["windows",/Windows NT ([0-9\.]+)/,null],["bb",/BlackBerry.+Version\/([0-9\.]+)/,null],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/,null],["linux",/Linux/,null],["bsd",/BSD/,null],["unix",/X11/,null]],i=0;i<r.length;i++)if(t.match(r[i][1])){n=r[i][0],o=parseFloat(r[i][2]?r[i][2](RegExp.$1):RegExp.$1);break}e.os=n,e.osVersion=o,e.touch="wp"==e.os?navigator.msMaxTouchPoints>0:!!("ontouchstart"in window),e.mobile="wp"==e.os||"android"==e.os||"ios"==e.os||"bb"==e.os}};return e.init(),e}();!function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.browser=n()}(this,function(){return browser});
/* jquery.scrolly v1.0.0-dev | (c) @ajlkn | MIT licensed */
(function(e){function u(s,o){var u,a,f;if((u=e(s))[t]==0)return n;a=u[i]()[r];switch(o.anchor){case"middle":f=a-(e(window).height()-u.outerHeight())/2;break;default:case r:f=Math.max(a,0)}return typeof o[i]=="function"?f-=o[i]():f-=o[i],f}var t="length",n=null,r="top",i="offset",s="click.scrolly",o=e(window);e.fn.scrolly=function(i){var o,a,f,l,c=e(this);if(this[t]==0)return c;if(this[t]>1){for(o=0;o<this[t];o++)e(this[o]).scrolly(i);return c}l=n,f=c.attr("href");if(f.charAt(0)!="#"||f[t]<2)return c;a=jQuery.extend({anchor:r,easing:"swing",offset:0,parent:e("body,html"),pollOnce:!1,speed:1e3},i),a.pollOnce&&(l=u(f,a)),c.off(s).on(s,function(e){var t=l!==n?l:u(f,a);t!==n&&(e.preventDefault(),a.parent.stop().animate({scrollTop:t},a.speed,a.easing))})}})(jQuery);
\ No newline at end of file
/*
Paradigm Shift by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
var $window = $(window),
$body = $('body');
// Breakpoints.
breakpoints({
default: ['1681px', null ],
xlarge: ['1281px', '1680px' ],
large: ['981px', '1280px' ],
medium: ['737px', '980px' ],
small: ['481px', '736px' ],
xsmall: ['361px', '480px' ],
xxsmall: [null, '360px' ]