Skip to content

Instantly share code, notes, and snippets.

View paniq's full-sized avatar

Leonard Ritter paniq

View GitHub Profile
@delascuevas
delascuevas / gist:45f46c8c33646d860a3314a88aaea70a
Created September 23, 2016 15:52
Rot13 english word pairs
a n
ab no
aba non
abb noo
abba noon
abib novo
abjurer nowhere
abl noy
abn noa
abo nob
static file_fixup *
FixupListSort(file_fixup *List)
{
// This is bog-standard mergesort.
// Base case: 0- and 1-element lists
if (!List || !List->Next)
{
return(List);
}
@rygorous
rygorous / gist:8c03770f4b1c93895d8c
Last active August 29, 2015 14:15
Simple approximate eigensolver for paniq
static float const singularEps = 2 * 1.192092896e-7f; // float32 epsilon, *2 to have a bit of margin
// QR factorization using MGS
// store 1 / diag elements in diag of R since that's what we need
bool QR(IN(mat3,m),OUT(mat3,q),OUT(mat3,r)) {
q[0] = normalize(m[0]);
q[1] = normalize(m[1] - dot(m[1], q[0])*q[0]);
q[2] = cross(q[0], q[1]);
float d0 = dot(m[0], q[0]);
@rygorous
rygorous / gist:5e044f14549084fc08b0
Created February 19, 2015 10:19
Back substitution
R x = b => x = R^-1 b
compute using back substitution: Say R has the form
[a00 a01 a02]
R = [ 0 a11 a12]
[ 0 0 a22]
then our system Rx = b is
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes.
It's an ever-growing list.
------------------------------
Relevant links:
http://en.wikipedia.org/wiki/Types_of_mesh
http://en.wikipedia.org/wiki/Tetrahedron
http://en.wikipedia.org/wiki/Simplicial_complex
anonymous
anonymous / LICENSE.txt
Created November 25, 2014 08:38
3x3 Least Squares and QEF solvers based on Singular Value Decomposition (SVD) using Jacobi Rotations
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
- Arrowkey nav, jump to next node in direction of arrow
- Enter to select node, then arrows to select port, enter to jump along that port