animacion3 = {
const svg = d3.create('svg')
.attr('width', width3)
.attr('height', height3)
const cx = 200
const cy = 200
const r = 170
const circle = svg.selectAll('circle')
.data( data )
.enter()
.append("circle")
.attr('r', 15)
.attr('cx', d => cx + r * Math.cos(d))
.attr('cy', d => cy + r * Math.sin(d))
.style('fill', (d,i) => d3.quantize(d3.interpolateRainbow, data.length + 1)[i])
while(true) {
yield svg.node()
await circle.transition()
.duration(5000)
.attr('cx', (d,i,arr) => 400 - d3.select(arr[i]).attr('cx'))
.attr('cy', (d,i,arr) => 400 - d3.select(arr[i]).attr('cy'))
.end()
}
}