Skip to content

Instantly share code, notes, and snippets.

// this has code to make the diffie-hellman example
// biggest possible number until js math starts messing up 9223372036854775807
var maxnum = Number.MAX_SAFE_INTEGER;
// I think with the bigint library max is:
// 9007199254740992
// the input for p
var pinput = d3.select('#pinput');
var p = pinput.property('value');
@mpmckenna8
mpmckenna8 / deps4d3.ndjson
Last active January 20, 2017 01:26
Force directed layout of d3's dependencies
{"name":"d3","dependencies":[{"name":"d3-zoom","href":"/package/d3-zoom"},{"name":"d3-voronoi","href":"/package/d3-voronoi"},{"name":"d3-transition","href":"/package/d3-transition"},{"name":"d3-timer","href":"/package/d3-timer"},{"name":"d3-time-format","href":"/package/d3-time-format"},{"name":"d3-time","href":"/package/d3-time"},{"name":"d3-shape","href":"/package/d3-shape"},{"name":"d3-selection","href":"/package/d3-selection"},{"name":"d3-scale","href":"/package/d3-scale"},{"name":"d3-request","href":"/package/d3-request"},{"name":"d3-random","href":"/package/d3-random"},{"name":"d3-queue","href":"/package/d3-queue"},{"name":"d3-quadtree","href":"/package/d3-quadtree"},{"name":"d3-polygon","href":"/package/d3-polygon"},{"name":"d3-path","href":"/package/d3-path"},{"name":"d3-interpolate","href":"/package/d3-interpolate"},{"name":"d3-hierarchy","href":"/package/d3-hierarchy"},{"name":"d3-geo","href":"/package/d3-geo"},{"name":"d3-format","href":"/package/d3-format"},{"name":"d3-force","href":"/package/d3-
@mpmckenna8
mpmckenna8 / .block
Created December 23, 2016 20:28 — forked from mbostock/.block
Vector Tiles
license: gpl-3.0
@mpmckenna8
mpmckenna8 / .block
Created December 16, 2016 23:16 — forked from mbostock/.block
geo2svg
license: gpl-3.0
height: 1100
border: no
@mpmckenna8
mpmckenna8 / index.html
Last active November 22, 2016 20:19
Simple SFPD Map
<!DOCTYPE html>
<html>
<body>
<h1>
Crime info
</h1>
<svg id="map"></svg>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.js"></script>
@mpmckenna8
mpmckenna8 / index.html
Created September 26, 2016 00:43
Very simple noisy javascript
<html>
<head>
<link rel="stylesheet" href="style/main.css" />
<title> The simplest HTML example
</title>
</head>
<body>
<h1> This is an HTML Page in which some javascript makes noise.</h1>
<script src="noisey.js"></script>
@mpmckenna8
mpmckenna8 / README.md
Created August 23, 2016 15:10
Animated trig equations in polar coordinates

One of the hardest things for me to visualize in my integral calculus class was how graphing things in polar coordinates worked.

We weren't allowed to or encouraged to use graphing calculators. So I built a little thing that will graph them in an annimated way and say between which major angles it's currently graphing.

Right now it just does 0 to 2pi in radians but you could add or remove some or make a interval generator. Also you could make it so a user could enter in an equation to get graphed or automatically scale stuff or lots of stuff.

Maybe I'll even try to make it better. Let me know if there's anything you'd want to see.

@mpmckenna8
mpmckenna8 / README.md
Created August 19, 2016 02:08
Higher mathmatics

Why try and learn math after useful arithmatic? Because you can use trig functions make weed leaf shapes.

@mpmckenna8
mpmckenna8 / README.md
Last active August 11, 2016 19:48
Pretty trig function animation

Pretty not really functional thing using trig function polar coordinate graph with d3 and some css animations.

@mpmckenna8
mpmckenna8 / .block
Last active August 10, 2016 21:01
Polar coords
license: gpl-3.0
border: yes
scrolling: yes
height: 600