Skip to content

Instantly share code, notes, and snippets.

@fancypantalons
fancypantalons / rt.pal
Created January 3, 2012 14:57
Extremely basic raytracer written in a Pascal-like language called Pal. This was a test input I came up with for a toy compiler I helped write during my compiler class back in the day.
{
Simple sphere raytracer which uses a Phong + diffuse lighting model
for sphere shading. Implements the basic recursive raytracing
algorithm with simple reflection. Also implements a checkerboard
floor. No refraction, though... ;)
Produces a TGA image in a file called "fourout". Rename to
"fourout.tga" to view.
BTW, this thing pushes the memory limits of the ASC machine. The
@fancypantalons
fancypantalons / mentions_filter.rb
Last active February 9, 2020 17:15
Jekyll Mention Filter
#
# To install, drop this file into your _plugins directory and add the "html-pipeline" gem to your Gemfile.
#
# To use, apply like any other liquid filter. e.g. {{ content | replace_mentions | xml_escape }}
#
require "html/pipeline"
module Jekyll
module MentionFilter