Hi !

For a homework, I need to write Rauzy Fractal in Javascript.
But I'm lost and don't know how write it at all.

I found the code in Sage Language :
WordMorphism('a->aC,b->d,C->de,d->a,e->ab')
m.rauzy_fractal_plot()
t = WordMorphism("a->aC,b->d,C->de,d->a,e->ab")
V = [vector((0,0,1,0,-1)), vector((0,0,1,-1,0))]
S = set(map(tuple, [i*V[0] + j*V[1] for i in [-1,0,1] for j in [-1,0,1]]))
t.rauzy_fractal_plot(n=10000, translate=S, exchange=true)
Help me please

Thanks