This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <SD.h> | |
const int chipSelect = 4; | |
const int waterPumpRelayPin = 8; | |
const int moisture_minimum = 400; | |
const int watering_delay = 1000; | |
const int loop_delay_minutes = 5; | |
const int loop_delay = 60 * 1000 * loop_delay_minutes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ben Houston <[email protected]> | |
/* | |
Based upon: | |
Szymon Rusinkiewicz | |
Princeton University | |
TriMesh_curvature.cc | |
Computation of per-vertex principal curvatures and directions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shuffle = require('shuffle-array'); | |
var PoissonDiskSampling = require('poisson-disk-sampling'); | |
var p = new PoissonDiskSampling([1000, 1000], 100, 100, 10); | |
var points = p.fill(); | |
for( i = 0; i < points.length; i ++ ) { | |
points[i][0] = Math.round( points[i][0] * 100 ) / (1000*100); | |
points[i][1] = Math.round( points[i][1] * 100 ) / (1000*100); | |
} | |
shuffle( points ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"#if MAX_AREA_LIGHTS > 0", | |
"for( int i = 0; i < MAX_AREA_LIGHTS; i ++ ) {", | |
"vec3 lPosition = ( viewMatrix * vec4( areaLightPosition[ i ], 1.0 ) ).xyz;", | |
//"vec3 lVector = lPosition.xyz + vViewPosition.xyz;", | |
"vec3 width = areaLightWidth[ i ];", | |
"vec3 height = areaLightHeight[ i ];", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Utilities used by the BxDFs: | |
Fresnel functions: | |
FresnelDielectric( iorI, iorT ) | |
FresnelConductor( iorI, iorT, kappa ) | |
FresnelNoOp() | |
Microfacet distributions: | |
BeckmannDistribution ( uRoughness, vRoughness ); | |
TrowbridgeReitzDistribution( uRoughness, vRoughness ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: http://www.mdlhandbook.com/pdf/mdl_handbook.150810.LTR.pdf | |
// Material definition: | |
- Surface properties of front-facing surfaces | |
- Reflection | |
- Transmission | |
- Emission | |
- Surface properties of back-facing surfaces | |
- Reflection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author bhouston / http://clara.io/ | |
* | |
* Scaleable Ambient Obscurance | |
* | |
* based on: | |
* - https://gist.github.com/fisch0920/6770311 | |
* - http://graphics.cs.williams.edu/papers/SAOHPG12/McGuire12SAO-talk.pdf | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gl; | |
function initGL(canvas) { | |
try { | |
gl = WebGLDebugUtils.makeDebugContext( canvas.getContext("webgl"), undefined, | |
function(functionName, arguments) { | |
console.log( " [webgl] " + functionName.toString() + "( ", arguments, " )" ); | |
} ); | |
gl.viewportWidth = canvas.width; | |
gl.viewportHeight = canvas.height; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THREE.Assert = function( mustBeTrue, message ) { | |
if( ! mustBeTrue ) throw new Error( message | "Assertion failure." ); | |
} | |
THREE.Descriptor = function ( elementType, itemSize, isArray, isIndex ) { | |
THREE.Descriptor.AssertElementType( elementType ); | |
this.itemSize = itemSize; | |
this.elementType = elementType; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error #1: | |
(unknown): Unable to get value of the property 'toUpperCase': object is null or undefined | |
Location: https://cdn.webglstats.com/stat.js line 8 | |
Browser: IE 9.0 | |
OS: Windows Vista | |
Error #2: | |
(unknown): Error loading script |