Advertisement
GregroxMun

Sigma Wants Test Stars

Jun 4th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. @Kopernicus:FOR[SigmaWantsTestStars]
  2. {
  3. Body
  4. {
  5. name = M7V
  6. Template
  7. {
  8. name = Sun
  9. }
  10. Orbit
  11. {
  12. referenceBody = Sun
  13. semiMajorAxis = 2e13
  14. meanAnomalyAtEpoch = 3
  15. }
  16. Properties
  17. {
  18. radius = 6.957e7
  19. @radius *= 0.12
  20. mass = 1.988435e28
  21. @mass *= 0.09
  22. SurfaceTemperatureK = 2900
  23. }
  24. !COLOR,* {}
  25. COLOR
  26. {
  27. Temperature = #$../Properties/SurfaceTemperatureK$
  28. RED = 0
  29. GREEN = 0
  30. BLUE = 0
  31. }
  32.  
  33. @COLOR
  34. {
  35. // Set Temperature = Temperature \ 100
  36. @Temperature /= 100
  37. @Temperature = #$Temperature$.0
  38. @Temperature = #$Temperature[0,.]$
  39. }
  40.  
  41.  
  42.  
  43. // Calculate Red:
  44.  
  45. // If Temperature <= 66 Then
  46. @COLOR:HAS[~Temperature[>66]]
  47. {
  48. // Red = 255
  49. @RED = 1
  50. }
  51. // Else
  52. @COLOR:HAS[#Temperature[>66]]
  53. {
  54. // Red = Temperature - 60
  55. @RED = #$Temperature$
  56. @RED -= 60
  57.  
  58. // Red = 329.698727446 * (Red ^ -0.1332047592)
  59. @RED != -0.1332047592
  60. @RED *= 329.698727446
  61. @RED /= 255
  62. }
  63. // If Red < 0 Then Red = 0
  64. @COLOR:HAS[#RED[<0]]
  65. {
  66. @RED = 0
  67. }
  68. // If Red > 255 Then Red = 255
  69. @COLOR:HAS[#RED[>1]]
  70. {
  71. @RED = 1
  72. }
  73.  
  74.  
  75.  
  76. // Calculate Green:
  77.  
  78. // If Temperature <= 66 Then
  79. @COLOR:HAS[~Temperature[>66]]
  80. {
  81. // Green = Temperature
  82. // Green = 99.4708025861 * Ln(Green) - 161.1195681661
  83. // APPROX TO Green = -0.0431*Temperature^2 + 6.9703*Temperature - 0.206
  84. // REWRITE AS Green = Temperature * (-0.0431*Temperature + 6.9703) - 0.206
  85. @GREEN = #$Temperature$
  86. @GREEN *= -0.0431
  87. @GREEN += 6.9703
  88. @GREEN *= #$Temperature$
  89. @GREEN -= 0.206
  90. @GREEN /= 255
  91. }
  92. // Else
  93. @COLOR:HAS[#Temperature[>66]]
  94. {
  95. // Green = Temperature - 60
  96. @GREEN = #$Temperature$
  97. @GREEN -= 60
  98.  
  99. // Green = 288.1221695283 * (Green ^ -0.0755148492)
  100. @GREEN != -0.0755148492
  101. @GREEN *= 288.1221695283
  102. @GREEN /= 255
  103. }
  104. // If Green < 0 Then Green = 0
  105. @COLOR:HAS[#GREEN[<0]]
  106. {
  107. @GREEN = 0
  108. }
  109. // If Green > 255 Then Green = 255
  110. @COLOR:HAS[#GREEN[>1]]
  111. {
  112. @GREEN = 1
  113. }
  114.  
  115.  
  116.  
  117. // Calculate Blue:
  118.  
  119. // If Temperature >= 66 Then
  120. @COLOR:HAS[~Temperature[<66]]
  121. {
  122. // Blue = 255
  123. @BLUE = 1
  124. }
  125. // If Temperature <= 19 Then
  126. @COLOR:HAS[~Temperature[>19]]
  127. {
  128. // Blue = 0
  129. @BLUE = 0
  130. }
  131. @COLOR:HAS[#Temperature[<66],#Temperature[>19]]
  132. {
  133. // Blue = Temperature - 10
  134. @Temperature -=10
  135.  
  136. // Blue = 138.5177312231 * Ln(Blue) - 305.0447927307
  137. // APPROX TO Blue = -0.0784*Temperature^2 + 10.274*Temperature - 73.434
  138. // REWRITE AS Blue = Temperature*(-0.0784*Temperature+10.274)-73.434
  139. @BLUE = #$Temperature$
  140. @BLUE *= -0.0784
  141. @BLUE += 10.274
  142. @BLUE *= #$Temperature$
  143. @BLUE -= 73.434
  144. @BLUE /= 255
  145.  
  146. // RESTORE Temperature
  147. @Temperature += 10
  148. }
  149. // If Blue < 0 Then Blue = 0
  150. @COLOR:HAS[#BLUE[<0]]
  151. {
  152. @BLUE = 0
  153. }
  154. // If Blue > 255 Then Blue = 255
  155. @COLOR:HAS[#BLUE[>1]]
  156. {
  157. @BLUE = 1
  158. }
  159.  
  160. // APPLY CHANGES
  161.  
  162. %Orbit
  163. {
  164. %color = #$../COLOR/RED$,$../COLOR/GREEN$,$../COLOR/BLUE$
  165. }
  166. %ScaledVersion
  167. {
  168. %Material
  169. {
  170. %emitColor0 = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  171. %emitColor1 = #$emitColor0$
  172. @emitColor1[*] *= 0.9
  173. %rimColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  174. @rimColor[*] *= 1.7
  175. rimBlend = 0.8
  176. rimPower = 1
  177. %sunspotColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  178. @sunspotColor[*] *= 0.01
  179. }
  180. Light
  181. {
  182. %IVASunColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  183. %scaledSunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  184. %sunlightColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  185. %sunAU = #$../../Properties/radius$
  186. %sunLensFlareColor = #$../../COLOR/RED$,$../../COLOR/GREEN$,$../../COLOR/BLUE$
  187. !brightnessCurve {}
  188. brightnessCurve
  189. {
  190. key = 0.0000005 0 0 0
  191. key = 0.00001 0.007 0 0
  192. key = 0.0001 0.1 0 0
  193. key = 0.001 0.3 0 0
  194. key = 0.01 0.4 0 0
  195. key = 0.1 4 0 0
  196. key = 0.2 6 0 0
  197. key = 0.3 10 0 0
  198. }
  199. }
  200.  
  201. %Coronas
  202. {
  203. %Corona
  204. {
  205. %Material
  206. {
  207. texture = Flares/NoCorona
  208. }
  209. }
  210. %Corona
  211. {
  212. %Material
  213. {
  214. texture = Flares/NoCorona
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement