- 69 名前:デフォルトの名無しさん mailto:sage [2020/07/18(土) 10:23:44 ID:Z+cMIoZ7.net]
- >>68
HTML5,JavaScript <canvas id="cv" width="360" height="360"></canvas> <script> var ctx = document.getElementById("cv").getContext("2d"); ctx.lineWidth = 5; //線の太さ ctx.strokeStyle = "red"; ctx.beginPath(); var r=10;var x0=0,y0=0; for(i=0;i<=360;i+=5){ var d = i*Math.PI/180; x0= r*(16*Math.sin(d)*Math.sin(d)*Math.sin(d)); y0= r*(13*Math.cos(d)-5*Math.cos(2*d)-2*Math.cos(3*d)-Math.cos(4*d)); ctx.lineTo(w+x0,h-y0); } ctx.stroke(); </script> https://i.imgur.com/9tjfBmv.png
|

|