{"id":4043,"date":"2024-09-01T01:48:47","date_gmt":"2024-09-01T08:48:47","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=4043"},"modified":"2024-09-01T01:49:15","modified_gmt":"2024-09-01T08:49:15","slug":"446-mechanical-vibrations-of-a-material-point","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2024\/09\/446-mechanical-vibrations-of-a-material-point\/","title":{"rendered":"#446 Mechanical vibrations of a material point"},"content":{"rendered":"<p><a href=\"https:\/\/gantovnik.com\/bio-tips\/2024\/09\/446-mechanical-vibrations-of-a-material-point\/ex446\/\" rel=\"attachment wp-att-4044\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-4044\" src=\"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/09\/ex446.png?resize=550%2C550&#038;ssl=1\" alt=\"\" width=\"550\" height=\"550\" srcset=\"https:\/\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/09\/ex446.png 550w, https:\/\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/09\/ex446-480x480.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 550px, 100vw\" \/><\/a><\/p>\n<a href='https:\/\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/09\/ex446.pdf' class='small-button smallblue' target=\"_blank\">Full Article pdf<\/a>\n<pre class=\"lang:python decode:true \">import numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.integrate import odeint\nimport math\ndef y(t):\n    y=np.exp(-4*t) * (1 - np.cos(t) + (np.cos(1.0)-1)\/np.sin(1.0)*np.sin(t))\n    return y\nplt.rcParams[\"figure.figsize\"] = [5.50, 5.50]\nplt.rcParams[\"figure.autolayout\"] = True\n\nt = np.linspace(0, 1, 100)\nplt.plot(t, y(t))\nplt.grid()\nplt.xlabel('t')\nplt.ylabel('y(t)')\nplt.savefig(\"ex446.png\", dpi=100)\nplt.show()<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint import math def y(t): y=np.exp(-4*t) * (1 &#8211; np.cos(t) + (np.cos(1.0)-1)\/np.sin(1.0)*np.sin(t)) return y plt.rcParams[&#8220;figure.figsize&#8221;] = [5.50, 5.50] plt.rcParams[&#8220;figure.autolayout&#8221;] = True t = np.linspace(0, 1, 100) plt.plot(t, y(t)) plt.grid() plt.xlabel(&#8216;t&#8217;) plt.ylabel(&#8216;y(t)&#8217;) plt.savefig(&#8220;ex446.png&#8221;, dpi=100) plt.show()<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[111,56,69,112],"tags":[114,113],"class_list":["post-4043","post","type-post","status-publish","format-standard","hentry","category-differential-equations","category-math","category-matplotlib","category-vibration","tag-differential-equation","tag-vibration"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-13d","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3018,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/07\/441-parametric-curve-lemniscate-of-bernoulli-with-slider-in-python\/","url_meta":{"origin":4043,"position":0},"title":"#441 Parametric curve Lemniscate of Bernoulli with Slider in python","author":"gantovnik","date":"2024-07-25","format":false,"excerpt":"import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider def rx(t): return np.cos(t)\/(1+np.sin(t)**2) def ry(t): return np.sin(t)*np.cos(t)\/(1+np.sin(t)**2) t = 0 fig,ax1 = plt.subplots(1,1,figsize=(10,6)) plt.subplots_adjust(bottom=0.2) ax1.set_aspect('equal') ax1.set_ylim(-0.5,0.5) ax1.set_xlim(-1.2,1.2) ax1.title.set_text('Parametric curve: Lemniscate of Bernoulli') ax1.grid('on') r, = ax1.plot(rx(t), ry(t),'b', markersize=3) Pnt1, = ax1.plot(rx(t), ry(t),'ro', markersize=6) axt = plt.axes([0.25, 0.1,\u2026","rel":"","context":"In &quot;animation&quot;","block_context":{"text":"animation","link":"https:\/\/gantovnik.com\/bio-tips\/category\/animation\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex441.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex441.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex441.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex441.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2889,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/07\/440-cycloid-on-interactive-figure-with-widgets-in-python\/","url_meta":{"origin":4043,"position":1},"title":"#440 Cycloid on interactive figure with widgets in python","author":"gantovnik","date":"2024-07-21","format":false,"excerpt":"import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider theta = np.linspace(0,2*np.pi) circ_x = lambda t: t + np.cos(theta) circ_y = 1 + np.sin(theta) cycl_x = lambda t: t - np.sin(t) cycl_y = lambda t: 1 - np.cos(t) t = 0 fig,ax = plt.subplots() plt.subplots_adjust(bottom=0.2) plt.ylim(0, 3)\u2026","rel":"","context":"In &quot;animation&quot;","block_context":{"text":"animation","link":"https:\/\/gantovnik.com\/bio-tips\/category\/animation\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex440.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex440.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex440.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":193,"url":"https:\/\/gantovnik.com\/bio-tips\/2019\/01\/double-pendulum\/","url_meta":{"origin":4043,"position":2},"title":"#39 Double pendulum using python","author":"gantovnik","date":"2019-01-10","format":false,"excerpt":"import os import numpy as np import matplotlib.pyplot as plt from scipy import integrate import sympy os.chdir(r'D:\\projects\\wordpress\\ex39') os.getcwd() t, g, m1, l1, m2, l2 = sympy.symbols(\"t, g, m_1, l_1, m_2, l_2\") theta1, theta2 = sympy.symbols(\"theta_1, theta_2\", cls=sympy.Function) ode1 = sympy.Eq((m1+m2)*l1 * theta1(t).diff(t,t) + m2*l2 * theta2(t).diff(t,t) + m2*l2 * theta2(t).diff(t)**2\u2026","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"example39","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2019\/01\/example39.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2019\/01\/example39.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2019\/01\/example39.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2865,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/07\/439-relative-accelerometer-displacement-during-sine-vibration\/","url_meta":{"origin":4043,"position":3},"title":"#439 Relative Accelerometer Displacement During Sine Vibration","author":"gantovnik","date":"2024-07-20","format":false,"excerpt":"\"If you want to find the secrets of the universe, think in terms of energy, frequency, and vibration.\" (Nikola Tesla) import math import numpy as np import matplotlib.pyplot as plt from scipy.optimize import fmin pi=math.pi f=6.0 # f, Hz T=1\/f #T, s omega=2.0*pi*f # Hz g=386.100 # in\/s^2 def func_a(angle,a0,phase):\u2026","rel":"","context":"In &quot;engineering&quot;","block_context":{"text":"engineering","link":"https:\/\/gantovnik.com\/bio-tips\/category\/engineering\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex439_abstract.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex439_abstract.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex439_abstract.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/07\/ex439_abstract.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2059,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/01\/407-multiple-axes-animation-using-python\/","url_meta":{"origin":4043,"position":4},"title":"#407 Multiple axes animation using python","author":"gantovnik","date":"2024-01-14","format":false,"excerpt":"y=sin(x)","rel":"","context":"In &quot;animation&quot;","block_context":{"text":"animation","link":"https:\/\/gantovnik.com\/bio-tips\/category\/animation\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1980,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/12\/397-spiral-that-goes-around-circular-paraboloid-by-python\/","url_meta":{"origin":4043,"position":5},"title":"#397 Spiral that goes around circular paraboloid by python","author":"gantovnik","date":"2023-12-18","format":false,"excerpt":"","rel":"","context":"In &quot;matplotlib&quot;","block_context":{"text":"matplotlib","link":"https:\/\/gantovnik.com\/bio-tips\/category\/matplotlib\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/12\/ex397.png?fit=640%2C480&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/12\/ex397.png?fit=640%2C480&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2023\/12\/ex397.png?fit=640%2C480&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/4043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=4043"}],"version-history":[{"count":3,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/4043\/revisions"}],"predecessor-version":[{"id":4048,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/4043\/revisions\/4048"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=4043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=4043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=4043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}