Skip to content

Instantly share code, notes, and snippets.

View solsarratea's full-sized avatar
:octocat:
miau

solsarratea

:octocat:
miau
View GitHub Profile
@solsarratea
solsarratea / keybase.md
Last active February 21, 2019 20:08
keybase.md

Keybase proof

I hereby claim:

  • I am solsarratea on github.
  • I am ssarratea (https://keybase.io/ssarratea) on keybase.
  • I have a public key whose fingerprint is 13A8 3030 1731 1A48 55B8 CA1A 26A9 588B 3940 1033

To claim this, I am signing this object:

@solsarratea
solsarratea / fractals.glsl
Created March 27, 2020 17:26
Raymarching Mandelbulb in Kodelife
uniform float time;
uniform vec2 resolution;
uniform vec3 spectrum;
uniform sampler2D texture0;
out vec4 fragColor;
#define PHI (sqrt(5)*0.5 + 0.5)
//Color function
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
@solsarratea
solsarratea / simple-shader-in-plane.html
Last active May 30, 2020 21:15
Learning Three.js : Simple shader in plane
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Day 1</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r71/three.min.js"></script>
</head>
<style>
body { margin: 0; }
canvas { display: block; }
@solsarratea
solsarratea / reflection.glsl
Created June 9, 2020 02:06
Simple plane folding
// Create foldings
// Target: flip one of the sides into another.
// i - For each point on on of the side reflect point around an arbitrary line.
void main (){
vec2 pos = uv();
vec4 color = vec4(0.);
@solsarratea
solsarratea / koch.glsl
Created June 9, 2020 02:33
FIrst iteration of Koch Curve
// Drawing Koch Curve - first iteration
//i- draw line
//ii- uv symmetrical to y-axis
//ii- fold it
float reflection(inout vec2 pos, float angle){
vec2 normal = vec2(sin(angle),cos(angle));
float d = dot(pos, normal);
pos -= normal*min(0.,d)*2.;
@solsarratea
solsarratea / koch-k.glsl
Created June 9, 2020 02:47
K iterations of Koch curve
// Drawing Koch Curve - k-iterations
const int iterations = 7;
float scale = 3.;
void reflection(inout vec2 pos, float angle){
vec2 normal = vec2(sin(angle),cos(angle));
float d = dot(pos, normal);
pos -= normal*min(0.,d)*2.;
// Kosh snowflake
const int iterations = 5;
float scale = 3.;
float reflection(inout vec2 pos, float angle){
vec2 normal = vec2(sin(angle),cos(angle));
float d = dot(pos, normal);
@solsarratea
solsarratea / sample-slack-coc.md
Created July 28, 2020 14:41 — forked from annalee/sample-slack-coc.md
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE SLACK AND ITS PURPOSE]

The current admins are:

  • [NAMES]
@solsarratea
solsarratea / clases-coc.md
Last active July 6, 2023 09:17 — forked from annalee/sample-slack-coc.md
A sample code of conduct for social slack teams.

Código de conducta : Clases

¡Bienvenides!

Buscamos que durante las clases este sea un espacio de contención, de respeto y libre de acoso para todes En fin de poder crear un ambiente distendido, de aprendizaje y seguro.

Actualmente organizamos:

vec3 cosPalette(float t){
vec3 a = vec3(0.6,0.5,0.25);
vec3 b = vec3(0.5,0.5,0.4);
vec3 c = vec3(.2,.3,1.);
vec3 d = vec3(.2,0.3,0.32);
return a + b*cos( 6.28318*(c*t+d));
}
void pMod3(inout vec3 p, vec3 size) {