Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pentagon

Public visualization

Viewing a saved revision (read-only)

95ad33f737c44264afb36c9baf284139

Pentagon

0 stars1🌍 Public
RRubens
Last edited Sep 29, 2018
Created on Sep 26, 2018
Forked from Hello VizHub

This visualization displays a pentagon composed of purple lines, with a central point connected to each of the five vertices by spokes, alongside the pentagon’s edges. The shape is generated mathematically using D3’s `range` function to compute five evenly spaced angles, then calculating vertex coordinates with sine and cosine. The code uses `svg.selectAll('line').data(lines)` to bind the line data and appends SVG `line` elements with attributes for position and stroke styling. All rendering is done with D3 v5 in an SVG container.

AI-generated description