| 5 | 1/1 | 返回列表 |
| 查看: 1021 | 回復(fù): 8 | ||||
| 當(dāng)前只顯示滿(mǎn)足指定條件的回帖,點(diǎn)擊這里查看本話(huà)題的所有回帖 | ||||
guoman2006銀蟲(chóng) (初入文壇)
|
[求助]
求一個(gè)fortran程序的解釋
|
|||
|
subroutine rrgbcolor(iout,icol,imax,iprt) c Set the color on a continous 0-1 scale if (iprt .eq. 1) write (iout,*) 'stroke' if (imax .eq. 1) then write (iout,1000) 0.0,0.0,0.0 else rcol=2.0*float(icol-1)/float(imax-1) if (rcol .le. 1.0) then write (iout,1000) (1.0-rcol),rcol,0.0 else rcol=rcol-1.0 write (iout,1000) 0.0,(1.0-rcol),rcol end if end if if (iprt .eq. 1) write (iout,*) 'newpath' return 1000 format(3f6.2,' setrgbcolor') end |
木蟲(chóng) (小有名氣)
|
給定一個(gè)color變量及一個(gè)max變量,輸出對(duì)應(yīng)的顏色 其中color和max都是正數(shù),并且color不大于max,color=icol-1,max=imax-1 輸出的顏色是一個(gè)RGB元組,包括R、G、B三個(gè)0到1之間的數(shù),分別代表紅、綠、藍(lán)三個(gè)顏色分量 顏色的具體計(jì)算方法是: 1、如果max=0,則輸出黑色(R=0,G=0,B=0) 2、如果col/max不超過(guò)0.5,則輸出顏色(R=1-2*col/max, G=2*col/max, B=0) 3、如果col/max已超過(guò)0.5,則輸出顏色(R=0, G=1-2*col/max, B=2*col/max) |
木蟲(chóng) (職業(yè)作家)
中國(guó)特色

超級(jí)版主 (文學(xué)泰斗)
No gains, no pains.
![]() |
專(zhuān)家經(jīng)驗(yàn): +21105 |
| 在編輯器內(nèi)使用單步執(zhí)行方式,樓主就能理解每句的含義了 |
銀蟲(chóng) (初入文壇)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 291求調(diào)劑 +6 | 孅華 2026-03-22 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 277跪求調(diào)劑 +5 | 1915668 2026-03-27 | 8/400 |
|
|
[考研] 0703化學(xué) +6 | 妮妮ninicgb 2026-03-27 | 6/300 |
|
|
[考研] 一志愿北京化工大學(xué) 070300 學(xué)碩 336分 求調(diào)劑 +9 | vv迷 2026-03-22 | 9/450 |
|
|
[考研] 材料292調(diào)劑 +12 | 橘頌思美人 2026-03-23 | 12/600 |
|
|
[考研] 322求調(diào)劑 +4 | 我真的很想學(xué)習(xí) 2026-03-23 | 4/200 |
|
|
[考研] 考研調(diào)劑 +9 | 小蠟新筆 2026-03-26 | 9/450 |
|
|
[考研] 材料求調(diào)劑 +5 | .m.. 2026-03-25 | 5/250 |
|
|
[考研] 336材料求調(diào)劑 +7 | 陳瀅瑩 2026-03-26 | 9/450 |
|
|
[考研] 調(diào)劑 +4 | 柚柚yoyo 2026-03-26 | 4/200 |
|
|
[考研] 總分293求調(diào)劑 +6 | 加一一九 2026-03-25 | 8/400 |
|
|
[考研] 一志愿中南大學(xué)化學(xué)學(xué)碩0703總分337求調(diào)劑 +7 | niko- 2026-03-22 | 7/350 |
|
|
[考研] 考研一志愿蘇州大學(xué)初始315(英一)求調(diào)劑 +3 | sbdksD 2026-03-24 | 4/200 |
|
|
[考研] 284求調(diào)劑 +15 | Zhao anqi 2026-03-22 | 15/750 |
|
|
[考研] 0854電子信息求調(diào)劑 324 +4 | Promise-jyl 2026-03-23 | 4/200 |
|
|
[考研] 一志愿武理085500機(jī)械專(zhuān)業(yè)總分300求調(diào)劑 +3 | an10101 2026-03-24 | 7/350 |
|
|
[考研] 求調(diào)劑 +6 | 研研,接電話(huà) 2026-03-24 | 7/350 |
|
|
[考研] 277分求調(diào)劑,跨調(diào)材料 +3 | 考研調(diào)劑lxh 2026-03-24 | 3/150 |
|
|
[考研]
|
2117205181 2026-03-21 | 8/400 |
|
|
[考研] 285求調(diào)劑 +6 | ytter 2026-03-22 | 6/300 |
|