要畫20個流程(時序)圖,于是昨天搗鼓了到半夜,安裝了plantUML + vscode,雖然丑了些,但勉強能看,目前已用plantUML完成了10個。
plantUML雖好,但要安裝java運行時。就用一小會卻要占用那么多硬盤空間,看了看flowchart.js,也挺香。
flowchart.js is a flowchart DSL and SVG render that runs in the browser and terminal.Nodes and connections are defined in separately so that nodes can be reused and connections can be quickly changed. Fine grain changes to node and connector style can also be made right in the DSL.https://github.com/adrai/flowchart.js
官方站點的代碼:
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <title>flowchart.js · Playground</title> <style type="text/css"> .end-element { fill : #FFCCFF; }</style> <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="http://flowchart.js.org/flowchart-latest.js"></script> <!-- <script src="../release/flowchart.min.js"></script> --> <script> window.onload = function () { var btn = document.getElementById("run"), cd = document.getElementById("code"), chart; (btn.onclick = function () { var code = cd.value; if (chart) { chart.clean(); } chart = flowchart.parse(code); chart.drawSVG('canvas', { // 'x': 30, // 'y': 50, 'line-width': 3, 'maxWidth': 3,//ensures the flowcharts fits within a certian width 'line-length': 50, 'text-margin': 10, 'font-size': 14, 'font': 'normal', 'font-family': 'Helvetica', 'font-weight': 'normal', 'font-color': 'black', 'line-color': 'black', 'element-color': 'black', 'fill': 'white', 'yes-text': 'yes', 'no-text': 'no', 'arrow-end': 'block', 'scale': 1, 'symbols': { 'start': { 'font-color': 'red', 'element-color': 'green', 'fill': 'yellow' }, 'end':{ 'class': 'end-element' } }, 'flowstate' : { 'past' : { 'fill' : '#CCCCCC', 'font-size' : 12}, 'current' : {'fill' : 'yellow', 'font-color' : 'red', 'font-weight' : 'bold'}, 'future' : { 'fill' : '#FFFF99'}, 'request' : { 'fill' : 'blue'}, 'invalid': {'fill' : '#444444'}, 'approved' : { 'fill' : '#58C4A3', 'font-size' : 12, 'yes-text' : 'APPROVED', 'no-text' : 'n/a' }, 'rejected' : { 'fill' : '#C45879', 'font-size' : 12, 'yes-text' : 'n/a', 'no-text' : 'REJECTED' } } }); $('[id^=sub1]').click(function(){ alert('info here'); }); })(); }; function myFunction(event, node) { console.log("You just clicked this node:", node); }</script> </head> <body> <p><textarea style="width: 100%;" rows="11">st=>start: Start|past:>http://www.google.com[blank]e=>end: End:>http://www.google.comop1=>operation: My Operation|past:$myFunctionop2=>operation: Stuff|currentsub1=>subroutine: My Subroutine|invalidcond=>condition: Yesor No?|approved:>http://www.google.comc2=>condition: Good idea|rejectedio=>inputoutput: catch something...|requestpara=>parallel: parallel tasksst->op1(right)->condcond(yes, right)->c2cond(no)->parac2(true)->io->ec2(false)->epara(path1, bottom)->sub1(left)->op1para(path2, right)->op2->est@>op1({"stroke":"Red"})@>cond({"stroke":"Red","stroke-width":6,"arrow-end":"classic-wide-long"})@>c2({"stroke":"Red"})@>op2({"stroke":"Red"})@>e({"stroke":"Red"})</textarea></p> <p><button type="button">Run</button></p> <p ></p> </body></html>
運行效果如下:
簡單一些的例子:
st=>start: Start:>http://www.baidu.com[blank]e=>end:>http://www.baidu.comop1=>operation: My Operationsub1=>subroutine: My Subroutinecond=>condition: Yesor No?:>http://www.baidu.comio=>inputoutput: catch something...para=>parallel: parallel tasksst->op1->condcond(yes)->io->econd(no)->parapara(path1, bottom)->sub1(right)->op1para(path2, top)->op1
運行效果如下:
不說了,廣告時間又到了,現在植入廣告:
幾個《傳熱學》相關的小程序總結如下,可在微信中點擊體驗:
《傳熱學》相關小程序演示動畫如下(其中下圖1D非穩態導熱計算發散,調小時間步長后重新計算,結果收斂!):
黑體單色輻射力如下圖,可見溫度越高,同頻率輻射力越大:
《(計算)流體力學》中的幾個小程序,可在微信中點擊體驗:
關于《(計算)流體力學》相關的幾個小程序演示動畫如下:
LBM(=Lattice Boltzmann Method)計算得到的圓柱繞流“卡門渦街”演示(由于網格較少,分辨率低,圓柱近乎正方形):
順便,《(熱工過程)自動控制》中關于PID控制器的仿真可點擊此處體驗:PID控制演示小程序,(PID控制相關視頻見:基礎/整定/重要補充)。動畫如下:
(正文完!)
本文由 貴州做網站公司 整理發布,部分圖文來源于互聯網,如有侵權,請聯系我們刪除,謝謝!
網絡推廣與網站優化公司(網絡優化與推廣專家)作為數字營銷領域的核心服務提供方,其價值在于通過技術手段與策略規劃幫助企業提升線上曝光度、用戶轉化率及品牌影響力。這...
在當今數字化時代,公司網站已成為企業展示形象、傳遞信息和開展業務的重要平臺。然而,對于許多公司來說,網站建設的價格是一個關鍵考量因素。本文將圍繞“公司網站建設價...
在當今的數字化時代,企業網站已成為企業展示形象、吸引客戶和開展業務的重要平臺。然而,對于許多中小企業來說,高昂的網站建設費用可能會成為其發展的瓶頸。幸運的是,隨...
蘋果6p和6plus誰大?蘋果6plus更大。因為iPhone6plus是iPhone6的放大版,性能比iPhone 6好一點。IPhone 6長138.1mm,寬67mm。蘋果6plus的長度為158.1mm,寬度為77.8 mm..IPhone 6 Plus采用5.5英寸屏幕,分辨率為1080p。它內置64位蘋果A8處理器,后置800萬像素鏡頭和前置120萬像素Fac6p比6強多少?iphon...
魔獸世界,美服,歐服,選擇?歐服和美服基本沒有本質區別,都是暴雪最重視的領域,環境基本相同。然而,大多數美國服裝講英語。選擇換公會的時候,不需要考慮語言問題,但是歐服里有一些公會只使用小語種。接下來,你要考慮你的時差。這個要看你的位置了。估計你不想只在他們人最少的時候上線。以下問題要求您選擇特定的服務器。首先,你要考慮你是想去PVP還是PVE服務器。PVE服務器一直都是超過PVP的,無論是數量還是...
臺灣藝人阿ken身高?林肯恩,1978年1月25日出生于臺灣,影視演員。他曾就讀于紐約李斯特拉斯堡戲劇學院和臺北延平中學。身高172cm英雄本色1和,英雄本色2拍攝只差一年,為什么周潤發的造型差了這么多?仔細看看小編的問題。也許是周潤發在英雄電影1和2中造型的不同設計?1有點土,但2沒有土,對吧?你用“變化很大”這個詞。我想是這樣的在電影英雄1中,mark Chow扮演香港偽造集團總干事的角色,因...