variation Pascal's Triangle
✓ Published0🌍 Public
This visualization presents a variation of Pascal's Triangle, where each row is a sequence of circles colored green or red based on whether the value is divisible by the row index. The triangle is built procedurally, generating 22 rows using a custom `nextRow` function that computes each row's sum-based values. Rendered as SVG via D3 v6, the code uses `d3.select` and `d3.append` to create a single SVG, with each row as a `<g>` element translated vertically and each circle horizontally. The fill color is determined by `j%i`, showing the modulo pattern across the structure.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed