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
let s = ""; | |
for (let j = 0; j < 25; j++) { | |
for (let i = 0; i < 80; i++) { | |
Math.random() > 0.5 ? s += "/" : s += "\\"; | |
} | |
s += "\n"; | |
} | |
console.log(s); |
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
// in ofApp.h | |
float angle; | |
float cameraDistance; | |
ofCamera camera; | |
// in setup | |
angle = 0; | |
cameraDistance = 100; | |
// function |
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 java.util.*; | |
ArrayList<PVector> jarvisMarch(ArrayList<PVector> _input) throws InvalidJarvisInputException { | |
if (_input.size() < 3) throw new InvalidJarvisInputException("Input must have at least 3 PVectors in the list."); | |
ArrayList<PVector> output = new ArrayList<PVector>(); | |
ArrayList<PVector> input = deepCopyArrayListPVector(_input); | |
Collections.sort(input, new leftSorter()); |
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
// Inital Truth Table Values | |
// By Fi Graham | |
// p5js sketch (editor.p5js.org) | |
// Sketch figuring out inital boolean values of a truth table. | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
stroke(127); | |
} |
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
// Visual Studio Code tasks.json for the sketch | |
// Uses Processing VS code extension (https://github.com/TobiahZ/processing-vscode) | |
// Width and Height are hard coded in this file for rapid prototyping. | |
// Ctrl + Shift + B to Run | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "All", |
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 * as PIXI from 'pixi.js'; | |
import { setupSize, windowWidth, windowHeight } from './src/size'; | |
import floppyImage from './assets/floppy.png'; | |
// Globals | |
let app; | |
let canvas; | |
const canvasID = 'app-canvas'; | |
let container; |
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
int SIZE = 64; | |
int scale = 2; | |
void settings() { | |
size(SIZE, SIZE); | |
} | |
void setup() { | |
color c1 = color(255); | |
color c2 = color(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
cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | |
set( CMAKE_VERBOSE_MAKEFILE ON ) | |
project( Sketch ) | |
get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) | |
get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | |
include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) |
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
CXX=g++ | |
CXXFLAGS=-Wall -Wextra -Wpedantic -O3 -std=c++17 -Wfatal-errors -fno-diagnostics-show-option -Walloc-zero -Wold-style-cast -Wduplicated-branches -Wctor-dtor-privacy | |
main: main.o | |
$(CXX) $(CXXFLAGS) main.o -o main | |
main.o: main.cc | |
$(CXX) $(CXXFLAGS) main.cc -c |
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
// http://editor.thebookofshaders.com/ | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; |
OlderNewer