This file contains 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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; | |
uniform vec2 resolution; | |
void main(void){ | |
vec2 position = (gl_FragCoord.xy / resolution.xy); | |
float color = 0.0; |
This file contains 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
/** | |
Slits | |
@sortofsleepy | |
*/ | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; |
This file contains 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
/** | |
* Simple class for quickly creating positions | |
* for use in a mesh or for whatever other purpose you might want. | |
*/ | |
class TypeBuilder { | |
constructor(string="Hello",width=140,height=100){ | |
this.canvas = document.createElement("canvas"); | |
this.canvas.width = width; | |
this.canvas.height = height; | |
this.canvas.style.cssText = "position:relative;z-index:999" |
This file contains 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
(ns ribbon-attractor.demo | |
(:require | |
[matchstick.Geometry :as mgeo] | |
[matchstick.custom-geometry.Plane :as pgeo] | |
[matchstick.SimpleGeometry :as sgeo] | |
[thi.ng.geom.mesh.polyhedra :as poly] | |
[thi.ng.glsl.core :as glsl :include-macros true :refer-macros [defglsl]] | |
[thi.ng.math.core :as m :refer [PI HALF_PI TWO_PI]] | |
[thi.ng.geom.webgl.constants :as glc] | |
[thi.ng.geom.webgl.animator :as anim] |
This file contains 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
(ns processing-test.core | |
(:gen-class) | |
(:require | |
[processing-test.sketch :as sk]) | |
(:import | |
[processing.core PApplet])) | |
(defn -main | |
"I don't do a whole lot ... yet." | |
[& args] |
This file contains 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 "cinder/app/App.h" | |
#include "cinder/app/RendererGl.h" | |
#include "cinder/Rand.h" | |
#include "cinder/gl/gl.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; |
This file contains 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
// configuration. Pass in your the path to your own file or it defaults to a default one | |
config = { | |
entry: default_entries, | |
performance:{ | |
hints:false | |
}, | |
output:{ | |
path:OUTPUT, | |
filename:"app.js", |
This file contains 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
from keras.layers import Lambda | |
from keras.models import Sequential | |
from keras.optimizers import RMSprop | |
# declares toy model that just multiplies input by 2 | |
def mult(x): | |
return x * 2 | |
# declare sequential layer |
This file contains 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
vec3 calcRayIntersection( vec3 pos ) | |
{ | |
vec3 retPos = pos; | |
if (rayPosition.x > pos.x - 1 && | |
rayPosition.x < pos.x + 1 && | |
rayPosition.y > pos.y - 1 && | |
rayPosition.y < pos.y + 1 && | |
rayPosition.z > pos.z - 1 && | |
rayPosition.z < pos.z + 1 && | |
connection[0] != -1 && connection[1] != -1 && |
This file contains 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
// do this | |
vector<ARAnchor> mats; | |
for(int i = 0; i < session.currentFrame.anchors.count; ++i){ | |
mats.push_back(session.currentFrame.anchors[i]); | |
} | |
// then access transforms from the "mats" variable. | |
// if you grab a transform from "mats", you shouldn't run into an out of bounds error because |