The following instructions assume a debian jessie based distribution
Install dependent tools and libraries
$ sudo apt-get update
<canvas><script>T=Math;S=T.sin;Q=T.cos;N=(M=75)*2;C=(V=document.all[3]).getContext("2d");a=b=d=1.8;c=.3;setInterval(function(){V.height=300;x=y=i=1e4;a-=1/N;while(--i)C.fillRect((t=x,x=S(a*y)-Q(b*x))*M+N,(y=S(c*t)-Q(d*y))*M+N,1,1)})</script> |
(ns hologp.path | |
(:require | |
[thi.ng.geom.core :as g] | |
[thi.ng.geom.core.vector :as v] | |
[thi.ng.math.core :as m])) | |
(def config | |
{:mov [10 20] | |
:turn [45 45] | |
:if-target {:non-empty 0.2 |
;; random example program AST (w/ peephole optimization) | |
;; fixed target threshold 25, fixed rotation 45 deg | |
;; unoptimized version: https://gist.github.com/postspectacular/f421037929be75ee7e4e | |
[[if-target 25 | |
[[mov 47] | |
[turn 45] | |
[mov 17] | |
[turn 90]] | |
[[if-target 25 | |
[[mov 10] |
;; random example program AST | |
;; fixed target threshold 25, fixed rotation 45 deg | |
[[if-target 25 | |
[[mov 15] | |
[mov 15] | |
[mov 17] | |
[turn 45] | |
[mov 17] | |
[turn 45] | |
[turn 45]] |
;; pretty printed randomly generated reproduction function | |
;; x = position in curr. generation | |
;; y = generation | |
;; gene = value at (x,y) | |
(set-cell | |
x y | |
(if (and (prob (abs-sin (* x (+ 0.70618 (/ y 4.62437))))) | |
(pos? (dist x y 0 (- (sq (>> y 3.39245)))))) | |
(mod (+ (+ gene (sin (* y 0.11592))) | |
(* 0.05011 (+ (gene-at x y -3 0) (gene-at x y 3 0)))) |
(ns sdf-voxel | |
(:require | |
[thi.ng.geom.core :as g] | |
[thi.ng.geom.core.vector :as v :refer [vec3]] | |
[thi.ng.geom.voxel.svo :as svo] | |
[thi.ng.geom.voxel.isosurface :as iso] | |
[thi.ng.geom.mesh.io :as mio] | |
[clojure.java.io :as io])) | |
(defn sd-nested-sphere |
.syntax unified | |
.cpu cortex-m4 | |
.thumb | |
// configuration values for STM32F4x | |
// see: http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf | |
#define AHB1PERIPH_BASE 0x40020000 | |
#define RCC_BASE AHB1PERIPH_BASE + 0x3800 | |
#define RCC_AHB1_ENR RCC_BASE + 0x30 |
.syntax unified | |
.cpu cortex-m4 | |
.thumb | |
// configuration values for STM32F4x | |
// see: http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf | |
#define AHB1PERIPH_BASE 0x40020000 | |
#define RCC_BASE AHB1PERIPH_BASE + 0x3800 | |
#define RCC_AHB1_ENR RCC_BASE + 0x30 |
;; query spec to compute aggregated heatmap data of all property sales per borough | |
{:prefixes {"sg" "http://statistics.data.gov.uk/def/statistical-geography#"} | |
:q [{:where [[?s "rdf:type" "schema:SellAction"] | |
[?s "schema:price" ?price] | |
[?s "ws:onsID" ?boroughID] | |
[?borough "rdfs:label" ?boroughID] | |
[?borough "sg:officialName" ?name] | |
[?borough "sg:hasExteriorLatLongPolygon" ?poly]]}] | |
:aggregate {?num (agg-count ?s) | |
?avg (agg-avg ?price) |