Click to add new points. Hit the DELETE key to remove the selected point. Use the dropdown menu to change the interpolation mode.
<?php | |
// Watermark with Imagick | |
// load images | |
$image = new Imagick("image.jpg"); | |
$watermark = new Imagick("watermark.png"); | |
// translate named gravity to pixel position | |
$position = gravity2coordinates($image, $watermark, 'lowerRight', 5, 5); | |
// compose watermark onto image |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<script> | |
var svg = d3.select("body").append("svg") | |
.attr("viewBox", "0 0 500 300"); | |
svg.append("defs").append("path") |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<style type="text/css"> | |
#line{ | |
width: 100%; | |
margin: 20px 0; | |
height: 300px; | |
background: #eee; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>Point-Along-Path Interpolation</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.4.6"></script> | |
<style type="text/css"> | |
path { | |
cursor: pointer; |
This globe rotates along φ (latitude) and then along λ (longtitude). Normally, the axes are rotated in the opposite order. D3’s new geometry pipeline allows multiple rotations to be applied sequentially, allowing you to specify the desired order.
A recreation of Jason Davies’ satellite projection test using the prototype D3 graphics pipeline.
This stylized globe uses D3’s in-development geometry pipeline to jitter points before rendering. Points are sampled along great arcs, jittered, and then smoothed using basis-spline interpolation to achieve a hand-drawn effect. The resulting spherical geometry is computed once, allowing faster rendering with arbitrary rotation!
This techinque was developed in collaboration with Derek Watkins for Norway the Slow Way.
This animation shows the branching process of Bridson’s Poisson-disc sampling algorithm. Each time a new sample is added, a line is drawn between the new sample and the neighboring sample that spawned it.
Another variation of color-cycling a spanning tree generated by Prim’s algorithm. Here the periodicity of the color scale by tree depth is varied over time, alternating between emphasis of micro and macro structure. This idea was suggested in a Hacker News comment.