Skip to main content
100%

3D DNA HELIX From Sequence

✓ Published0🌍 Public
MMauricio García Benítez
Last edited Dec 28, 2020
Created on Dec 28, 2020

This animated visualization renders a DNA helix from a user-supplied text sequence, showing two intertwined strands that rotate over time. Each nucleotide is represented as a colored circle, with colors mapped via `d3.interpolateRainbow` based on the unique characters in the string, while connecting lines between complementary bases emphasize the helical structure. The code uses D3.js v5 with SVG elements, updating positions and scales through a `setInterval` loop that regenerates data and applies logarithmic z-depth scaling to simulate three-dimensional perspective. The animation highlights the sequence’s layout by encoding torsional rotation and opacity changes.

AI-generated description

A program to show a 3D DNA Helix

Adapted from : (https://observablehq.com/@tarte0/dna-helix)

MIT Licensed

Similar vizzes