- ARM 64 (aarch64)
- gcc 7.3
- cuda 10
- cudnn 7
- v1.12.0
// Hyperboloc functions by toneburst from | |
// https://machinesdontcare.wordpress.com/2008/03/10/glsl-cosh-sinh-tanh/ | |
// These are missing in GLSL 1.10 and 1.20, uncomment if you need them | |
/* | |
/// COSH Function (Hyperbolic Cosine) | |
float cosh(float val) | |
{ | |
float tmp = exp(val); | |
float cosH = (tmp + 1.0 / tmp) / 2.0; |
import numpy as np | |
def perspective_fov(fov, aspect_ratio, near_plane, far_plane): | |
num = 1.0 / np.tan(fov / 2.0) | |
num9 = num / aspect_ratio | |
return np.array([ | |
[num9, 0.0, 0.0, 0.0], | |
[0.0, num, 0.0, 0.0], | |
[0.0, 0.0, far_plane / (near_plane - far_plane), -1.0], | |
[0.0, 0.0, (near_plane * far_plane) / (near_plane - far_plane), 0.0] |
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
/** | |
* Resize the image to a new width and height using nearest neigbor algorithm. To make the image scale | |
* proportionally, use 0 as the value for the wide or high parameter. | |
* For instance, to make the width of an image 150 pixels, and change | |
* the height using the same proportion, use resize(150, 0). | |
* Otherwise same usage as the regular resize(). | |
* | |
* Note: Disproportionate resizing squashes the "pixels" from squares to rectangles. | |
* This works about 10 times slower than the regular resize. Any suggestions for performance increase are welcome. | |
*/ |
/** | |
* Resize the image to a new width and height using nearest neighbor algorithm. | |
* To make the image scale proportionally, | |
* use 0 as the value for the wide or high parameters. | |
* For instance, to make the width of an image 150 pixels, | |
* and change the height using the same proportion, use resize(150, 0). | |
* Otherwise same usage as the regular resize(). | |
* | |
* Note: Disproportionate resizing squashes "pixels" from squares to rectangles. | |
* This works about 10 times slower than the regular resize. |
javascript:(function(){ | |
const MY_MASTO_LOCAL_DOMAIN = 'front-end.social'; /* 👈 Change this value */ | |
const MY_MASTO_WEB_DOMAIN = MY_MASTO_LOCAL_DOMAIN; /* 👈 Only change this value if your Masto host is hosted an different domain than the LOCAL_DOMAIN */ | |
function tryAndGetUserName() { | |
/* Profile with a moved banner (e.g. https://mastodon.social/@bramus): follow that link */ | |
const userNewProfile = document.querySelector('.moved-account-banner .button')?.getAttribute('href'); | |
if (userNewProfile) { | |
return userNewProfile.substring(2); | |
} |
let heights = []; | |
let moving_heights = []; | |
let r = 0; | |
function setup() { | |
createCanvas(800, 400, WEBGL); | |
for (let i=0; i<17; i++) { | |
heights.push([]); | |
moving_heights.push([]); | |
for (let j=0; j<17; j++) { |
float map(float value, float min1, float max1, float min2, float max2) { | |
return min2 + (value - min1) * (max2 - min2) / (max1 - min1); | |
} |