This file contains hidden or 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
-- Circles and Arcs (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
-- Vertex cache to prevent table allocations during draw operations | |
local vertCache = {} | |
for i=1, 256 do vertCache[i] = { x = 0, y = 0, u = 0, v = 0, } end | |
-- Localized functions | |
local math_rad = math.rad | |
local math_pi = math.pi |
This file contains hidden or 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
-- Sphere drawing using mesh library (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
-- Localized functions | |
local mesh_position = mesh.Position | |
local mesh_normal = mesh.Normal | |
local mesh_color = mesh.Color | |
local mesh_userdata = mesh.UserData | |
local mesh_texcoord = mesh.TexCoord | |
local mesh_advance = mesh.AdvanceVertex |
This file contains hidden or 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
-- SSTV experiment (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
local rate = 44100 | |
local image = {} | |
local function co() | |
local dt = 1 / rate | |
local p = 0 |
This file contains hidden or 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
-- QRCode Library (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
-- Based on https://github.com/nayuki/QR-Code-generator | |
--[[ | |
USAGE: | |
-- To create a QR code object: | |
-- (text) | |
-- (ecl, can be LOW, MEDIUM, QUARTILE, or HIGH) |
This file contains hidden or 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
-- Color conversion (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
local _min, _max, _abs, _floor = math.min, math.max, math.abs, math.floor | |
local _permut = { | |
function(a,b,c) return a,b,c end, | |
function(a,b,c) return b,a,c end, | |
function(a,b,c) return c,a,b end, | |
function(a,b,c) return c,b,a end, | |
function(a,b,c) return b,c,a end, |
This file contains hidden or 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
-- "Supertrace" mesh tracing library | |
-- (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
--[[ | |
This library performs a trace against an entity's visual meshes. | |
While it is not as optimized as it could be, you won't see | |
much of a framedrop on meshes with less than 5,000 triangles. |
This file contains hidden or 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
-- FastToScreen (CC0 Public Domain, free to use in whatever you want) | |
-- Created by: Zachary Blystone ( [email protected] ) | |
-- Localized functions | |
local __vunpack = FindMetaTable("Vector").Unpack | |
local __cos = math.cos | |
local __sin = math.sin | |
local __min = math.min | |
local __tan = math.tan | |
local __abs = math.abs |