{"id":298421,"date":"2020-02-09T15:00:12","date_gmt":"2020-02-09T15:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298421"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298421","title":{"rendered":"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u0438\u043d\u0438\u0439 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0440\u044f\u0434\u043e\u0432, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0435\u0442 \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487606\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u043f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aa\/tn\/pg\/aatnpgoghhyutmxmfjhyeq0vdts.gif\"><a name=\"habracut\"><\/a><br \/>  \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1fMGkrUWvO8gM4vnoQwrKHweedBTArTrL\" rel=\"nofollow\">Google colab<\/a>. <\/p>\n<h2>\u0422\u0435\u043e\u0440\u0438\u044f<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u043a \u0438\u0445 \u0441\u0447\u0438\u0442\u0430\u0442\u044c. \u041f\u043e \u0441\u0443\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0438\u044f\u043d\u0438\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043a:<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e77\/acc\/5cc\/e77acc5ccaa97a3c201e301704ac95e8.svg\" alt=\"$E=\\frac{k*|q|}{r^2}$\" data-tex=\"inline\"><\/math>. <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d5e\/768\/6d2\/d5e7686d29b064bd987e3753f176a951.jpg\" alt=\"image\"><\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f E<\/h2>\n<p>  \u042f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u0438 x \u0438 y dx \u0438 dy \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jh\/2r\/2n\/jh2r2nyuiivd-endghuptpe2paw.png\"><br \/>   \u0418\u0437 \u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043e\u0442 \u0437\u0430\u0440\u044f\u0434\u0430 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 r \u0438 \u0434\u043b\u0438\u043d\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 E \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u044d\u0442\u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 (x1 \u0438 dx \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e) <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/641\/3bd\/a8f\/6413bda8fd91514b96fc63bcc7370553.svg\" alt=\"$\\frac{R}{E}=\\frac{x}{dx}=\\frac{y}{dy}$\" data-tex=\"inline\"><\/math>. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d4d\/541\/e13\/d4d541e131c17ed21b56d9c9fe6c03d3.svg\" alt=\"$\\vec{E}=\\left(\\begin{array}{c} \\sum_{i=0}^{N}\\frac{x_i*|\\vec{E}_i|}{R_i} \\\\ \\sum_{i=0}^{N}\\frac{y_i*|\\vec{E}_i|}{R_i} \\end{array}\\right) \\qquad $\" data-tex=\"inline\"><\/math><br \/>  \u0441 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pi\/en\/c9\/pienc9lcptd8vdhtyskoaeknjgu.png\">  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def E(q_prop, xs, ys, nq): #q_prop=[[xq1, yq1, q1, mq1, vxq1, vyq1], [xq2, yq2, q2, mq2, vxq2, vyq2] ... ]      l=1     k=9*10**9     Ex=0     Ey=0     c=0     for c in range(len(q_prop)):#\u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0437\u0430\u0440\u044f\u0434\u0430\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438         q=q_prop[c]         r=((xs-q[0])**2+(ys-q[1])**2)**0.5         dEv=(k*q[2])\/r**2         dEx=(xs-q[0])*(dEv\/r)*l         dEy=(ys-q[1])*(dEv\/r)*l          Ex+=dEx         Ey+=dEy     return Ex, Ey <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0439<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043b\u0438\u043d\u0438\u044f \u0438 \u0434\u043e\u043a\u0443\u0434\u0430. \u041d\u0430\u0447\u0430\u043b\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u043c r \u0432\u043e\u043a\u0440\u0443\u0433 \u0437\u0430\u0440\u044f\u0434\u0430, \u0430 \u043a\u043e\u043d\u0446\u043e\u043c \u0442\u043e\u0447\u043a\u0438 \u043e\u0442\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u0442 \u0437\u0430\u0440\u044f\u0434\u043e\u0432 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 r.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">theta = np.linspace(0, 2*np.pi, n) mask=q_prop[ q_prop[:,2]&gt;0 ]#\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0440\u044f\u0434\u044b  for cq in range(len(mask)):     qmask=mask[cq]     xr = r_q*np.cos(theta)+qmask[0]#\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0445-\u043e\u0432 \u0442\u043e\u0447\u0435\u043a \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0437\u0430\u0440\u044f\u0434\u0430     yr = r_q*np.sin(theta)+qmask[1]#\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0430\u043a-\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0438\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0440\u044f\u0434\u043e\u0432.<br \/>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0441\u0442\u0440\u043e\u0438\u043c \u043b\u0438\u043d\u0438\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0435\u0439, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4o\/xh\/8m\/4oxh8mty2dsay09mz4e5e27hkpy.png\"><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043b\u0438\u043d\u0438\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def Draw(size, q_prop,r_q, n):      linen=np.empty((np.count_nonzero(q_prop[:,2]&gt;0),n, 2000000), dtype=np.float64)   linen[:] = np.nan   theta = np.linspace(0, 2*np.pi, n)   mask=q_prop[ q_prop[:,2]&gt;0 ][ q_prop[q_prop[:,2]&gt;0][:,3]==1 ]   for cq in range(len(mask)):     qmask=mask[cq]     x11 = r_q*np.cos(theta)+qmask[0]     x22 = r_q*np.sin(theta)+qmask[1]     for c in range(len(x11)):        xs=x11[c]       ys=x22[c]        lines=np.empty((2,1000000), dtype=np.float64)       lines[:]=np.nan       stop=0       nnn=0              lines[0][nnn]=xs       lines[1][nnn]=ys       while  abs(xs)&lt;size+2 and abs(ys)&lt;size+2:          nnn+=1          for cq1 in range(len(q_prop)):           q=q_prop[cq1]           if ((ys-q[1])**2+(xs-q[0])**2)**0.5&lt;r_q\/2 :             stop=1             break         if stop==1:           break         dx, dy = E1(q_prop,xs,ys)          xs+=dx         ys+=dy         lines[0][nnn]=xs         lines[1][nnn]=ys               linen[cq,c,:]=lines.reshape(-1)    return linen <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0440\u044f\u0434\u0430\u043c\u0438<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u043e\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f dt. <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/947\/87f\/582\/94787f58262508d89b995fe16cbd2b44.svg\" alt=\"$x+=\\frac{E_x \\cdot q \\cdot dt^2}{2\\cdot m} + v_x\\cdot dt$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/935\/016\/3a0\/9350163a03ca6673ec5050a9703e1765.svg\" alt=\"$y+=\\frac{E_y \\cdot q \\cdot dt^2}{2\\cdot m} + v_y \\cdot dt$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3a5\/e65\/b1a\/3a5e65b1a7cab38212158183027430b5.svg\" alt=\"$v_x+= \\frac{E_x \\cdot q \\cdot dt}{ m} $\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f75\/c12\/a7c\/f75c12a7ce597e17677ede19a3e77aa1.svg\" alt=\"$v_y+= \\frac{E_y \\cdot q \\cdot dt}{ m} $\" data-tex=\"display\"><\/math><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xj\/a_\/9n\/xja_9nyqm-qvvppeelljbpuheum.gif\">  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 \u0437\u0430\u0440\u044f\u0434\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def Update_all(q_prop):   vx=0   vy=0   x=0   y=0   q_prop_1=np.copy(q_prop)   for c in range(len(q_prop)):#\u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0437\u0430\u0440\u044f\u0434\u0430\u043c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439     xs=q_prop[c][0]     ys=q_prop[c][1]     q =q_prop[c][2]     m =q_prop[c][3]     vx=q_prop[c][4]     vy=q_prop[c][5]     Ex, Ey= E(q_prop, xs, ys, c)      x=(((Ex*q)\/m)*dt**2)\/2+vx*dt+xs     y=(((Ey*q)\/m)*dt**2)\/2+vy*dt+ys     vx+=((Ex*q)\/m)*dt     vy+=((Ey*q)\/m)*dt     #print(q_prop[c]-[x,y,q,m,vx,vy])     q_prop_1[c]=[x,y,q,m,vx,vy]      return q_prop_1#\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0437\u0430\u0440\u044f\u0434\u043e\u0432<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0413\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043b \u043f\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0433\u0440\u0430\u0432\u0438\u0442\u0430\u0446\u0438\u0438. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0442.\u043a. \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435.  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2a3\/592\/9c7\/2a35929c7f1439f3217ba6e92724add5.svg\" alt=\"$g=\\frac{G*m}{r^2}$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c2d\/806\/22c\/c2d80622c17c7d04d56c6f7c0cb6f0d9.svg\" alt=\"$\\vec{g}=\\left(\\begin{array}{c} \\sum_{i=0}^{N}\\frac{x_i*|\\vec{g}_i|}{R_i} \\\\ \\sum_{i=0}^{N}\\frac{y_i*|\\vec{g}_i|}{R_i} \\end{array}\\right) \\qquad $\" data-tex=\"display\"><\/math><\/p>\n<p>  \u041f\u043b\u0430\u043d\u0435\u0442\u044b \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 \u0441 \u043e\u0441\u0438 \u0445 \u0432 \u043f\u0435\u0440\u0438\u0433\u0435\u043b\u0438\u0439\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0441 \u043f\u0435\u0440\u0438\u0433\u0435\u043b\u0438\u0439\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e. \u0412\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0435\u0442 \u0438 \u0441\u043e\u043b\u043d\u0446\u0430 (\u043c\u0430\u0441\u0441\u044b, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u0446\u0438\u0441\u0438\u0442\u0435\u0442\u044b) \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430.<br \/>  \u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 4 \u043f\u043b\u0430\u043d\u0435\u0442 + c\u043e\u043b\u043d\u0446\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ee\/fn\/sc\/eefnscdztiqe5k-b2rp1semadmg.gif\"><\/p>\n<p>  \u0416\u0434\u0443 \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u043e \u0441\u0432\u0438\u0434\u0430\u043d\u0438\u044f.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/487606\/\"> https:\/\/habr.com\/ru\/post\/487606\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487606\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u043f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aa\/tn\/pg\/aatnpgoghhyutmxmfjhyeq0vdts.gif\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298421","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298421"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298421\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}