Skip to content

Instantly share code, notes, and snippets.

kurtkilgor

Block or report user

Report or block kurtkilgor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kurtkilgor
kurtkilgor / BezierLength.py
Created May 26, 2017
Python implementation of Bezier curve length calculation using elliptic integrals as described in http://www.circuitwizard.de/metapost/arclength.pdf
View BezierLength.py
#%%
# Python implementation of Bezier curve length calculation using elliptic integrals
# as described in http://www.circuitwizard.de/metapost/arclength.pdf
from sympy import *
from sympy.integrals import integrate
from sympy.polys.polyroots import roots_quartic
from mpmath import *
@kurtkilgor
kurtkilgor / model_tag.rb
Last active Aug 29, 2015
model_tag Octopress plugin
View model_tag.rb
# Title: Include Model Tag for Jekyll
# Author: Max Eskin http://maxeskin.com
# Description: Import a 3D model saved in JSON format for display in a fancybox iframe.
#
# Syntax {% model key=value ... %}
#
# Keys:
# model - the filename of the model JSON
# thumb - the thumbnail image to display on the link
# title - the title to display under the model and in the title of the image
@kurtkilgor
kurtkilgor / modelframe.html
Created Mar 24, 2014
iframe HTML for partloader.js
View modelframe.html
<html>
<head>
<title>Three.js JSON Loader Demo</title>
<script type="text/javascript" src="three.min.js"></script>
<script type="text/javascript" src="TrackballControls.js"></script>
<script type="text/javascript" src ="partloader.js"></script>
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
</head>
@kurtkilgor
kurtkilgor / partloader.js
Created Mar 24, 2014
Javascript for loading the output of the SpaceClaim Three.js plugin into Three.js
View partloader.js
// Some of this code is from http://www.radiatedpixel.com/wordpress/2013/03/27/webgl-3d-model-viewer-using-three-js/
// Other parts are from http://math.hws.edu/eck/cs424/notes2013/threejs/json-loader-demo.html
/* Uses JSONLoader to load objects that have been saved
* in three.js's json format. Requires the folder models-json
* that contains the seven sample models.
*/
var renderer; // A three.js WebGL or Canvas renderer.
var scene; // The 3D scene that will be rendered, containing the model.
@kurtkilgor
kurtkilgor / image_tag.rb
Created Mar 4, 2014
An improved image tag plugin for Octopress
View image_tag.rb
# Title: Simple Image tag for Jekyll
# Authors: Brandon Mathis http://brandonmathis.com
# Felix Schäfer, Frederic Hemberger, Max Eskin
# Description: Easily output images with optional class names, width, height, title and alt attributes
#
# Syntax {% include_poem key=value ... %}
#
# Most keys are mapped directly to img tag attributes except:
# caption - specifies a caption to be displayed below the image
# class - specifies CSS class for image or div if there's a caption
@kurtkilgor
kurtkilgor / include_poem.rb
Last active Aug 29, 2015
Octopress plugin for including poem translations in a page.
View include_poem.rb
# Title: Include Poem Tag for Jekyll
# Author: Max Eskin http://maxeskin.com
# Description: Import files on your filesystem into any blog post as embedded text snippets with line numbers.
#
# Syntax {% include_poem key=value ... %}
#
# Keys:
# left - Specifies file for left column (use this if only a single column is desired)
# right - File for right column
# title - Title
You can’t perform that action at this time.