JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<canvas id="myCanvas" width="800" height="800"></canvas>
<script>
let creal = -.8 , cimag = .156 , canvas = document.getElementById('myCanvas') , context = canvas.getContext('2d') , frame = 0 , pallette = [] , julia = function() { let t1 = [...new Array(200)].forEach( (_, y) => { let t2 = [...new Array(200)].forEach( (_, x) => { let cx = -2+x/50 , cy = -2+y/50 , i = 0 , t3 = (function(){ do { let t4 = xt=cx*cx-cy*cy+creal , t5 = cy=2*cx*cy+cimag , t6 = cx=xt , t7 = i++ } while ((cx*cx+cy*cy<4)&&i<25) })() , t8 = context.beginPath() , f9 = context.rect(x*4, y*4, 4, 4) , f10 = context.fillStyle = pallette[i] , f11 = context.fill() }) }) , t12 = frame++ , t13 = creal=-.8+.6*Math.sin(frame/(3.14*20)) , t14 = cimag=.156+.4*Math.cos(frame/(3.14*40)) } , t15 = [...new Array(10)].forEach( (_, x) => { let color = (31*x).toString(16) , t16 = color.length==1 ? color='0'+color : true , t17 = pallette[x]='#'+color+color+'ff' , t18 = pallette[x+8]='#00ff'+color , t19 = pallette[17+x]='#'+color+'0000' }) , a = setInterval(julia,100)
</script>
</body>
JavaScript
/**
let creal = -.8
, cimag = .156
, canvas = document.getElementById('myCanvas')
, context = canvas.getContext('2d')
, frame = 0
, pallette = []
, julia = function() {
let t1 = [...new Array(200)].forEach( (_, y) => {
let t2 = [...new Array(200)].forEach( (_, x) => {
let cx = -2+x/50
, cy = -2+y/50
, i = 0
, t3 = (function(){
do {
let t4 = xt=cx*cx-cy*cy+creal
, t5 = cy=2*cx*cy+cimag
, t6 = cx=xt
, t7 = i++
} while ((cx*cx+cy*cy<4)&&i<25)
})()
, t8 = context.beginPath()
, f9 = context.rect(x*4, y*4, 4, 4)
, f10 = context.fillStyle = pallette[i]
, f11 = context.fill()
})
})
, t12 = frame++
, t13 = creal=-.8+.6*Math.sin(frame/(3.14*20))
, t14 = cimag=.156+.4*Math.cos(frame/(3.14*40))
}
, t15 = [...new Array(10)].forEach( (_, x) => {
let color = (31*x).toString(16)
, t16 = color.length==1 ? color='0'+color : true
, t17 = pallette[x]='#'+color+color+'ff'
, t18 = pallette[x+8]='#00ff'+color
, t19 = pallette[17+x]='#'+color+'0000'
})
, a = setInterval(julia,100)
*/