Skip to content

Instantly share code, notes, and snippets.

View cyrstem's full-sized avatar
🏠
Working from home

cyrstem cyrstem

🏠
Working from home
View GitHub Profile
import processing.pdf.*;
color[] rgb = {
#FF0000, #00FF00, #0000FF
};
//SPACING BETWEEN LINES
float spMin = 2;
float spMax = 4;
float strokeWidth = 0.5;
@cyrstem
cyrstem / main.cpp
Created April 19, 2018 02:25 — forked from kylemcdonald/main.cpp
Depth in shader using openFrameworks.
#include "ofMain.h"
class ofApp : public ofBaseApp {
public:
ofShader shader;
ofEasyCam cam;
ofFbo fbo;
void setup() {
ofBackground(0);
ofFbo::Settings s;
@cyrstem
cyrstem / ofMatrix4x4-vs-glm.cpp
Created May 9, 2018 17:24 — forked from kylemcdonald/ofMatrix4x4-vs-glm.cpp
ofMatrix4x4 compared to glm::mat4.
#include "ofMain.h"
int main() {
// both initialize to identity matrix
cout << glm::mat4() << endl;
cout << ofMatrix4x4() << endl;
// both row-major (translation stored in mat[3][0,1,2])
glm::mat4 glmMat;
glmMat = glm::translate(glmMat, glm::vec3(1,2,3));
// setup lights
ofSetSmoothLighting(true); // nicer lighting rendering
// setup point light
light.setPointLight();
light.setPosition(0, 0, 200);
@cyrstem
cyrstem / alsa.conf
Created December 10, 2019 15:53
make headphones work in Manjaro
##create file in /etc/modprobe.d whit this line:
options snd-hda-intel model=acl298-spk-volume
##then as root run depmod -a; modprobe-r snd-hda-intel; modprobe snd-hda-intel
ofPolyline temp;
float ff = ofGetElapsedTimef();
for (int i = 0; i < 100; i++){
float angle = ofMap(i, 0, 100, 0, TWO_PI);
ofPoint pt= ofPoint(400,400);
float radius = 200 + ofSignedNoise(ff*0.1, cos(angle)*0.3, sin(angle)*0.3) * 100;
pt += radius * ofPoint(cos(angle), sin(angle));
temp.addVertex(pt);
}
temp.setClosed(true);
@cyrstem
cyrstem / CSS3 Media Queries Template
Created April 29, 2020 23:33
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@cyrstem
cyrstem / cinderAppmaker.sh
Last active February 2, 2024 22:45
script for quick setting up a Cinder Project on linux and and with VS code
#!/bin/bash
echo "Cinder ProjectMaker"
read -p "Project name: " projName
#checks
# Validate if the project name is provided
if [ -z "$projName" ]; then
echo "Error: Project name cannot be empty."
exit 1
fi
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
// A really basic button class
@cyrstem
cyrstem / f.frag
Created February 16, 2021 22:59
THREE js TO OF
#version 150
in vec4 verts;
out vec4 outputColor;
in float qnoise;
uniform float time;
uniform bool redHell;
uniform float r_color;
uniform float g_color;
uniform float b_color;
//in vec2 fragUV;