Skip to content

Instantly share code, notes, and snippets.

@postspectacular
postspectacular / tetrahedron-intersect.clj
Last active Jun 29, 2016
Tetrahedron intersection (currently runs in ~36% time than original revision of this gist)
View tetrahedron-intersect.clj
;; Tetrahedron intersection based on this paper & algorithm:
;; http://vcg.isti.cnr.it/Publications/2003/GPR03/fast_tetrahedron_tetrahedron_overlap_algorithm.pdf
;;
;; Unlike original algorithm this implementation produces correct
;; results regardless of the orientation/ordering of points defining
;; the two tetrahedra. This is achieved via the orient-tetra function,
;; which ensures the correct ordering of vertices for this algorithm
;; to function properly.
;;
;; Implementation extracted from upcoming geometry library
@pitluga
pitluga / core.clj
Created Oct 29, 2012
Braintree Clojure Example
View core.clj
(ns braintree-clj.core
(:import [com.braintreegateway BraintreeGateway Environment TransactionRequest Transaction$Type])
(:require [clojure.string :as s]
[hiccup.core :as hiccup]
[hiccup.page-helpers :as page-helper]
[noir.core :as noir]
[noir.request :as noir-req]