Advertisement
Guest User

Untitled

a guest
Feb 1st, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. ;Gravity test
  2.  
  3. WIDTH = 150
  4. HEIGHT = 150
  5. PAUSE = 0
  6.  
  7.  
  8. %%
  9.  
  10. NULL = {10,10,10}
  11. MATTER = {200,200,200}
  12.  
  13. M00 = {10,255,10}
  14. M01 = {0,240,0}
  15. M02 = {0,210,0}
  16. M03 = {0,180,0}
  17. M04 = {0,150,0}
  18. M05 = {0,120,0}
  19. M06 = {0,90,0}
  20. M07 = {0,60,0}
  21. M08 = {0,30,0}
  22. M09 = {0,0,0}
  23.  
  24. G00 = {10,255,255}
  25. G01 = {0,240,240}
  26. G02 = {0,210,210}
  27. G03 = {0,180,180}
  28. G04 = {0,150,150}
  29. G05 = {0,120,120}
  30. G06 = {0,90,90}
  31. G07 = {0,60,60}
  32. G08 = {0,30,30}
  33. G09 = {0,0,0}
  34.  
  35. MOVINGMATTER = {200,200,200}
  36. TARGET = {250,250,250}
  37.  
  38. %%
  39.  
  40. DISCRETE SIM
  41. DISCRETE MASS
  42. DISCRETE GRAV
  43.  
  44. %%
  45.  
  46. MASS:NULL -> M00
  47. GRAV:NULL -> G00
  48. MASS:M00 + SIM:MATTER -> M01
  49. MASS:M00 + SIM:MOVINGMATTER -> M01
  50.  
  51. ;Begin mass
  52. ;Count the number masses in an area
  53. MASS:M02 + 8M00 -> M01
  54. MASS:M03 + 8M00 -> M01
  55. MASS:M04 + 8M00 -> M01
  56. MASS:M05 + 8M00 -> M01
  57. MASS:M06 + 8M00 -> M01
  58. MASS:M07 + 8M00 -> M01
  59. MASS:M08 + 8M00 -> M01
  60. MASS:M09 + 8M00 -> M01
  61.  
  62. MASS:M01 + 7M00 -> M02
  63. MASS:M03 + 7M00 -> M02
  64. MASS:M04 + 7M00 -> M02
  65. MASS:M05 + 7M00 -> M02
  66. MASS:M06 + 7M00 -> M02
  67. MASS:M07 + 7M00 -> M02
  68. MASS:M08 + 7M00 -> M02
  69. MASS:M09 + 7M00 -> M02
  70.  
  71. MASS:M01 + 6M00 -> M03
  72. MASS:M02 + 6M00 -> M03
  73. MASS:M04 + 6M00 -> M03
  74. MASS:M05 + 6M00 -> M03
  75. MASS:M06 + 6M00 -> M03
  76. MASS:M07 + 6M00 -> M03
  77. MASS:M08 + 6M00 -> M03
  78. MASS:M09 + 6M00 -> M03
  79.  
  80. MASS:M01 + 5M00 -> M04
  81. MASS:M02 + 5M00 -> M04
  82. MASS:M03 + 5M00 -> M04
  83. MASS:M05 + 5M00 -> M04
  84. MASS:M06 + 5M00 -> M04
  85. MASS:M07 + 5M00 -> M04
  86. MASS:M08 + 5M00 -> M04
  87. MASS:M09 + 5M00 -> M04
  88.  
  89. MASS:M01 + 4M00 -> M05
  90. MASS:M02 + 4M00 -> M05
  91. MASS:M03 + 4M00 -> M05
  92. MASS:M04 + 4M00 -> M05
  93. MASS:M06 + 4M00 -> M05
  94. MASS:M07 + 4M00 -> M05
  95. MASS:M08 + 4M00 -> M05
  96. MASS:M09 + 4M00 -> M05
  97.  
  98. MASS:M01 + 3M00 -> M06
  99. MASS:M02 + 3M00 -> M06
  100. MASS:M03 + 3M00 -> M06
  101. MASS:M04 + 3M00 -> M06
  102. MASS:M05 + 3M00 -> M06
  103. MASS:M07 + 3M00 -> M06
  104. MASS:M08 + 3M00 -> M06
  105. MASS:M09 + 3M00 -> M06
  106.  
  107. MASS:M01 + 2M00 -> M07
  108. MASS:M02 + 2M00 -> M07
  109. MASS:M03 + 2M00 -> M07
  110. MASS:M04 + 2M00 -> M07
  111. MASS:M05 + 2M00 -> M07
  112. MASS:M06 + 2M00 -> M07
  113. MASS:M08 + 2M00 -> M07
  114. MASS:M09 + 2M00 -> M07
  115.  
  116. MASS:M01 + 1M00 -> M08
  117. MASS:M02 + 1M00 -> M08
  118. MASS:M03 + 1M00 -> M08
  119. MASS:M04 + 1M00 -> M08
  120. MASS:M05 + 1M00 -> M08
  121. MASS:M06 + 1M00 -> M08
  122. MASS:M07 + 1M00 -> M08
  123. MASS:M09 + 1M00 -> M08
  124.  
  125. MASS:M01 + 0M00 -> M09
  126. MASS:M02 + 0M00 -> M09
  127. MASS:M03 + 0M00 -> M09
  128. MASS:M04 + 0M00 -> M09
  129. MASS:M05 + 0M00 -> M09
  130. MASS:M06 + 0M00 -> M09
  131. MASS:M07 + 0M00 -> M09
  132. MASS:M08 + 0M00 -> M09
  133.  
  134. MASS:M01 + SIM:NULL -> M00
  135. MASS:M02 + SIM:NULL -> M00
  136. MASS:M03 + SIM:NULL -> M00
  137. MASS:M04 + SIM:NULL -> M00
  138. MASS:M05 + SIM:NULL -> M00
  139. MASS:M06 + SIM:NULL -> M00
  140. MASS:M07 + SIM:NULL -> M00
  141. MASS:M08 + SIM:NULL -> M00
  142. MASS:M09 + SIM:NULL -> M00
  143.  
  144.  
  145. ;Begin gravity
  146. ;Seed from MASS layer
  147. GRAV:G00 + MASS:M09 -> G09
  148. GRAV:G01 + MASS:M09 -> G09
  149. GRAV:G02 + MASS:M09 -> G09
  150. GRAV:G03 + MASS:M09 -> G09
  151. GRAV:G04 + MASS:M09 -> G09
  152. GRAV:G05 + MASS:M09 -> G09
  153. GRAV:G06 + MASS:M09 -> G09
  154. GRAV:G07 + MASS:M09 -> G09
  155. GRAV:G08 + MASS:M09 -> G09
  156.  
  157. GRAV:G00 + MASS:M08 -> G08
  158. GRAV:G01 + MASS:M08 -> G08
  159. GRAV:G02 + MASS:M08 -> G08
  160. GRAV:G03 + MASS:M08 -> G08
  161. GRAV:G04 + MASS:M08 -> G08
  162. GRAV:G05 + MASS:M08 -> G08
  163. GRAV:G06 + MASS:M08 -> G08
  164. GRAV:G07 + MASS:M08 -> G08
  165. GRAV:G09 + MASS:M08 -> G08
  166.  
  167. GRAV:G00 + MASS:M07 -> G07
  168. GRAV:G01 + MASS:M07 -> G07
  169. GRAV:G02 + MASS:M07 -> G07
  170. GRAV:G03 + MASS:M07 -> G07
  171. GRAV:G04 + MASS:M07 -> G07
  172. GRAV:G05 + MASS:M07 -> G07
  173. GRAV:G06 + MASS:M07 -> G07
  174. GRAV:G08 + MASS:M07 -> G07
  175. GRAV:G09 + MASS:M07 -> G07
  176.  
  177. GRAV:G00 + MASS:M06 -> G06
  178. GRAV:G01 + MASS:M06 -> G06
  179. GRAV:G02 + MASS:M06 -> G06
  180. GRAV:G03 + MASS:M06 -> G06
  181. GRAV:G04 + MASS:M06 -> G06
  182. GRAV:G05 + MASS:M06 -> G06
  183. GRAV:G07 + MASS:M06 -> G06
  184. GRAV:G08 + MASS:M06 -> G06
  185. GRAV:G09 + MASS:M06 -> G06
  186.  
  187. GRAV:G00 + MASS:M05 -> G05
  188. GRAV:G01 + MASS:M05 -> G05
  189. GRAV:G02 + MASS:M05 -> G05
  190. GRAV:G03 + MASS:M05 -> G05
  191. GRAV:G04 + MASS:M05 -> G05
  192. GRAV:G06 + MASS:M05 -> G05
  193. GRAV:G07 + MASS:M05 -> G05
  194. GRAV:G08 + MASS:M05 -> G05
  195. GRAV:G09 + MASS:M05 -> G05
  196.  
  197. GRAV:G00 + MASS:M04 -> G04
  198. GRAV:G01 + MASS:M04 -> G04
  199. GRAV:G02 + MASS:M04 -> G04
  200. GRAV:G03 + MASS:M04 -> G04
  201. GRAV:G05 + MASS:M04 -> G04
  202. GRAV:G06 + MASS:M04 -> G04
  203. GRAV:G07 + MASS:M04 -> G04
  204. GRAV:G08 + MASS:M04 -> G04
  205. GRAV:G09 + MASS:M04 -> G04
  206.  
  207. GRAV:G00 + MASS:M03 -> G03
  208. GRAV:G01 + MASS:M03 -> G03
  209. GRAV:G02 + MASS:M03 -> G03
  210. GRAV:G04 + MASS:M03 -> G03
  211. GRAV:G05 + MASS:M03 -> G03
  212. GRAV:G06 + MASS:M03 -> G03
  213. GRAV:G07 + MASS:M03 -> G03
  214. GRAV:G08 + MASS:M03 -> G03
  215. GRAV:G09 + MASS:M03 -> G03
  216.  
  217. GRAV:G00 + MASS:M02 -> G02
  218. GRAV:G01 + MASS:M02 -> G02
  219. GRAV:G03 + MASS:M02 -> G02
  220. GRAV:G04 + MASS:M02 -> G02
  221. GRAV:G05 + MASS:M02 -> G02
  222. GRAV:G06 + MASS:M02 -> G02
  223. GRAV:G07 + MASS:M02 -> G02
  224. GRAV:G08 + MASS:M02 -> G02
  225. GRAV:G09 + MASS:M02 -> G02
  226.  
  227. GRAV:G00 + MASS:M01 -> G01
  228. GRAV:G02 + MASS:M01 -> G01
  229. GRAV:G03 + MASS:M01 -> G01
  230. GRAV:G04 + MASS:M01 -> G01
  231. GRAV:G05 + MASS:M01 -> G01
  232. GRAV:G06 + MASS:M01 -> G01
  233. GRAV:G07 + MASS:M01 -> G01
  234. GRAV:G08 + MASS:M01 -> G01
  235. GRAV:G09 + MASS:M01 -> G01
  236.  
  237. GRAV:G01 + 0G02 + MASS:M00 -> G00
  238. GRAV:G02 + 0G03 + MASS:M00 -> G00
  239. GRAV:G03 + 0G04 + MASS:M00 -> G00
  240. GRAV:G04 + 0G05 + MASS:M00 -> G00
  241. GRAV:G05 + 0G06 + MASS:M00 -> G00
  242. GRAV:G06 + 0G07 + MASS:M00 -> G00
  243. GRAV:G07 + 0G08 + MASS:M00 -> G00
  244. GRAV:G08 + 0G09 + MASS:M00 -> G00
  245. GRAV:G09 + MASS:M00 -> G00
  246.  
  247.  
  248. ;Gravity field, propagates outwards from centers of mass
  249. GRAV:G00 + 1G09+ + MASS:M00 -> G08
  250. GRAV:G01 + 1G09+ + MASS:M00 -> G08
  251. GRAV:G02 + 1G09+ + MASS:M00 -> G08
  252. GRAV:G03 + 1G09+ + MASS:M00 -> G08
  253. GRAV:G04 + 1G09+ + MASS:M00 -> G08
  254. GRAV:G05 + 1G09+ + MASS:M00 -> G08
  255. GRAV:G06 + 1G09+ + MASS:M00 -> G08
  256. GRAV:G07 + 1G09+ + MASS:M00 -> G08
  257.  
  258. GRAV:G00 + 2G08+ + MASS:M00 -> G07
  259. GRAV:G01 + 2G08+ + MASS:M00 -> G07
  260. GRAV:G02 + 2G08+ + MASS:M00 -> G07
  261. GRAV:G03 + 2G08+ + MASS:M00 -> G07
  262. GRAV:G04 + 2G08+ + MASS:M00 -> G07
  263. GRAV:G05 + 2G08+ + MASS:M00 -> G07
  264. GRAV:G06 + 2G08+ + MASS:M00 -> G07
  265.  
  266. GRAV:G00 + 1G07+ + MASS:M00 -> G06
  267. GRAV:G01 + 1G07+ + MASS:M00 -> G06
  268. GRAV:G02 + 1G07+ + MASS:M00 -> G06
  269. GRAV:G03 + 1G07+ + MASS:M00 -> G06
  270. GRAV:G04 + 1G07+ + MASS:M00 -> G06
  271. GRAV:G05 + 1G07+ + MASS:M00 -> G06
  272.  
  273. GRAV:G00 + 2G06+ + MASS:M00 -> G05
  274. GRAV:G01 + 2G06+ + MASS:M00 -> G05
  275. GRAV:G02 + 2G06+ + MASS:M00 -> G05
  276. GRAV:G03 + 2G06+ + MASS:M00 -> G05
  277. GRAV:G04 + 2G06+ + MASS:M00 -> G05
  278.  
  279. GRAV:G00 + 1G05+ + MASS:M00 -> G04
  280. GRAV:G01 + 1G05+ + MASS:M00 -> G04
  281. GRAV:G02 + 1G05+ + MASS:M00 -> G04
  282. GRAV:G03 + 1G05+ + MASS:M00 -> G04
  283.  
  284. GRAV:G00 + 2G04+ + MASS:M00 -> G03
  285. GRAV:G01 + 2G04+ + MASS:M00 -> G03
  286. GRAV:G02 + 2G04+ + MASS:M00 -> G03
  287.  
  288. GRAV:G00 + 1G03+ + MASS:M00 -> G02
  289. GRAV:G01 + 1G03+ + MASS:M00 -> G02
  290.  
  291. GRAV:G00 + 2G02+ + MASS:M00 -> G01
  292.  
  293.  
  294.  
  295. ;Ground shaking!!! Move MATTER periodically, preferentially toward higher gravity fields
  296. ;activate movement. this is faster for lighter masses
  297. SIM:MATTER + MASS:M01 -> MOVINGMATTER*0.5
  298. SIM:MATTER + MASS:M02 -> MOVINGMATTER*0.01
  299. SIM:MATTER + MASS:M03 -> MOVINGMATTER*0.02
  300. SIM:MATTER + MASS:M04 -> MOVINGMATTER*0.004
  301. SIM:MATTER + MASS:M05 -> MOVINGMATTER*0.0008
  302. SIM:MATTER + MASS:M06 -> MOVINGMATTER*0.00016
  303. SIM:MATTER + MASS:M07 -> MOVINGMATTER*0.000032
  304. SIM:MATTER + MASS:M08 -> MOVINGMATTER*0.0000064
  305. SIM:MOVINGMATTER -> MATTER*0.001
  306.  
  307. ;movement completion
  308. SIM:TARGET + 1MOVINGMATTER -> MOVINGMATTER
  309. SIM:TARGET + 2MOVINGMATTER+ -> NULL ;Bug: this and the next line will cause deletions
  310. SIM:MOVINGMATTER + 1TARGET+ -> NULL
  311.  
  312. ;select target. this is faster for higher gravity fields
  313. SIM:NULL + 1MOVINGMATTER + GRAV:G00 -> TARGET*0.00000000005
  314. SIM:NULL + 1MOVINGMATTER + GRAV:G01 -> TARGET*0.0000000001
  315. SIM:NULL + 1MOVINGMATTER + GRAV:G02 -> TARGET*0.000000002
  316. SIM:NULL + 1MOVINGMATTER + GRAV:G03 -> TARGET*0.00000004
  317. SIM:NULL + 1MOVINGMATTER + GRAV:G04 -> TARGET*0.0000008
  318. SIM:NULL + 1MOVINGMATTER + GRAV:G05 -> TARGET*0.000016
  319. SIM:NULL + 1MOVINGMATTER + GRAV:G06 -> TARGET*0.00032
  320. SIM:NULL + 1MOVINGMATTER + GRAV:G07 -> TARGET*0.0064
  321. SIM:NULL + 1MOVINGMATTER + GRAV:G08 -> TARGET*0.128
  322. SIM:NULL + 1MOVINGMATTER + GRAV:G09 -> TARGET*0.25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement