8ใ‚นใƒ†ใƒƒใƒ—ใฎใƒฉใƒณใƒ€ใƒ ็Œซใ‚ธใ‚งใƒใƒฌใƒผใ‚ฟใƒผ



ๆฅฝใ—ใ„ๆ™‚้–“ใ‚’๏ผ

็งใฏใ„ใคใ‚‚็ŒซใŒๅคงๅฅฝใใงใ€็‰นใซ็Œซใฎ้ก”ใ‚’ๆใใฎใŒๅคงๅฅฝใใงใ—ใŸใ€‚ ใƒ•ใ‚ฉใƒผใƒ ใ€ใƒฉใ‚คใƒณใ€ใŠใ‚ˆใณใพใฃใŸใ็•ฐใชใ‚‹่กจ็พใ€็•ฐใชใ‚‹ใƒ ใƒผใƒ‰ใ‚’ใ‚ใšใ‹ใซๅค‰ๆ›ดใ—ใพใ™ใ€‚ ็งใฎA4ใ‚ทใƒผใƒˆใฏ้™็•Œใพใงๅผ•ใๅฏ„ใ›ใ‚‰ใ‚Œใพใ—ใŸใ€‚ ใใ—ใฆใ€ใ“ใ“ใง็งใฏๆœ€่ฟ‘้ ญใ‚’ๆ‰“ใŸใ‚Œใพใ—ใŸ-ใ—ใ‹ใ—ใ€ใ‚ใชใŸใŒ้Šƒๅฃ็Œซใฎใ‚ธใ‚งใƒใƒฌใƒผใ‚ฟใƒผใ‚’ไฝœใ‚‹ใชใ‚‰ใฐใฉใ†ใงใ™ใ‹๏ผŸ ใƒœใ‚ฟใƒณใ‚’ใ‚ฏใƒชใƒƒใ‚ฏใ—ใฆใ€ใƒฉใƒณใƒ€ใƒ ใช็Œซใฎ้ก”ใ‚’ๆŠ•ใ’ใพใ™ใ€‚ ใงใใ‚‹ใ ใ‘ใƒฉใƒณใƒ€ใƒ ใง้ข็™ฝใ„ใ€‚ ใใฎใ‚ˆใ†ใชใ‚‚ใฎใ‚’ไฝœใ‚‹ๆ–นๆณ•ใ‚’่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚

็งใฏ็Œซใ€็Œซๆ„›ๅฅฝๅฎถใ‚’ใŠ้ก˜ใ„ใ—ใพใ™ใ€‚



JSใจCanvasใงใ™ในใฆใ‚’่กŒใ„ใพใ™ใŒใ€ๅˆๆœŸๅŒ–ใ€ๆง‹ๆˆใชใฉใฎใ‚ณใƒผใƒ‰ใฏๆไพ›ใ—ใพใ›ใ‚“ใ€‚ ใ“ใ‚Œใฏใ‚คใƒณใ‚ฟใƒผใƒใƒƒใƒˆไธŠใงใ„ใฃใฑใ„ใงใ™ใŒใ€็Œซใ‚’ๆใๆ–นๆณ•ใ‚’่€ƒใˆใฆใ„ใพใ™ใ‚ˆใญ๏ผŸ



ใ•ใ‚‰ใซไพฟๅˆฉใชใ‚ˆใ†ใซใ€ใ„ใใคใ‹ใฎๅฎš็พฉๆธˆใฟ้–ขๆ•ฐใฎใฟใ‚’ๆไพ›ใ—ใพใ™ใ€‚



function add(func, scale){ Graphics.ctx.scale(scale.x, scale.y); func(Graphics.ctx); Graphics.ctx.scale(1, 1); }
      
      





ใ‚ญใƒฃใƒณใƒใ‚นใฎใ‚ตใ‚คใ‚บใ‚’ๅค‰ๆ›ดใ—ใ€ไฝ•ใ‹ใ‚’ๆใ„ใฆใ€ๅ…ƒใซๆˆปใ—ใพใ™ใ€‚



 function drawircle(ctx, pos, radius, fillColor, strokeColor, lineWidth) { ctx.beginPath(); ctx.arc(center.x - pos.x, center.y + pos.y, radius, 0, 2*Math.PI, false); ctx.fillStyle = fillColor; ctx.fill(); ctx.lineWidth = lineWidth; ctx.strokeStyle = strokeColor; ctx.stroke(); }
      
      







ใใ—ใฆใ€ใ“ใ‚Œใฏๅ††/ๅ††ใ‚’ๆใ„ใฆใ„ใพใ™ใ€‚ ใพใŸใ€ไฝ•ใ‚‚็‰นๅˆฅใชใ“ใจใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ใ“ใ‚Œใ‚‰ใฏใ™ในใฆใƒใƒ–ใงใฉใ“ใงใ‚‚ไฝ•็™พไธ‡ๅ›žใ‚‚่ชญใ‚€ใ“ใจใŒใงใใพใ™ใ€‚ใ™ใใซ็Œซใซ่กŒใใพใ—ใ‚‡ใ†๏ผ



ใ‚นใƒ†ใƒƒใƒ—1-้ ญ



้ ญใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚ ้ ญใŒใ‚ใ‚Šใพใ™ใ‹๏ผŸ ๅ††ๅ‘จใ€‚ ๅฐ‘ใ—็ตžใ‚‹ใ‹ใ€ๆ‹กๅคงใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚

ใ‚นใƒˆใƒญใƒผใ‚ฏใฎๅคชใ•ใ‚’่จญๅฎšใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚ใ“ใ‚Œใ‚‚่กŒใ„ใพใ™ใ€‚ ใใ—ใฆใ€็ดฐ้ƒจใŒๅฐ‘ใ—ใ‚ใ‚Šใพใ™ใ€‚ใ‚ณใƒผใƒ‰ใฎใ‚ณใƒกใƒณใƒˆใ‚’่ฆ‹ใฆใใ ใ•ใ„ใ€‚

ใ‚ณใƒผใƒ‰ๅ…จไฝ“ใซใ‚ณใƒกใƒณใƒˆใŒไป˜ใ‘ใ‚‰ใ‚ŒใฆใŠใ‚Šใ€็†่งฃใซๅ•้กŒใฏใชใ„ใจๆ€ใ„ใพใ™ใ€‚



 //   var radius = Math.sRandom(60, 70); //  var scaleCircle = {x:Math.sRandom(1,1.1),y:Math.sRandom(0.9,1.0)}; //  var whiteColor = "#fff"; var blackColor = "#000"; // add(function(ctx){ // (Math.sRandom(0, 100) < 95 ? blackColor : whiteColor) -  , , ,   , ..    . ,   . drawircle(ctx, {x:0,y:0}, radius, whiteColor, (Math.sRandom(0, 100) < 95 ? blackColor : whiteColor), Math.sRandom(2,5)); }, scaleCircle);
      
      







้ ญใจ็™ปๅ ดใ€‚







็ถšใ‘ใพใ—ใ‚‡ใ†๏ผ



ใ‚นใƒ†ใƒƒใƒ—2-่€ณ



็Œซใฎ่€ณใฏใ€้Šƒๅฃใฎๆœ€ใ‚‚่กจ็พๅŠ›่ฑŠใ‹ใช่ฆ็ด ใฎ1ใคใงใ™ใ€‚ ใ—ใŸใŒใฃใฆใ€่€ณใฎๅน…ใŒ็•ฐใชใ‚Šใ€ๅ›ž่ปขใ™ใ‚‹่€ณใŒ็•ฐใชใ‚‹ใปใฉใ€่กจ็พใฎๅคšๆง˜ๆ€งใฏๅคงใใใชใ‚Šใพใ™ใ€‚

ใ—ใพใ™ใ€‚



  //,   ,     var dir = {x:0, y:radius}; //  var angleOne = Math.PI + Math.PI/Math.sRandom(2, 5); //      var pointR1 = VectorRot(dir, angleOne); //  ,         var pointR2 = VectorRot(dir, angleOne - Math.PI/Math.sRandom(4, 7)); //    var topPointR = {x:((pointR1.x + pointR2.x) / 2)+Math.sRandom(-10, 10), y:pointR2.y - 30 + Math.sRandom(0, 5)}; // add(function(ctx){ //   ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor; ctx.lineWidth = Math.sRandom(2, 4); topPointR = {x:topPointR.x+Math.sRandom(-1,5), y:topPointR.y+Math.sRandom(-5,5)}; ctx.moveTo(center.x + pointR1.x,center.y + pointR1.y); ctx.lineTo(center.x + topPointR.x,center.y + topPointR.y); ctx.lineTo(center.x + pointR2.x,center.y +pointR2.y); ctx.fill(); ctx.stroke(); //   ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor; ctx.lineWidth = Math.sRandom(2, 4); var topPointL = VectorXInvert({x:topPointR.x+Math.sRandom(-5,5), y:topPointR.y+Math.sRandom(-5,5)}); var pointL1 = VectorXInvert(pointR1); var pointL2 = VectorXInvert(pointR2); ctx.moveTo(center.x + pointL1.x,center.y + pointL1.y); ctx.lineTo(center.x + topPointL.x,center.y + topPointL.y); ctx.lineTo(center.x + pointL2.x,center.y +pointL2.y); ctx.fill(); ctx.stroke(); }, {x:1,y:1});
      
      







IIIiiใฏๆฌกใฎใจใŠใ‚Šใงใ™ใ€‚







ใ™ใงใซ็Œซใซไผผใฆใ„ใพใ™ใ‚ˆใญ๏ผŸ



ใ‚นใƒ†ใƒƒใƒ—3-ๅฃใฒใ’



่กจ็พๅŠ›ใฎ2็•ช็›ฎใฏใ€่€ณใซ็ถšใ„ใฆใ€็Œซใฎ้ก”ใฎ่ฆ็ด ใงใ™ใ€‚ ใใ‚Œใ‚’ไฝœใ‚‹ใฎใฏ้›ฃใ—ใ„ใ“ใจใงใฏใ‚ใ‚Šใพใ›ใ‚“ใŒใ€ใ‚ˆใ‚Šไฟกใ˜ใ‚‰ใ‚Œใชใ„ใ‚ˆใ†ใซ่ฆ‹ใˆใ‚‹ใ‚ˆใ†ใซใ™ใ‚‹ใฎใŒใ‚ˆใ‚Š้›ฃใ—ใใชใ‚Šใพใ™ใ€‚ 1ใคใฎใƒฉใƒณใƒ€ใƒ ใชๅฎถใงใฏใงใใพใ›ใ‚“ใ€‚ใ‚ˆใ‚Š็ทšๅฝขใฎ็ตๆžœใ‚’ๅพ—ใ‚‹ใซใฏใ€ใ‚ตใ‚คใ‚ฏใƒซใ‚’ใญใ˜ใฃใฆใ€ใ‚ซใ‚ฆใƒณใ‚ฟใƒผใงใƒใ‚คใƒณใƒˆใ‚’่จˆ็ฎ—ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚



  //    //  ,        // -    var pointsR = []; //   var count = Math.floor(Math.sRandom(3, 5)); for (var i = 0; i < count; i++) { // ,      /    var dir = {x:0, y:radius/Math.sRandom(1.6,1.9)}; // ,   ,   var angleOne = Math.PI/(2 + ((i+1)/4)); //  var pointR1 = VectorRot(dir, angleOne); // y  ,     count      //      var y = pointR1.y+(i < count / 2 ? -Math.sRandom(8, 25) : Math.sRandom(7, 15) ); //       pointsR.push({begin:pointR1, end:{x:pointR1.x - Math.sRandom(60, 100),y:y}}); } //    var lineWidth = Math.sRandom(0.5, 2); // add(function(ctx){ //  for (var i = 0; i < pointsR.length; i++) { ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor; ctx.lineWidth = lineWidth; ctx.moveTo(center.x - pointsR[i].begin.x,center.y + pointsR[i].begin.y); ctx.lineTo(center.x - pointsR[i].end.x,center.y + pointsR[i].end.y); ctx.stroke(); } //  for (var i = 0; i < pointsR.length; i++) { ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor; ctx.lineWidth = lineWidth; var pointLBegin = VectorXInvert(pointsR[i].begin); var pointLEnd = VectorXInvert(pointsR[i].end); ctx.moveTo(center.x - pointLBegin.x,center.y + pointLBegin.y); ctx.lineTo(center.x - pointLEnd.x,center.y + pointLEnd.y); ctx.stroke(); } }, {x:1,y:1});
      
      







VectorXInvert้–ขๆ•ฐใฏ็…ฉใ‚ใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚xๅ€‹ใฎ็•ฐใชใ‚‹่ฆ็ด ใ‚’้ ป็นใซๅๆ˜ ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใŸใ‚ใ€x = -xใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅ˜็ด”ใช้–ขๆ•ฐใŒไฝœๆˆใ•ใ‚Œใพใ™ใ€‚



็ŒซใŒใฉใฎใ‚ˆใ†ใซๆใ‹ใ‚Œใ‚‹ใ‹่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚







ใ‚นใƒ†ใƒƒใƒ—4-ๅฃ



็พๅฎŸ็š„ใซ่กŒใ†ใฎใฏ้žๅธธใซ้›ฃใ—ใ„ใŸใ‚ใ€ๅฃใฎ็ทšใ‚’ๅ›ณๅผ็š„ใซไฝœๆˆใ—ใพใ™ใŒใ€ใ‚ฐใƒฉใƒ•ใ‚ฃใƒƒใ‚ฏใฎๆ็”ปใซใฏไฝฟ็”จใ—ใพใ™ใ€‚

ๅฃใฎ็ทšใ‚’ๅผ•ใใ‚ณใƒผใƒ‰ใ‚’ๆ›ธใใพใ™ใ€‚ ใƒ™ใ‚ธใ‚งๆ›ฒ็ทšใงไฝœๆˆใ€‚



  //--- //     .    + 2    // P0 // P3 | iP3 // | | | // P2--P1--iP2 var P0 = {x:center.x, y:center.y}; var P1 = {x:center.x, y:center.y + Math.sRandom(40, 65)}; var P2 = {x:center.x - Math.sRandom(29, 36),y: center.y + 40}; var P3 = {x:center.x - Math.sRandom(20, 40), y:center.y + Math.sRandom(23, 28)}; var iP2 = {x:center.x + Math.sRandom(29, 36),y: center.y + 40}; var iP3 = {x:center.x + Math.sRandom(20, 40), y:center.y + Math.sRandom(23, 28)}; // add(function(ctx){ ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor ; ctx.lineWidth = Math.sRandom(1,3); ctx.moveTo(P0.x,P0.y ); ctx.bezierCurveTo(P1.x, P1.y, P2.x, P2.y, P3.x, P3.y); ctx.stroke(); ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = fillColor ; ctx.lineWidth = Math.sRandom(1,3); ctx.moveTo(P0.x,P0.y ); ctx.bezierCurveTo(P1.x, P1.y, iP2.x, iP2.y, iP3.x, iP3.y); ctx.stroke(); }, {x:1,y:1});
      
      







ไฝ•ใŒ่ตทใ“ใฃใŸใฎใ‹่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚ ๅฟ่€ใ€ใปใ‚“ใฎๅฐ‘ใ—ๆฎ‹ใฃใฆใ„ใพใ™๏ผ





ใ‚นใƒ†ใƒƒใƒ—5-้ผป



้ผปใฏ้ผปใงใ™ใ€‚ ๅฐใ•ใชๅ††ใจไธ‰่ง’ๅฝขใฎ2ใคใฎใ‚ชใƒ—ใ‚ทใƒงใƒณใงๆง‹ๆˆใ—ใพใ—ใ‚‡ใ†ใ€‚ ๅ††ใฏใ‚ใพใ‚Š้ ป็นใซ่กจ็คบใ•ใ‚Œใพใ›ใ‚“ใ€‚ ใพใ‚ใ€ๆฅฝใ—ใฟใฎใŸใ‚ใซใ€‚

ใ‚‚ใกใ‚ใ‚“ใ€่‰ฒใ‚’ๅซใ‚ใฆใƒฉใƒณใƒ€ใƒ ใซๆททใœใฆใ€ใ•ใพใ–ใพใช้ผปใ‚’ๅก—ใ‚Šใพใ™-ๅก—ใ‚Šใคใถใ—ใ€่ผช้ƒญใ ใ‘ใซใ—ใพใ™ใ€‚ ใŸใใ•ใ‚“ใฎ็ŒซใŒๅฟ…่ฆใงใ™ใ‚ˆใญ๏ผŸ



  //   -  ,   var chance = Math.sRandom(0, 100); if(chance < 98) { //  var scale = {x:Math.sRandom(0.9,1.3), y:Math.sRandom(0.9,1.3)}; //  var pointR ={x:Math.sRandom(4,5)*scale.x,y:Math.sRandom(-5,-4)*scale.y}; //  var pointL ={x:Math.sRandom(-4,-5)*scale.x,y:Math.sRandom(-5,-4)*scale.y}; //  var bottomPoint ={x:0,y:Math.sRandom(5,6)*scale.y}; // add(function(ctx){ ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = (Math.sRandom(0, 100) > 50 ? fillColor : strokeColor); ctx.lineWidth = Math.sRandom(1,3); ctx.moveTo(center.x + pointR.x,center.y + 5 + pointR.y); ctx.lineTo(center.x + bottomPoint.x,center.y + 5 + bottomPoint.y); ctx.lineTo(center.x + pointL.x,center.y + 5 + pointL.y); ctx.closePath(); ctx.fill(); ctx.stroke(); }, {x:1,y:1}); } else { //  add(function(ctx){ drawircle(ctx, {x:0,y:0}, Math.sRandom(7, 10), strokeColor, strokeColor, 1); }, {x:1,y:1}); }
      
      







็งใŸใกใฎ็Œซใฏๅพใ€…ใซ็Œซใซๅค‰ใ‚ใฃใฆใ„ใพใ™ใ€‚ ใ“ใ‚Œใฏๅ–œใฐใ—ใ„ใ“ใจใงใ™ใ€‚







ใ‚นใƒ†ใƒƒใƒ—6-็›ฎ



็›ฎใฏ่ค‡้›‘ใงใ™ใ€‚ ใ„ใ„ใˆใ€ๆ็”ปใ™ใ‚‹ใฎใฏ้›ฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚2ใคใฎใƒ™ใ‚ธใ‚งๆ›ฒ็ทšใ ใ‘ใงใ™ใ€‚ ใ—ใ‹ใ—ใ€้–‰ใ˜ใŸ็›ฎใ‚’่ฟฝๅŠ ใ™ใ‚‹ๅฟ…่ฆใ‚‚ใ‚ใ‚Šใพใ™ใ€‚็Œซใฏ็œ ใ‚‹ใ“ใจใŒใงใใ€ๅ ดๅˆใซใ‚ˆใฃใฆใฏ็‰‡็›ฎใ‚’้–‹ใใ“ใจใ‚‚ใงใใพใ™ใ€‚ ใใ—ใฆใ€ใ“ใ‚Œใฏ่กŒใ‚ใ‚Œใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ ไปŠๅ›žใฏๅ˜ใชใ‚‹็Œซใงใ‚ใ‚Šใ€ใ‚ณใƒผใƒ‰ใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ ๅคง้‡ใฎๅ ดๅˆใ€็งใฏ่ชญ่€…ใซๅคง้‡ใฎใƒ†ใ‚ญใ‚นใƒˆใ‚’้€€ๅฑˆใ•ใ›ใŸใใ‚ใ‚Šใพใ›ใ‚“ใ€‚ ๆœ€ๅพŒใซใ€่ฆ‹ใŸใ„ใ‚ฝใƒผใ‚นใŒไธŽใˆใ‚‰ใ‚Œใพใ™ใ€‚ ใใ—ใฆใ€็งใŸใกใฏไฝ•ใŒ่ตทใ“ใฃใŸใ‹ใ‚’่ฆ‹ใฆใ„ใพใ™ใ€‚







็Œซใฏใ™ใงใซใใ“ใซใ„ใพใ™ใŒใ€ใ‚‚ใ†ๅฐ‘ใ—่ฃ…้ฃพใ‚’ๅŠ ใˆใพใ™ใ€‚



ใ‚นใƒ†ใƒƒใƒ—7-้ ฌใฎๅฃใฒใ’ใƒใ‚คใƒณใƒˆ



ใ‚ใชใŸใฏ็Ÿฅใฃใฆใ„ใ‚‹ใ€ใใฎใ‚ˆใ†ใชใ‚‚ใฎใŒใ‚ใ‚Šใพใ™ใ€‚ ็™บ็”Ÿใ™ใ‚‹็ขบ็Ž‡ใฏๅฝ“็„ถ100๏ผ…ใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ ใ“ใ‚ŒใŒใ‚ณใƒผใƒ‰ใ€ๆฌกใซ็ตๆžœใงใ™ใ€‚

ใ‚ณใƒผใƒ‰ใฏๅ˜็ด”ใงใ™-้ผปใ‹ใ‚‰็‰นๅฎšใฎ่ท้›ขใซ็‚นใ‚’ๅˆ†ๆ•ฃใ•ใ›ใ‚‹ใ ใ‘ใงใ™ใ€‚



  if(Math.sRandom(0, 100) > 60) { add(function(ctx){ for (var i = 0; i < Math.sRandom(5, 7); i++) { var P = {x:Math.sRandom(20, 40),y:Math.sRandom(0, 30)}; drawircle(ctx, P, 1, strokeColor, strokeColor, 1); } for (var i = 0; i < Math.sRandom(5, 7); i++) { var P = {x:-Math.sRandom(20, 40),y:Math.sRandom(0, 30)}; drawircle(ctx, P, 1, strokeColor, strokeColor, 1); } }, {x:1,y:1}); }
      
      







็ตๆžœ๏ผš





ใ‚นใƒ†ใƒƒใƒ—8-ใƒใƒณใ‚ฐ



ๆ™‚ใ€…ใ€ไธŠใซๆ•ฐๆœฌใฎ็ทšใ‚’ๅผ•ใใพใ™ใ€‚ ่จ€่‘‰ใง่ชฌๆ˜Žใ™ใ‚‹ใฎใฏ้›ฃใ—ใ„ใงใ™ใ€‚ใ‚ณใƒผใƒ‰ใ‚’่ฆ‹ใฆใ€ไฝ•ใŒ่ตทใ“ใ‚‹ใ‹ใ‚’่ฆ‹ใฆใใ ใ•ใ„ใ€‚



 if(Math.sRandom(0, 100) > 75) { add(function(ctx){ for (var i = 0; i < Math.sRandom(3, 5); i++) { //      var radiusVector = {x:0,y:-radius}; //     //       radiusVector = VectorRot(radiusVector, Math.sRandom(-0.01, 0.01)) //   var P0 = {x:Math.sRandom(-25, 25), y: radiusVector.y}; var P1 = {x:Math.sRandom(-25, 25), y: Math.sRandom(-50, -40)}; //  var lineWidth = Math.sRandom(0.5, 1.5); // drawLine(ctx, P0, P1, strokeColor, strokeColor, lineWidth); } }, {x:1,y:1}); }
      
      







ใ„ใ„ใงใ™ใญ







ใ‚นใƒ†ใƒƒใƒ—8-ใƒ™ใƒซใพใŸใฏใƒœใ‚ฆ



ใพใ‚ใ€ใ“ใ‚ŒใฏใŸใ ใฎๆฅฝใ—ใฟใฎใŸใ‚ใงใ‚ใ‚Šใ€็งใฏใ•ใ‚‰ใซ่ฟฝๅŠ ใ™ใ‚‹ใ“ใจใ‚’่€ƒใˆใ€ๅผ“ใจ้˜ใ‚’่ฟฝๅŠ ใ™ใ‚‹ใ“ใจใซใ—ใพใ—ใŸใ€‚ ๅŽณๅฏ†ใซๅˆคๆ–ญใ—ใชใ„ใงใใ ใ•ใ„ใ€็งใฏๆฅฝใ—ใ‚“ใงใ„ใพใ™:)

ใ„ใคใ‚‚ใฎใ‚ˆใ†ใซใ€ใ‚ณใƒผใƒ‰ใ€ใใ—ใฆ็Œซใจไธ€็ท’ใซ็พŽใ—ใ„ๅ†™็œŸใ€‚



  // //    var chanceBottom = Math.sRandom(0, 100); if(chanceBottom > 50) { var chance = Math.sRandom(0, 100); if(chance > 90) { // -   + ,      var P = {x:0,y:radius}; var P0 = {x:Math.sRandom(20, 45), y:radius- Math.sRandom(13, 22)}; var P1 = {x:Math.sRandom(20, 45), y:radius+ Math.sRandom(13, 22)}; add(function(ctx){ var color = (Math.sRandom(0, 100) > 50 ? fillColor : strokeColor); ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = color; ctx.lineWidth = Math.sRandom(2, 5); ctx.moveTo(center.x + Px,center.y + Py); ctx.lineTo(center.x + P0.x,center.y + P0.y); ctx.lineTo(center.x + P1.x,center.y + P1.y); ctx.closePath(); ctx.stroke(); ctx.fill(); ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = color; ctx.lineWidth = Math.sRandom(2, 5); ctx.moveTo(center.x - Px,center.y + Py); ctx.lineTo(center.x - P0.x,center.y + P0.y); ctx.lineTo(center.x - P1.x,center.y + P1.y); ctx.closePath(); ctx.stroke(); ctx.fill(); drawircle(ctx, P, Math.sRandom(6, 12), (Math.sRandom(0, 100) > 50 ? fillColor : strokeColor), strokeColor, Math.sRandom(1, 3)); }, {x:1,y:1}); } } else { // var chance = Math.sRandom(0, 100); if(chance > 90) { // - ,   .    ,  ,    var P = {x:0,y:radius}; var P0 = {x:Math.sRandom(8, 15), y:radius+ Math.sRandom(23, 29)}; var P1 = {x:-P0.x, y:P0.y}; var P3 = {x:0,y:P0.y + Math.sRandom(0, 7)}; add(function(ctx){ drawircle(ctx, P3, Math.sRandom(2, 6), (Math.sRandom(0, 100) > 50 ? fillColor : strokeColor), strokeColor, Math.sRandom(1, 3)); var color = (Math.sRandom(0, 100) > 50 ? fillColor : strokeColor); ctx.beginPath(); ctx.strokeStyle = strokeColor; ctx.fillStyle = color; ctx.lineWidth = Math.sRandom(2, 5); ctx.moveTo(center.x + Px,center.y + Py); ctx.lineTo(center.x + P0.x,center.y + P0.y); ctx.lineTo(center.x + P1.x,center.y + P1.y); ctx.closePath(); ctx.stroke(); ctx.fill(); }, {x:1,y:1}); } }
      
      







ใ”่ฆงใฎใจใŠใ‚Šใ€่ค‡้›‘ใชใ‚‚ใฎใฏใชใใ€ๅนพไฝ•ๅญฆ็š„ใชๅฝข็Šถใงใ™ใ€‚

็ŒซใŒใ„ใชใ‘ใ‚Œใฐใ€ใ‚ณใƒผใƒ‰ใฏ้€€ๅฑˆใชใ‚‚ใฎใซใชใ‚Šใพใ™ใ€‚ๅผ“ใ‚’ๆŒใฃใŸ็ŒซใŒใ„ใ‚‹ใจใ—ใพใ—ใ‚‡ใ†๏ผ







ใŠใ‚ใ‚Šใซ



ใใ‚Œใงใ€็Œซใซใคใ„ใฆใฎ่ฉฑใ‚’็ต‚ใ‚ใ‚Šใพใ—ใŸใ€‚

githubใฎใ‚ณใƒผใƒ‰ใฏๆฌกใฎใจใŠใ‚Šใงใ™ใ€‚github.com / MagistrAVSH / random-cat

ใ—ใ‹ใ—ใ€ใ™ในใฆใฎไฝœๆฅญใฎ็ตๆžœใ€ใ‚ฏใƒชใƒƒใ‚ฏใงใใพใ™๏ผš magistravsh.github.io/random-cat

ใใ—ใฆไปŠใ€ใƒขใƒ‹ใ‚ฟใƒผใ‹ใ‚‰้ฃ›ใณๆ•ฃใฃใฆใ€็Œซใ‚’strokeใงใฆใใ ใ•ใ„๏ผ :)



All Articles