Skip to content

Instantly share code, notes, and snippets.

View jeremyfromearth's full-sized avatar
🖖
Coding

Jeremy Brown jeremyfromearth

🖖
Coding
View GitHub Profile
@jeremyfromearth
jeremyfromearth / PropertyHex.as
Created November 1, 2010 16:23
A plug-in for tweening hex values, useful for creating color gradient tweens
package aze.motion.specials
{
import aze.motion.*;
import aze.motion.specials.*;
/**
* A hex tween plug-in for use with Eaze animation engine
* For instructions on use visit:
* http://labs.makemachine.net/2010/10/gradient-tween-for-eaze/
*
@jeremyfromearth
jeremyfromearth / NoteVisualizerExample.as
Created November 5, 2010 01:10
Example for rendering visualizations based on notes and beats using dynamic sound features, no actual audio is produced
package makemachine.examples.audio.note_visualizer
{
import com.bit101.components.*;
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.ByteArray;
/**
@jeremyfromearth
jeremyfromearth / TremoloWaveTableDemo.as
Created December 9, 2010 12:06
A wavetable synthesis experiment implementing wavelet tremolo effects
package makemachine.demos.audio.wavetables
{
import com.bit101.components.*;
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
[ SWF( width='620', height='225', frameRate='60', backgroundColor="0x222222" ) ]
@jeremyfromearth
jeremyfromearth / WavetablePitchControl.as
Created December 20, 2010 12:05
Wavetable oscillator with portamento and frequency modulation
package makemachine.demos.audio.wavetables
{
import com.bit101.components.*;
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
[SWF( width="620", height="260", backgroundColor="0x222222", frameRate="60" )]
@jeremyfromearth
jeremyfromearth / ParameterGraph.as
Created January 20, 2011 14:47
Allows audio effects parameters to be controlled by linearly graphed values through a node based user interface.
package makemachine.examples.audio
{
import com.bit101.components.*;
import flash.display.*;
import flash.events.*;
import flash.geom.Point;
import flash.media.*;
import flash.net.URLRequest;
import flash.utils.ByteArray;
@jeremyfromearth
jeremyfromearth / RandomBezier.as
Created February 27, 2011 04:24
Creates tweens along a bezier path based on semi random radius and angle values using the Eaze tween engine
package makemachine.display.demos
{
import aze.motion.eaze;
import com.bit101.components.*;
import flash.display.*;
import flash.events.*;
import flash.geom.Point;
@jeremyfromearth
jeremyfromearth / planet_data_parser.py
Created March 9, 2011 20:36
Uses BeautifulSoup to scrape planetary data from three html tables of solarviews.com and converts it to a single xml file
#!/usr/bin/env python
import urllib
from xml.etree.ElementTree import Element, ElementTree, SubElement, dump
from BeautifulSoup import BeautifulSoup
import re
import sys
# create a root xml node
root = Element('data')
@jeremyfromearth
jeremyfromearth / PixelBounds.cpp
Created April 22, 2011 05:34
Generate pixel bounds for Cinder Texture #pixelbounds #cinder #opengl #texture #collision-detection
//
// PixelBounds.cpp
// Demonstrates calculating the actual pixel bounds ( non-transparent bounds ) for a texture in Cinder
// More information here: http://wp.me/pPFvc-42
//
#include <cinder/app/AppBasic.h>
#include <cinder/Font.h>
#include <cinder/Text.h>
#include "cinder/gl/Texture.h"
import SceneKit
class IcoSphere : Geometry {
// Initialize the data to the Icosahedron
var faceIndices:[Int32] = Icosahedron.faceIndices
var vertices:[SCNVector3] = Icosahedron.vertices
var wireframeIndices:[Int32] = Icosahedron.wireframeIndices
required init(subdivisions:Int) {
// Map string representations to indices (used to avoid duplicate vertices)
import SceneKit
public func + (left:SCNVector3, right:SCNVector3) -> SCNVector3 {
return SCNVector3(left.x + right.x, left.y + right.y, left.z + right.z)
}
public func += (inout left:SCNVector3, right:SCNVector3) {
left = left + right
}