Skip to content

Instantly share code, notes, and snippets.

View TheNorthEestern's full-sized avatar

Kacy James TheNorthEestern

View GitHub Profile
#include "Common.metal"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct Uniforms {
float2 iResolution;
float iTime;
float patternScale;
#ifndef COMMON_METAL
#define COMMON_METAL
#include <metal_stdlib>
using namespace metal;
// Base structures
struct VertexIn {
float3 position [[attribute(0)]];
float2 uv [[attribute(1)]];
@TheNorthEestern
TheNorthEestern / graphic2.py
Created May 28, 2020 02:47 — forked from zmic/graphic2.py
Snippet 2 : meltdown in the complex plane
import os
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# helper functions
#
def create_complex_plane(X, Y, x0, x1, y0, y1, endpoint=False):
I = np.indices((Y,X)).astype(np.float64)
@TheNorthEestern
TheNorthEestern / AutoCorrection.swift
Created May 30, 2019 20:51 — forked from shaulhameed/AutoCorrection.swift
Auto correction implementation for swift based on http://norvig.com/spell-correct.html. Improved the search performance using "trie" data structure.
//
// Trie.swift
// AutoCorrect
//
// Created by Shaul Hameed on 30/07/17.
//
//