English, asked by mahimamenda1560, 8 months ago

Write a letter to your friend telling him or her about what you want to do after your Basic Education Certificate Examination

Answers

Answered by aman7913
1

&lt;html&gt;</p><p>&lt;head&gt;&lt;title&gt;flower animation&lt;/title&gt;</p><p>&lt;/head&gt;</p><p>&lt;body style="margin:0px;"&gt;</p><p>&lt;canvas style="background-color:#000;"&gt;&lt;/canvas&gt;</p><p>&lt;script&gt;</p><p>var canvas = document.querySelector("canvas");</p><p>var context = canvas.getContext('2d');</p><p>canvas.width=window.innerWidth;</p><p>canvas.height=window.innerHeight;</p><p>var an=0.04;k= -0.07,no=5;</p><p>function animate() {</p><p>an=an+k;</p><p>var x =canvas.width/2+(canvas.width-25)/2*Math.sin(an)*Math.sin(an)*Math.sin(an); </p><p>var y =-(-canvas.width/2+13*(13*Math.cos(an)-5*Math.cos(2*an)-2*Math.cos(3*an)-Math.cos(4*an)));</p><p>context.beginPath();</p><p>context.moveTo(x,y);</p><p>context.strokeStyle="hsl("+360*Math.random()+",100%,50%)";</p><p>for(var a=0;a&lt;2*Math.PI;a+=0.01){</p><p>var xt=x+8*Math.cos(no*a)*Math.cos(a);</p><p>var yt=y+8*Math.cos(no*a)*Math.sin(a);</p><p>context.lineTo(xt,yt);</p><p>}</p><p>context.stroke();</p><p>context.closePath();</p><p>context.beginPath();</p><p>context.moveTo(canvas.width/2,canvas.width/2);</p><p>context.lineTo(x,y);</p><p>context.stroke();</p><p>context.closePath();</p><p>if(an&gt; 6.5){ </p><p>k= -0.07;</p><p>no=Math.floor(Math.random()*9)+2;</p><p>context.clearRect(0,0,canvas.width,canvas.height); </p><p>}</p><p>if(an&lt; -0.07) </p><p>{ k= 0.07; </p><p>no=Math.floor(Math.random()*9)+2;</p><p>context.clearRect(0,0,canvas.width,canvas.height);</p><p>}</p><p>requestAnimationFrame(animate)|| webkitRequestAnimationFrame(animate)|| mozRequestAnimationFrame(animate) || oRequestAnimationFrame(animate)|| msRequestAnimationFrame(animate);</p><p>}</p><p>requestAnimationFrame(animate)|| webkitRequestAnimationFrame(animate)|| mozRequestAnimationFrame(animate) || oRequestAnimationFrame(animate)|| msRequestAnimationFrame(animate);</p><p>&lt;/script&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;

Similar questions