Michael Holroyd
Computer Graphics Ph.D.
CVJS December 2019
Michael Holroyd, PhD
@meekohi
meekohi.com
Tools for event organizers
Tools for event curators
Growing partner network
Mike Bostock (d3)
Jeremy Ashkenas (underscore)
https://observablehq.com/@observablehq/introduction-to-data
client = DatabaseClient("Baby Names")
names = client.query(`
SELECT name, gender, year, SUM(number) AS number
FROM names
WHERE year > ?
GROUP BY name, gender, year`, [1920])
https://observablehq.com/@observablehq/observables-not-javascript
{
let i = 0;
while (true) {
yield ++i;
}
}
while (true) {
context.save();
context.clearRect(0, 0, width, height);
for (let i = 0; i < n; ++i) {
const p = particles[i];
p.x += p.vx;
if (p.x < -mD) p.x += width + mD * 2;
else if (p.x > width + mD) p.x -= width + mD * 2;
p.y += p.vy;
if (p.y < -mD) p.y += height + mD * 2;
else if (p.y > height + mD) p.y -= height + mD * 2;
p.vx += 0.2 * (Math.random() - .5) - 0.01 * p.vx;
p.vy += 0.2 * (Math.random() - .5) - 0.01 * p.vy;
context.beginPath();
context.arc(p.x, p.y, radius, 0, 2 * Math.PI);
context.fill();
}
context.restore();
yield context.canvas;
}
https://observablehq.com/@observablehq/standard-library
https://observablehq.com/@observablehq/introduction-to-views
tex.block`
f(x) = \int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi
`
Create a map of all SceneThink locations, pulled directly from the database.
By Michael Holroyd
Presentation on Observable for the Central Virginia Javascript Meetup, Dec 2019.