Skip to main content
100%

Pascal's Triangle

✓ Published1🌍 Public
MMTR
Last edited May 1, 2021
Created on Apr 2, 2021
Forked from d3 Animation

This visualization displays Pascal’s Triangle as a series of 22 rows of numerically generated values, arranged as an SVG in a stepped diagonal layout. Each row is computed from the previous one using a custom `nextRow` function that sums adjacent elements with a coefficient of 2, producing the triangle’s entries. The code uses D3 v6 data joins to append SVG groups and text elements, positioning rows vertically via `translate` transforms and columns horizontally with a fixed offset. Circles styled with red strokes are defined in CSS but not rendered in the visible output.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes