Skip to content

Instantly share code, notes, and snippets.

View nshelton's full-sized avatar
🤘
I said GOOD GRAPHICS

nick nshelton

🤘
I said GOOD GRAPHICS
View GitHub Profile
I am attesting that this GitHub handle nshelton is linked to the Tezos account tz1dzRwpVJ9Muod4Srge22Fa599mzHSDHtrK for tzprofiles
sig:edsigu2Z4Q1rKSC9hxZGrASsu9azTEUz1kxwotSZog3FWdNR3hVYLRbK3sdtxgZLuwqjGvgSJbHbkakdaW6A53TAuMCGB14L4zX
@nshelton
nshelton / rasterOutline.py
Created January 18, 2021 18:59
generate svgs for any topo area in the world with python
# download https://www.bodc.ac.uk/data/open_download/gebco/gebco_2020/geotiff/ and put into ./gebco/ folder
# fyi rasterio only supports up to python 2.7
import rasterio
import matplotlib.pyplot as plt
import math
import glob
import numpy as np
import datetime
import cv2

Rapper’s Delight Word Cloud

Prepared by Nick Shelton nshelton@gmail.com for Rap Research Lab LLC 1/15/20

Rendering 5000 TextMeshPro meshes in 1ms for an interactive VR word cloud

I started with a naive 5000 TextMeshPro gameobjects, which could take 30ms CPU and GPU, and made a new system that took 1ms CPU and GPU and still looked dope.

@nshelton
nshelton / HierarchyIcons.cs
Created August 21, 2019 06:13
draw icons in the unity hierarchy view (put in your Editor folder)
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Tilemaps;
using UnityEngine.Timeline;
using UnityEngine.UI;
using UnityEngine.U2D;
using UnityEngine.Rendering;
using UnityEngine.Playables;
using UnityEngine.EventSystems;
import numpy as np
from sklearn.manifold import TSNE
import glob
import os
import sys
from numpy import genfromtxt
import matplotlib.pyplot as plt
numFilesRead = 0
data = np.zeros((144,1))
@nshelton
nshelton / DiffusionLimitedAggregation.cs
Last active April 30, 2018 03:38
m_primitive should be a prefab with a small collider (scale like 0.005). Run the script and then put a small collider in the center to get things to start sticking to it. May take some time. Also set growthRoot to some gameobject, that's where the primitives will be instantiated.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
public class DiffusionLimitedAggregation : MonoBehaviour
{
[SerializeField]
private int m_numPoints = 10000;
@nshelton
nshelton / GraphicsResources.md
Last active October 25, 2019 11:34
Graphics Programming / Demoscene Resources

I get a lot of requests for resources about how I learned about raymarching fractals or general computer graphics stuff. So I started this handy guide where I will add links and info about where I learned some things.

This is a non-exhaustive list I will probably add more in the future.

Reference

It used to be that you had to dig through FractalForums or pouet.net to find little nuggets of new techniques or ideas. But many smart people that have been doing much longer than I have condensed this knowledge into some articles. Here are a few that have helped me out on my journey.

Mercury Demogroup

Mercury.sexy demogroup has created a distance field library with some cool stuff in there. Except they said that fractals are boring.