{"id":1140,"date":"2014-06-29T01:10:20","date_gmt":"2014-06-28T17:10:20","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=1140"},"modified":"2015-10-30T16:54:13","modified_gmt":"2015-10-30T08:54:13","slug":"%e6%ac%a7%e6%8b%89%e6%8a%98%e7%ba%bf%e6%b3%95%e7%bb%98%e5%88%b6%e7%94%b5%e5%9c%ba%e7%ba%bf","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=1140","title":{"rendered":"\u6b27\u62c9\u6298\u7ebf\u6cd5\u7ed8\u5236\u7535\u573a\u7ebf"},"content":{"rendered":"<p>\u5229\u7528\u6700\u5e38\u89c4\u7684\u6a21\u62df\u65b9\u6cd5\u2014\u2014\u6b27\u62c9\u6298\u7ebf\u6cd5\u7ed8\u5236\u56db\u7535\u8377\u7535\u573a\u7ebf\uff0cfortran\u5199\u7684\uff0c\u4e0b\u4e00\u4e2a\u7248\u672c\u4f1a\u6709python\u7684Vpython\u52a8\u753b\u7248\u3002<br \/>\n<code lang=\"fortran\">module conts<br \/>\ninteger :: N=18,Num=4<br \/>\nreal(4)\t:: q(4)<br \/>\ndata q\/1.0,-1.0,1.0,-1.0\/<br \/>\ncomplex\t:: p(4)<br \/>\ndata p\/(1.0,1.0),(-1.0,1.0),(-1.0,-1.0),(1.0,-1.0)\/<br \/>\nreal(4)\t:: pai=3.1415926<br \/>\nreal(4)\t:: ds=0.01<br \/>\nreal(4)\t:: dr=0.3<br \/>\nend<\/p>\n<p>program Main<br \/>\nuse conts<br \/>\ncomplex\t:: r,s<br \/>\ninteger\t:: i,j<br \/>\nopen(10,file=\"data.dat\")<br \/>\ndo i=1,Num<br \/>\ndo j=1,N<br \/>\ns=exp(j*pai\/N*(0,1)*2.)<br \/>\nr=p(i)+dr*s<br \/>\ncall plot(r)<br \/>\nenddo<br \/>\nenddo<br \/>\nend<\/p>\n<p>subroutine plot(r)<br \/>\nuse conts<br \/>\ncomplex\t:: E,r<br \/>\ndo<br \/>\nwrite(10,*)\treal(r),aimag(r)<br \/>\nr=r+ds*E(r)\/abs(E(r))<br \/>\nif(abs(r-p(1))<dr.or.abs(r-p(2))<dr.or.abs(r-p(3))<dr.or.abs(r-p(4))<dr.or.abs(r)>20.0) exit<br \/>\nenddo<br \/>\nend<\/p>\n<p>complex function E(r)<br \/>\nuse conts<br \/>\ncomplex\t:: r<br \/>\ninteger\t:: i<br \/>\nE=(0,0)<br \/>\ndo i=1,Num<br \/>\nE=E+q(i)*(r-p(i))\/abs(r-p(i))**3<br \/>\nenddo<br \/>\nreturn<br \/>\nend<\/code><br \/>\n\u6548\u679c\u5982\u56fe\u6240\u793a<a href=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/06\/dianchangxian.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2014\/06\/dianchangxian-1024x724.jpg\" alt=\"\u7535\u573a\u7ebf\" width=\"720\" height=\"540\" class=\"aligncenter size-large wp-image-1148\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5229\u7528\u6700\u5e38\u89c4\u7684\u6a21\u62df\u65b9\u6cd5\u2014\u2014\u6b27\u62c9\u6298\u7ebf\u6cd5\u7ed8\u5236\u56db\u7535\u8377\u7535\u573a\u7ebf\uff0cfortran\u5199\u7684\uff0c\u4e0b\u4e00\u4e2a\u7248\u672c\u4f1a\u6709python\u7684Vpyth [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[16],"tags":[108,152],"class_list":["post-1140","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-16","tag-fortran","tag-152"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1140"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/1140\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/media\/1148"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}