Skip to content

Instantly share code, notes, and snippets.

@loopspace
loopspace / setdeck.tex
Created April 21, 2022 13:20
Set Deck in TikZ
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\makeatletter
\tikzset{
sub pic actions/.code=\expandafter\tikz@addmode\expandafter{\tikz@picmode}
}
\makeatother
@loopspace
loopspace / circular_graph.tex
Created December 17, 2021 16:06
Circlular graph with arcs joining nodes
\documentclass{article}
\usepackage{tikz}
% These libraries handle the path manipulations
\usetikzlibrary{
intersections,
spath3
}
@loopspace
loopspace / beamerframe.tex
Created November 1, 2021 19:16
Exploded diagram of a beamer frame
\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\colorlet{base}{Moccasin}
\colorlet{background canvas}{base}
\colorlet{block body}{base!75}
\colorlet{block title bg}{base!75!Red}
\colorlet{block title fg}{Green}
@loopspace
loopspace / Main.lua
Created November 19, 2019 20:23
Codea solution to Bri_G's beermats puzzle
-- Beermats
function setup()
displayMode(OVERLAY)
-- load the socket library to get accurate time readings
local socket=require("socket")
-- measue the time at the start
local st=socket:gettime()
@loopspace
loopspace / SquareHexagonCircle.scad
Created March 11, 2019 21:36
A suggestion of a solid with a square, hexagon, and circle orthogonal projections.
radius = 20;
hexradius = radius * cos(15);
intersection()
{
translate([0,0,-radius])
{
linear_extrude(height=2*radius)
{
rotate([0,0,15])
{
@loopspace
loopspace / 1aTabOrder
Created May 20, 2013 10:39
Library Graphics Release v2.2a -A library of classes and functions relating to graphical things.
Library Graphics Tab Order
------------------------------
This file should not be included in the Codea project.
#ChangeLog
#Main
#Bezier
#Explosion
#Path
#TextNode
#View
@loopspace
loopspace / Tracks.lua
Created December 19, 2018 21:45
Codea Tracks code
--[[
Track definitions.
--]]
function TrackPoints(a)
a = a or {}
local pts = a.points or {}
local t = a.start or 0
local r = a.step or .1
\documentclass{article}
\usepackage{tikz}
\tikzset{
star graph/.pic={
\node[
fill,
inner sep=0pt,
outer sep=0pt,
circle,
@loopspace
loopspace / ImageTools.h
Created May 23, 2018 19:24 — forked from tnlogy/ImageTools.h
A Codea addon for saving images to the photo album, share photos to facebook and detect faces in an image. Just add [self.viewController registerAddon:[ImageTools sharedInstance]]; to AppDelegate.mm
//
// ImageTools.h
// FaceDetection
//
// Created by Tobias Teleman on fredag 12 april 2013
// Copyright (c) Tobias Teleman. All rights reserved.
//
#import <Foundation/Foundation.h>
-- BezierTubes
function setup()
assert(craft, "Please include Craft as a dependency")
assert(OrbitViewer, "Please include Cameras (not Camera) as a dependency")
scene = craft.scene()
scene.camera:add(OrbitViewer)
local track = scene:entity()
local p = f(0)