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
private List<Vector3> UniformGrid(Vector3Int numDivisions, Vector3 gridPosition, float scale = 1) | |
{ | |
Assert.IsTrue(numDivisions.x > 0); | |
Assert.IsTrue(numDivisions.y > 0); | |
Assert.IsTrue(numDivisions.z > 0); | |
var count = numDivisions.x * numDivisions.y * numDivisions.z; | |
List<Vector3> gridResult = new List<Vector3>(count); | |
for (int i = 0; i < count; ++i) | |
{ | |
var position = new Vector3 |
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
The single most important thing is to make and install emacs and gcc to a path without spaces! | |
This means, when prompted, to customize your path. Be sane and use c:\ ! | |
Get and install emacs (unzip to a path with no spaces!) | |
Install 64bit MinGW | |
Be sure to select x86_64 for the Architecture (not i686!) when prompted | |
https://sourceforge.net/projects/mingw-w64/?source=typ_redirect | |
Install openssl |
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
float frequency = .5; | |
float trianglewave = abs(2 * frac(x * frequency) - 1); // repeating triangle wave /\/\/\... | |
float squarewave = round(abs(2 * frac(x * frequency + .25) - 1)); // repeating square wave | |
float FilteredStep(float edge, float x, float fw) | |
{ | |
return saturate((x + fw / 2 - edge) / fw); | |
} | |
// Euclid length because built-in does abs(ddx(x)) + abs(ddy(y)) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello, World! • A-Frame</title> | |
<meta name="description" content="Hello, World! • A-Frame"> | |
<script src="https://aframe.io/releases/latest/aframe.min.js"></script> | |
</head> | |
<body> |
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
# find nearest neighbor of a point | |
import numpy as np | |
from scipy import spatial | |
# create 10 random points | |
x, y, z = np.random.rand(3,10) | |
# format our points for the kdtree function | |
points = [i for i in zip(x,y,z)] |