{"version":3,"sources":["webpack:///./src/components/physics/sp/sm/Spring.vue","webpack:///./src/components/physics/sp/sm/Boxes.js","webpack:///src/components/physics/sp/sm/Spring.vue","webpack:///./src/components/physics/sp/sm/Spring.vue?7d22","webpack:///./src/components/physics/sp/sm/Spring.vue?52b3","webpack:///./src/components/physics/sp/sm/Spring.vue?e3f0"],"names":["ref","staticClass","render","Boxes","box1","board","JXG","JSXGraph","initBoard","boundingbox","keepaspectratio","axis","grid","ticks","showCopyright","showNavigation","pan","enabled","zoom","options","minimizeReflow","text","highlight","fixed","image","cssDefaultStyle","line","arc","point","showInfoBox","resize","resizeContainer","containerObj","clientWidth","clientHeight","fullUpdate","window","onresize","create","strokeColor","strokeWidth","Math","round","canvasWidth","withLabel","name","straightFirst","straightLast","lastArrow","label","display","fontSize","canvasHeight","CssStyle","position","offset","visible","size","face","isInDragMode","X","cssStyle","springHangup","color","i","numberOfSpringRings","springRings","sin","m","unitLabel","snapWidth","baseline","lineCap","highline","fillColor","withTicks","k","fillOpacity","withLines","vertices","anchorX","startAnimation","startY","moveAlong","f","t","x","Value","area","numberOfEvaluations","data","Numerics","rungeKutta","duration","NaN","floor","hook","mode","BOARD_MODE_DRAG","stopAllAnimation","addHook","created","_this","$store","commit","title","newTopics","img","action","goto","newshowhome","newPhys","newLeftArrow","newModule","mounted","MathJax","Hub","Queue","beforeDestroy","destroy","component","staticRenderFns"],"mappings":"qJAA4D,EAAU,W,IAAgBA,EAAI,KAAK,EAAK,EAAI,S,OAAk8B,EAAC,e,IAAC,MAAmB,i7BAAE,MAAK,CAAOC,iBAAY,K,CAAyB,QAAK,CAAS,8BAAG,MAAM,CACxoC,mBAGQC,Q,KCJHC,EAAQ,CACZC,KAAM,WACJ,IAAIC,EAAQC,IAAIC,SAASC,UAAU,UAAW,CAACC,YAAa,EAAE,EAAG,GAAI,IAAK,GAAIC,iBAAiB,EAAMC,MAAK,EAAOC,MAAK,EAAMC,OAAM,EAAOC,eAAc,EAAOC,gBAAe,EAAO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A,CACA,CAAAD,MAAA,cAAAE,IAAA,uBAAAC,OAAA,kBAAAN,EAAAO,KAAA,QACA,CAAAJ,MAAA,8BAAAE,IAAA,uBAAAC,OAAA,kBAAAN,EAAAO,KAAA,QACA,CAAAJ,MAAA,gCAAAE,IAAA,oBAAAC,OAAA,kBAAAN,EAAAO,KAAA,gBAEA,KAAAN,OAAAC,OAAA,2BAAAE,GACA,IAAAI,GAAA,EACA,KAAAP,OAAAC,OAAA,4BAAAM,GACA,IAAAC,GAAA,EACA,KAAAR,OAAAC,OAAA,yBAAAO,GACA,IAAAC,GAAA,EACA,KAAAT,OAAAC,OAAA,8BAAAQ,GACA,IAAAC,GAAA,EACA,KAAAV,OAAAC,OAAA,2BAAAS,IAEAC,QAAA,WACAC,QAAAC,IAAAC,MAAA,WAAAF,QAAAC,MACAjH,EAAAC,QAEAkH,cAAA,WACAnH,EAAAoH,YCrD6X,I,wBCQzXC,EAAY,eACd,EACA,EACAC,GACA,EACA,KACA,KACA,MAIa,aAAAD,E,2CCnBf,W","file":"js/chunk-4503f02c.9891b6e8.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('h3',{ref:\"ia\"},[_vm._v(\"\\n Hooke's Law\\n \")]),_c('p',[_vm._v(\"\\n Hooke's law, named after British physicist Robert Hooke, is a fundamental principle in the area of mechanics of materials.\\n Hooke's law relates the deformation of a spring to the load applied.\\n Hooke, while experimenting with springs, found that the force required to stretch or compress a spring is linearly proportional to the extent of deformation.\\n Mathematically, Hooke's law can be expressed as:\\n $$ F \\\\propto \\\\delta $$\\n where \\\\(\\\\delta = l - l_0\\\\) is the stretching or compression of the spring (deformed length minus original length).\\n Expressed as an equality (by introducing a proportionality constant \\\\(k\\\\)):\\n $$ F = k (l- l_0)$$\\n where \\\\(F\\\\) is the load applied, \\\\(l\\\\) is the deformed length and \\\\(l_0\\\\) is the original length of spring. The proportionality factor \\\\(k\\\\) is known as spring constant.\\n \")]),_c('p'),_c('v-responsive',[_c('v-layout',{attrs:{\"justify-center\":\"\"}},[_c('div',{staticClass:\"edliy-box-about\",attrs:{\"id\":\"jxgbox1\"}})])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","const Boxes = {\r\n box1: function () {\r\n var board = JXG.JSXGraph.initBoard('jxgbox1', {boundingbox: [-2, 12, 14, -4], keepaspectratio: true, axis:false, grid:true, ticks:false, showCopyright:false, showNavigation:false, pan:{enabled:false}, zoom:{enabled:false}});\r\n //\r\n board.options.board.minimizeReflow = 'none';\r\n board.options.text.highlight=false;\r\n board.options.text.fixed=true;\r\n board.options.image.highlight=false;\r\n board.options.text.cssDefaultStyle='fontFamily:Oswald';\r\n board.options.line.highlight=false;\r\n board.options.arc.highlight=false;\r\n board.options.point.highlight=false;\r\n board.options.point.showInfoBox=false;\r\n //\r\n var resize = function () {\r\n board.resizeContainer(board.containerObj.clientWidth, board.containerObj.clientHeight, true);\r\n board.fullUpdate();\r\n };\r\n window.onresize = resize;\r\n //\r\n let xAxis =board.create('axis', [[0, -1],[5, -1]], { strokeColor:'grey',\r\n highlight:false, strokeWidth: ()=>Math.round(2*board.canvasWidth/800.),\r\n withLabel:true, name: '', straightFirst:false, straightLast:true, lastArrow:false,\r\n label: {\r\n display:'internal',\r\n fontSize:function(){return 24*board.canvasHeight/800},\r\n CssStyle: 'fontFamily:Oswald;fontWeight:bold',\r\n position: 'rt',\r\n offset: [-20, 20]}});\r\n //\r\n var line = board.create('line', [[0,0], [100, 0]], {visible: false, straightFirst: false, straightLast: false});\r\n //\r\n var point = board.create('glider', [8, 0, line], {name: '', size:function(){return 45*board.canvasHeight/800}, face:'square'});\r\n //\r\n var ktext= board.create('text',[function(){return point.X()/2.0}, 1.5, 'k'],{cssStyle:'fontFamily:Oswald',fontSize:function(){return Math.round(16*board.canvasWidth/500.)}, fixed:true});\r\n //\r\n var mtext= board.create('text',[function(){return point.X()-0.25}, 0, 'm'],{cssStyle:'fontFamily:Oswald',fontSize:function(){return Math.round(16*board.canvasWidth/500.)}, fixed:true});\r\n //\r\n var isInDragMode = false;\r\n //\r\n var springHangup = board.create('point', [0, 0], {color: 'black', name: '', fixed: true, visible:false});\r\n //\r\n var i=0;\r\n var numberOfSpringRings = 100;\r\n var springRings = [];\r\n //\r\n for(i=0; i0)\r\n board.create('segment', [springRings[i-1], springRings[i]], {color: 'blue', strokeWidth: 2});\r\n };\r\n //\r\n //const c = 0.001;\r\n// var c = board.create('slider',[[2.,7.],[9.,7.],[0.0, 0.01, 0.05]],{unitLabel:' 1/s',baseline:{strokeWidth:7, strokeColor:'grey'},highline:{strokeWidth:7, strokeColor:'black'}, name:'c',size:function(){return 8*board.canvasHeight/800},face:'circle', fillColor:'grey',strokeColor:'black', withTicks:false, label:{fontSize:function(){return Math.round(14*board.canvasWidth/500.)}, cssStyle:'fontFamily:Oswald;'}});\r\n //\r\n var m = board.create('slider',[[2.,5.],[5.,5.],[0.25, 0.5, 1]],{unitLabel:' kg',snapWidth:0.25, baseline:{strokeWidth:7, strokeColor:'grey', lineCap:'round'},highline:{strokeWidth:7, strokeColor:'black', lineCap:'round'}, name:'    m',size:function(){return 8*board.canvasHeight/800},face:'circle', fillColor:'red',strokeColor:'black', withTicks:false, label:{fontSize:function(){return Math.round(14*board.canvasWidth/500.)}, cssStyle:'fontFamily:Oswald;'}});\r\n //\r\n var k = board.create('slider',[[2.,3.],[5.,3.],[0.25, 0.25, 1]],{unitLabel:' N/m', snapWidth:0.25, baseline:{strokeWidth:7, strokeColor:'grey', lineCap:'round'},highline:{strokeWidth:7, strokeColor:'black', lineCap:'round'}, name:'    k',size:function(){return 8*board.canvasHeight/800},face:'circle', fillColor:'blue',strokeColor:'black', withTicks:false, label:{fontSize:function(){return Math.round(14*board.canvasWidth/500.)}, cssStyle:'fontFamily:Oswald;'}});\r\n //\r\n var vbase=board.create('polygon',[[0,-4.75],[25,-4.75],[25,-0.95],[0, -0.95]], {fillColor:'lightgrey',fillOpacity:0.6, withLines:false, vertices:{visible:false}});\r\n //\r\n var hbase=board.create('polygon',[[-5,-4.75],[0,-4.75],[0,15],[-5, 15]], {fillColor:'lightgrey', fillOpacity:0.6, withLines:false, vertices:{visible:false}});\r\n board.create('segment', [springHangup, springRings[0]], {color: 'black', strokeWidth: 1});\r\n //\r\n board.create('segment', [springRings[numberOfSpringRings-1], point], {strokeColor: 'black', strokeWidth: 1});\r\n //\r\n var map= board.create('text',[6, 10.5, 'Spring-Mass System'],{anchorX:'middle', cssStyle:'fontFamily:Oswald',fontSize:function(){return Math.round(32*board.canvasWidth/800.)}, fixed:true});\r\n //\r\n board.create('point', [function(){return point.X()-0.1}, 1.5-3], {name: '', color:'black', size:function(){return 4*board.canvasHeight/800}, face:'triangleright'});\r\n//\r\n board.create('point', [0.1, 1.5-3], {name: '', color:'black', size:function(){return 4*board.canvasHeight/800}, face:'triangleleft', fixed:true});\r\n //\r\n board.create('segment', [[function(){return point.X()}, 1.5-3],[0, 1.5-3] ], {fixed:true, strokeColor:'black', strokeWidth:1});\r\n //\r\n function startAnimation(startY) {\r\n point.moveAlong(function() {\r\n var f = function(t, x) {\r\n return [x[1], -(k.Value()/m.Value()) * (x[0]-8)];};\r\n var area = [0, 200];\r\n var numberOfEvaluations = (area[1] - area[0]) * 100;\r\n var data = JXG.Math.Numerics.rungeKutta('heun', [startY, 0], area, numberOfEvaluations, f);\r\n var duration = 20 * 1e3;\r\n return function(t) {\r\n if (t >= duration)\r\n return NaN;\r\n return [data[Math.floor(t / duration * numberOfEvaluations)][0], startY];}\r\n }());}\r\n//\r\n function hook() {\r\n if(!isInDragMode) {\r\n if(board.mode === board.BOARD_MODE_DRAG) {\r\n board.stopAllAnimation();\r\n isInDragMode = true;\r\n }\r\n }\r\n if(isInDragMode) {\r\n if(board.mode !== board.BOARD_MODE_DRAG) {\r\n isInDragMode = false;\r\n startAnimation(point.X());\r\n }\r\n }\r\n }\r\n board.addHook(hook);\r\n// startAnimation(10);\r\n},\r\n}\r\nexport default Boxes;\r\n","\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Spring.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Spring.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Spring.vue?vue&type=template&id=01a31292&\"\nimport script from \"./Spring.vue?vue&type=script&lang=js&\"\nexport * from \"./Spring.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Spring.vue?vue&type=style&index=0&id=01a31292&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Spring.vue?vue&type=style&index=0&id=01a31292&prod&lang=scss&\""],"sourceRoot":""}