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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform sampler2D from, to; | |
uniform float progress; | |
uniform vec2 resolution; | |
const float strength=0.1; | |
void main() { | |
vec2 p = gl_FragCoord.xy / resolution.xy; |
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
I tried to write a bit about my short contacts with | |
Haskell and why I don't really like it, but that's | |
just going to attract an angry mob; besides, my | |
experiences are too brief to really build a | |
solid opinion I would be able to defend. | |
So instead I'll write a bit about why I think that | |
our problems go deeper than any text-based | |
programming language could solve. |
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
Noodles Model | |
============= | |
For my noodles graph programming I ended up rewriting the model. | |
I used to have several separate classes for each type: Type, Function, Call, | |
Argument, Result, Module, Scope, Link. | |
Then I realized I first need to have an extensible data descriptor model which | |
is general enough to permit building the above classes as specialized data - and |
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
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 |
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
""" | |
a demo of how to convert from cubic to a rhombohedral isometric lattice, which | |
is equivalent to tetrahedral / octahedral packing, but without the headache | |
of having to manage two separate primitives or interlaced grid structures | |
as with the face-centered cubic lattice, which produces an equivalent structure. | |
an integer conversion from tetrahedral to cartesian coordinates is as easy as | |
tx = y+z |
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
# include <stdlib.h> | |
# include <stdio.h> | |
# include <math.h> | |
# include <time.h> | |
# include "qr_solve.h" | |
//# include "test_ls.h" | |
# include "r8lib.h" | |
/******************************************************************************/ |
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
#define HERMITE_O_SHARP 0.9f | |
#define HERMITE_O_CORNER 0.7f | |
vec3_t dfm_hermite_feature(vec3_t com, DFMHermite *samples, int count) { | |
if (count < 2) return com; | |
float min_oa = 1e+20f; | |
int n0,n1; | |
for (int i = 0; i < count; ++i) { |
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
// example for an implicit surface that is not lipschitz continuous | |
float decocube(vec3 p) { | |
float r = (0.8*0.8); | |
float a = ((p.x+p.y)-r); | |
float b = ((p.y+p.z)-r); | |
float c = ((p.z+p.x)-r); | |
vec3 u = (p-1.0); | |
float q = ((a*a)+(u.z*u.z)); | |
float s = ((b*b)+(u.x*u.x)); |
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
""" | |
a demo of how to convert from cubic to BCC lattice, analog to the tetrahedral | |
or FCC lattice, but without the headache of having to manage an interlaced grid | |
structure as with the usual approach, at the expense of a diagonally skewed | |
non-cubic bounding box in cartesian coordinates. | |
an integer conversion from bcc to cartesian coordinates is as easy as | |
x = -tx+ty+tz |
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
after a sleepness night of faces, edges and vertices rotating in my head I got | |
this idea this morning: | |
"Dual Contouring with Sphere Packing" | |
sample volume of implicit function on vertices and edges of the FCC lattice; | |
we get a set of hermite points denoting planes crossing the FCC edges, and | |
spherical center points that are either "inside" or not. | |
create vertices in voronoi diagram of lattice: the rhombic dodecahedral honeycomb, |
OlderNewer