Skip to content

Instantly share code, notes, and snippets.

@curran
Last active February 15, 2017 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curran/6bc5d520d588227d201df12350fbe7ba to your computer and use it in GitHub Desktop.
Save curran/6bc5d520d588227d201df12350fbe7ba to your computer and use it in GitHub Desktop.
The Vibratory Effect of Texture
license: mit

A D3 replica of figure 1 on page 80 of "Semiology of Graphics".

The Vibratory Effect of Texture
Black and white combined in a certain way over areas can create the uncomfortable sensation produced by figure 1. This visual effect constitutes a remarkable selective possibility when it is properly utilized. -- Jacques Bertin

Built with blockbuilder.org

<!DOCTYPE html>
<script src="https://d3js.org/d3.v4.min.js"></script>
<svg width="960" height="500"></svg>
<script>
var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height"),
n = 80;
svg.selectAll("rect").data(d3.range(n))
.enter().append("rect")
.attr("width", width / n / 2)
.attr("height", height)
.attr("x", function (d){ return d * width / n; });
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment