Skip to content

Instantly share code, notes, and snippets.

View astefanutti's full-sized avatar

Antonin Stefanutti astefanutti

View GitHub Profile
@astefanutti
astefanutti / README.md
Created December 23, 2015 09:28 — forked from mbostock/.block
Solar Oscillator

In honor of the vernal equinox, this animation shows the progression of the solar terminator at approximately 5.2 million times its normal rate. Each frame of the animation advances twenty-four hours ahead of real-time so that the seasonal changes of the solar terminator are visible. The blue region is night; the white region is day. Best accompanied with the theme song from Buck Rogers.

@astefanutti
astefanutti / README.md
Created December 23, 2015 09:23 — forked from mbostock/.block
Solar Analemmas

Hourly solar analemmas (ignoring daylight savings time) as seen from San Francisco in 2014.

@astefanutti
astefanutti / README.md
Created December 23, 2015 09:21 — forked from mbostock/.block
Solar Path

This chart shows the path of the Sun in the sky today based on your current location. The red dot represents the current apparent position of the Sun in terms of azimuth and elevation.

The outer black circle represents the horizon, where the elevation of the Sun is 0°. If the Sun is outside this circle, it is below the horizon. (This means it’s dark outside, though note that some definitions of twilight extend as far as 18° below the horizon.) Where the path intersects the horizon determines sunrise and sunset. The inner concentric circles represent higher solar elevations.

The radiating lines of the graticule represent azimuth. For example, 0° azimuth means that the Sun is due North of your current location. The azimuth tells you the direction of shadows cast by the Sun, while the elevation determines their length.

@astefanutti
astefanutti / doyle.js
Created December 23, 2015 09:16 — forked from robinhouston/doyle.js
Doyle spiral explorer
/* Numerics for Doyle spirals.
* Robin Houston, 2013
*/
(function() {
var pow = Math.pow,
sin = Math.sin,
cos = Math.cos,
pi = Math.PI;
@astefanutti
astefanutti / index.html
Created December 23, 2015 09:13 — forked from robinhouston/index.html
Double stumbling blocks
<!DOCTYPE html>
<meta charset="utf-8">
<title>Double stumbling blocks</title>
<script src="http://bl.ocks.org/robinhouston/raw/6096562/rAF.js" charset="utf-8"></script>
<script src="http://bl.ocks.org/robinhouston/raw/6096562/doyle.js" charset="utf-8"></script>
<canvas width=960 height=500></canvas>
<script>
// Initialisation
var canvas = document.getElementsByTagName("canvas")[0],
context = canvas.getContext("2d");