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
import controlP5.*; | |
import javax.swing.*; | |
import org.processing.wiki.triangulate.*; | |
ArrayList triangles = new ArrayList(); | |
ArrayList points = new ArrayList(); | |
PImage bg; | |
boolean doDraw = true; |
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
public String[] initSketchSize(String code) throws SketchException { | |
SurfaceInfo surfaceInfo = parseSketchSize(code, true); | |
if (surfaceInfo == null) { | |
System.err.println("More about the size() command on Android can be"); | |
System.err.println("found here: http://wiki.processing.org/w/Android"); | |
throw new SketchException("Could not parse the size() command."); | |
} | |
try{ |
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
// Super Fast Blur v1.1 | |
// by Mario Klingemann <http://incubator.quasimondo.com> | |
// | |
// Tip: Multiple invovations of this filter with a small | |
// radius will approximate a gaussian blur quite well. | |
// | |
// Updated 23/10/2015 to work with Processing 3.0 | |
// | |
PImage source; |
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
PImage stars; | |
void setup() { | |
size(700, 400, P3D); | |
populateStarBackground(); | |
} | |
void populateStarBackground(){ |
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
/** | |
* Corona code adapted from the Topics/Geometry/Noise Sphere example by David Pena. | |
* Planets orbiting code is by Adam Schmidt: http://www.openprocessing.org/sketch/8813 | |
* Comets from Ignivome, inspired by Flight404's work: http://www.openprocessing.org/sketch/40052 | |
*/ | |
final int MAX_OPACITY = 140; | |
final int MAX_TAIL_AREA = 200; | |
//The background image |
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
//Moirè patterns | |
final int BATCH_SIZE = 15; | |
int diameter = 1; | |
void setup(){ | |
size(600, 400, P3D); | |
noFill(); | |
frameRate(15); | |
} |
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
//Ripple | |
final int NUM_RIPPLES = 160; | |
final int MAX_OPACITY = 120; | |
float diameter = 1; | |
ARipple[] ripples; | |
float bobbleOffset = 0.0; | |
float inc = TWO_PI/20; | |
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
public class RemedialStringType { | |
String label = null; | |
String[] labelArray = null; | |
public String getLabel() { | |
return label; | |
} | |
public void setLabel(String label) { | |
this.label = label; |
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
public class SomeObject { | |
//This field can be either a string or string[] | |
RemedialStringType label; | |
public RemedialStringType getLabel() { | |
return label; | |
} | |
public void setLabel(RemedialStringType label) { |
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
RestAdapter.Builder builder = new RestAdapter.Builder(); | |
Gson gson = new GsonBuilder().registerTypeAdapter(RemedialStringType.class, new RemedialStringTypeAdapter()).create(); | |
builder.setConverter(new GsonConverter(gson)); | |
builder.setEndpoint(BASE_URL); | |
rest = builder.build().create(SomeServiceRest.class); |