cnCalc计算器论坛

 找回密码
 注册
搜索
查看: 11363|回复: 20

[TI-Nspire系列] Power Formula (动力公式?) v1.0.0 Alpha[OS3.2]

[复制链接]
发表于 2013-7-10 10:25:32 | 显示全部楼层 |阅读模式
计算器程序
程序名称: Power Formula
平台: TI-Nspire 
系统/软件要求: OS3.2以上
版本号: v1.0.0
类型: 数学 物理 化学 
作者: DAS
大小(K): 4.56
更新日期: 2013-07-10
描述: 动力公式
已知缺陷: 不支持OS3.1。
切换输入框需要双击。
源代码: 开源/部分开源
本帖最后由 DAS 于 2013-7-10 10:28 编辑

Power Formula v1.0.0 Alpha
框架什么的写完了,目前就做了一个“胡克定律”供测试,其它公式仍在制作中。

由于ti的限制,目前不支持OS3.1.0.392。兼容版正在开发。
源码可以查看,但不能编辑。
07-10-2013 图像 006.jpg
07-10-2013 图像 007.jpg
07-10-2013 图像 008.jpg
07-10-2013 图像 009.jpg
07-10-2013 图像 010.jpg

PFormula.tns

4.56 KB, 下载次数: 61, 下载积分: 金钱 -1

发表于 2013-7-10 11:19:12 | 显示全部楼层
本帖最后由 haoxuan0532 于 2013-7-10 21:46 编辑

沙发


保持中立无敌意
发表于 2013-7-10 11:40:15 | 显示全部楼层
F=KX也要计算器
水水更健康
 楼主| 发表于 2013-7-10 11:51:29 | 显示全部楼层
imath 发表于 2013-7-10 11:40
F=KX也要计算器
水水更健康

后面还有更多公式。
发表于 2013-7-10 11:55:06 | 显示全部楼层
公式水也就算了,仔细一看,只支持F=KX一个公式
发表于 2013-7-10 11:58:44 来自手机 | 显示全部楼层
我帮你把后面的台词说了:
由于计算器的USB接口损坏,xxx准备推迟6个月发布
回复 支持 0 反对 1

使用道具 举报

 楼主| 发表于 2013-7-10 12:22:02 | 显示全部楼层
imath 发表于 2013-7-10 11:55
公式水也就算了,仔细一看,只支持F=KX一个公式

Alpha 版本。
发表于 2013-7-10 14:12:30 | 显示全部楼层
高中毕业之后发现,原来坛子里热门的编程话题居然都是诸如牛二、正余弦定理、配平方程式之类的东西……

点评

躺枪  发表于 2013-7-10 14:22
发表于 2013-7-10 14:33:15 | 显示全部楼层
cnzym 发表于 2013-7-10 14:12
高中毕业之后发现,原来坛子里热门的编程话题居然都是诸如牛二、正余弦定理、配平方程式之类的东西……

不要把DAS认为热门的话题当做是整个论坛热门的话题!
发表于 2013-7-10 14:53:41 | 显示全部楼层
……这种5800p时代的东西……

楼主我要无线电波长计算公式 要支持短波 中波 长波的
发表于 2013-7-11 01:51:42 | 显示全部楼层
本帖最后由 adriweb 于 2013-7-10 18:53 编辑

Have you guys seen FormulaPro ... ?

XwSowUMm.jpg

c7iIRLd.jpg

FormulaPro.jpg


Download : https://github.com/adriweb/EEPro-for-Nspire/blob/master/FormulaPro.tns?raw=true

TI-China has made a Chinese translation, but I'm not sure if it is available.
FP 2.0 should include multilingual support by default anyway.
 楼主| 发表于 2013-7-11 07:28:01 | 显示全部楼层
本帖最后由 DAS 于 2013-7-11 07:44 编辑
adriweb 发表于 2013-7-11 01:51
Have you guys seen FormulaPro ... ?

oh...imba.

That·s cool,and i cant believe it is a Lua Open-Source Program.

But...i cant fill munber in formula on the program and have to calc on scratchpad?



By the way,I have a problem on my program.this prgm cannot use a Negative number as arg.i means if i enter a Negative number in textbox as a argument,it report error.you can press"1","c"in the program,you will find a page about Uniformly accelerated linear motion.and if you set v1=-1,v0=12,a="N/A",t=0.01,it reported a error.i want to know how can i fix it.
  1. -----------这是一份人人都可以查看的源代码,但它不能被未授权的查看者编辑(Readonly)---------------

  2. platform.apiLevel = '2.0'

  3. disp = 0
  4. calc = 0

  5. ---------------------------------------菜单--------------------------------------------

  6. menu = {
  7.     {"物理 - 力学",
  8.         {"胡克定律",function ()    f001()    end},
  9.         {"重力",function ()    f002()    end},
  10.         {"f1与f2合力",function ()    f003()    end},
  11.         {"滑动摩擦力",function ()    f004()    end},
  12.         {"浮力",function ()    f005()    end},
  13.         {"万有引力定律",function ()    f006()    end},
  14.         {"库仑力",function ()    f007()    end},
  15.         {"电场力",function ()    f008()    end},
  16.         {"磁场力 - 洛仑兹力",function ()    f009()    end},
  17.         {"磁场力 - 安培力",function ()    f010()    end},
  18.         {"牛顿第二定律",function ()    f011()    end},
  19.         {"匀变速直线运动",function ()    f012()    end},
  20.         {"匀速圆周运动",function ()    f013()    end},
  21.         {"直线运动公式",function ()    f014()    end},
  22.         {"动量,动量定理和冲量",function ()    f015()    end},
  23.         {"动量守恒定律",function ()    f016()    end},
  24.         {"功,动能和重力势能",function ()    f017()    end},
  25.         {"动能定理",function ()    f018()    end},
  26.         {"功率",function ()    f019()    end},
  27.         {"简谐振动",function ()    f020()    end},
  28.         {"波长,波速和频率",function ()    f021()    end},
  29.     },
  30.     {"物理 - 热学",
  31.         {"热力学第一定律",function ()    f101()    end},
  32.         {"克拉白龙方程",function ()    f102()    end},
  33.         {"理想气体状态方程",function ()    f103()    end},
  34.         {"理想气体玻马定律",function ()    f104()    end},
  35.         {"理想气体查理定律",function ()    f105()    end},
  36.         {"理想气体盖吕萨克定律",function ()    f106()    end},
  37.     },
  38.     {"物理 - 电磁学",
  39.         {"直流电路 - 电流强度的定义",function ()    f201()    end},
  40.         {"直流电路 - 电阻的串并联",function ()    f202()    end},
  41.         {"直流电路 - 欧姆定律1",function ()    f203()    end},
  42.         {"直流电路 - 欧姆定律2",function ()    f204()    end},
  43.         {"直流电路 - 电功和电功率",function ()    f205()    end},
  44.         {"电场和磁场 - 库仑定律",function ()    f206()    end},
  45.         {"电场和磁场 - 电场强度",function ()    f207()    end},
  46.         {"电场和磁场 - 电势差",function ()    f208()    end},
  47.         {"电场和磁场 - 电场力的功",function ()    f209()    end},
  48.         {"电场和磁场 - 电势和电容",function ()    f210()    end},
  49.         {"电场和磁场 - 磁感应强度",function ()    f211()    end},
  50.         {"电场和磁场 - 带电粒子在匀强...",function ()    f212()    end},
  51.         {"电磁感应 - 磁通量",function ()    f213()    end},
  52.         {"电磁感应 - 法拉第电磁感应定...",function ()    f214()    end},
  53.         {"电磁感应 - 电磁震荡",function ()    f215()    end},
  54.         {"交变电流 - 正弦交流电(从中性...",function ()    f216()    end},
  55.         {"交变电流 - 理想变压器",function ()    f217()    end},
  56.     },
  57.     {"物理 - 光学",
  58.         {"折射率",function ()    f301()    end},
  59.         {"全反射临界角",function ()    f302()    end},
  60.         {"波长,频率与波速的关系",function ()    f303()    end},
  61.         {"光子能量",function ()    f304()    end},
  62.         {"爱因斯坦光电方程",function ()    f305()    end},
  63.     },
  64.     {"物理 - 原子物理学",
  65.         {"波尔的原子理论",function ()    f401()    end},
  66.         {"氢原子能级公式",function ()    f402()    end},
  67.         {"氢原子轨道半径公式",function ()    f403()    end},
  68.         {"核反应方程",function ()    f404()    end},
  69.         {"爱因斯坦质能方程",function ()    f405()    end},
  70.     },
  71. }

  72. toolpalette.register(menu)
  73. toolpalette.enable("物理 - 原子物理学","核反应方程",false)

  74. -------------------------------------------菜单结束--------------------------------------------------

  75. -------------------------------------------功能跳转--------------------------------------------------
  76. function f001()
  77. falseall()
  78. disp = 1
  79. Text001:setVisible(true)
  80. Text002:setVisible(true)
  81. Text003:setVisible(true)
  82. Text001:setFocus(true)
  83. Text001:setText("N/A",90,0)
  84. refresh()
  85. end

  86. function f012()
  87. falseall()
  88. disp = 12
  89. Text001:setVisible(true)
  90. Text002:setVisible(true)
  91. Text003:setVisible(true)
  92. Text004:setVisible(true)
  93. Text001:setFocus(true)
  94. Text001:setText("N/A",90,0)
  95. refresh()
  96. end

  97. -------------------------------------------功能跳转结束-----------------------------------------

  98. function falseall()
  99. Text001:setVisible(false)
  100. Text002:setVisible(false)
  101. Text003:setVisible(false)
  102. Text004:setVisible(false)
  103. Text005:setVisible(false)
  104. Text006:setVisible(false)
  105. Text007:setVisible(false)
  106. end

  107. --------------------------------------------GC------------------------------------------------

  108. function on.paint(gc)
  109. if disp == 0 then
  110. gc:drawString("Power Formula   V1.0.0 Alpha",50,70)
  111. gc:drawString("请按 menu 开始",90,90)
  112. gc:setFont("sansserif","r",9)
  113. gc:drawString("By DAS  Copyright 2013   All right reserved.",45,185)
  114. gc:drawString("Protect by CC BY-SA 3.0 Agreement",60,200)
  115. end
  116. -------------------------------------------------------
  117. if disp == 1 then
  118. gc:drawString("物理 - 力学 - 胡克定律",20,20)
  119. gc:drawString("F=Kx",20,40)
  120. gc:drawString("K=",12,82)
  121. gc:drawString("x=",160,82)
  122. gc:drawString("F=",12,114)
  123. if calc == 0 then
  124. gc:drawString("输入3个参数中的2个并按esc键计算",20,200)
  125. end
  126. if calc == 1 then
  127. gc:drawString("按⇧shift+tab开始一个新的计算",40,200)
  128. end
  129. end
  130. ------------------------------------------------------
  131. if disp == 12 then
  132. gc:drawString("物理 - 力学 - 匀变速直线运动",20,20)
  133. gc:drawString("V₁=V₀+at",20,40)
  134. gc:drawString("V₁=",12,82)
  135. gc:drawString("V₀=",160,82)
  136. gc:drawString("a=",12,114)
  137. gc:drawString("t=",160,114)
  138. if calc == 0 then
  139. gc:drawString("输入4个参数中的3个并按esc键计算",20,200)
  140. end
  141. if calc == 1 then
  142. gc:drawString("按⇧shift+tab开始一个新的计算",40,200)
  143. end
  144. end
  145. ------------------------------------------------------
  146. end

  147. --------------------------------------------------GC结束-----------------------------------------------------------

  148. --------------------------------------------------计算区-----------------------------------------------------------
  149. function on.escapeKey()
  150. if disp == 1 then
  151. if Text003:getText() == "N/A" then
  152. varsf = tonumber(Text001:getText()) * tonumber(Text002:getText())
  153. Text003:setText(tostring(varsf))
  154. calc = 1
  155. refresh()
  156. end
  157. if Text001:getText() == "N/A" then
  158. varsk = tonumber(Text003:getText()) / tonumber(Text002:getText())
  159. Text001:setText(tostring(varsk))
  160. calc = 1
  161. refresh()
  162. end
  163. if Text002:getText() == "N/A" then
  164. varsx = tonumber(Text003:getText()) / tonumber(Text001:getText())
  165. Text002:setText(tostring(varsx))
  166. calc = 1
  167. refresh()
  168. end
  169. end
  170. ----------------------------------------------
  171. if disp == 12 then
  172. if Text001:getText() == "N/A" then
  173. varsv1 = tonumber(Text002:getText()) + tonumber(Text003:getText()) * tonumber(Text004:getText())
  174. Text001:setText(tostring(varsv1))
  175. calc = 1
  176. refresh()
  177. elseif Text002:getText() == "N/A" then
  178. varsv0 = tonumber(Text001:getText()) - tonumber(Text003:getText()) * tonumber(Text004:getText())
  179. Text002:setText(tostring(varsv0))
  180. calc = 1
  181. refresh()
  182. elseif Text003:getText() == "N/A" then
  183. varsa = (tonumber(Text001:getText()) - tonumber(Text002:getText())) / tonumber(Text004:getText())
  184. Text003:setText(varsa)
  185. calc = 1
  186. refresh()
  187. elseif Text004:getText() == "N/A" then
  188. varst = (tonumber(Text001:getText()) - tonumber(Text002:getText())) / tonumber(Text004:getText())
  189. Text004:setText(tostring(varst))
  190. calc = 1
  191. refresh()
  192. end
  193. end
  194. ----------------------------------------------
  195. end

  196. ---------------------------------------------计算区结束-----------------------------------------------------

  197. ------------------------------------------绘制富文本框什么的------------------------------------------------

  198. function on.resize()
  199. Text001 = D2Editor.newRichText();
  200. Text001:move(40,60)
  201. Text001:resize(100,30)
  202. Text001:setText("N/A",90,0)
  203. Text001:setBorder(1)
  204. Text001:setVisible(false)
  205. Text002 = D2Editor.newRichText();
  206. Text002:move(190,60)
  207. Text002:resize(100,30)
  208. Text002:setText("N/A",90,0)
  209. Text002:setBorder(1)
  210. Text002:setVisible(false)
  211. Text003 = D2Editor.newRichText();
  212. Text003:move(40,92)
  213. Text003:resize(100,30)
  214. Text003:setText("N/A",90,0)
  215. Text003:setBorder(1)
  216. Text003:setVisible(false)
  217. Text004 = D2Editor.newRichText();
  218. Text004:move(190,92)
  219. Text004:resize(100,30)
  220. Text004:setText("N/A",90,0)
  221. Text004:setBorder(1)
  222. Text004:setVisible(false)
  223. Text005 = D2Editor.newRichText();
  224. Text005:move(40,124)
  225. Text005:resize(100,30)
  226. Text005:setText("N/A",90,0)
  227. Text005:setBorder(1)
  228. Text005:setVisible(false)
  229. Text006 = D2Editor.newRichText();
  230. Text006:move(190,124)
  231. Text006:resize(100,30)
  232. Text006:setText("N/A",90,0)
  233. Text006:setBorder(1)
  234. Text006:setVisible(false)
  235. Text007 = D2Editor.newRichText();
  236. Text007:move(40,156)
  237. Text007:resize(100,30)
  238. Text007:setText("N/A",90,0)
  239. Text007:setBorder(1)
  240. Text007:setVisible(false)
  241. end

  242. ------------------------------------------绘制富文本框结束-------------------------------------------------------

  243. function on.contextMenu()
  244. if Text001:hasFocus() == true then
  245. if Text002:isVisible() == true then
  246. Text002:setFocus(true)
  247. end
  248. elseif Text002:hasFocus() == true then
  249. if Text003:isVisible() == true then
  250. Text003:setFocus(true)
  251. end
  252. elseif Text003:hasFocus() == true then
  253. if Text004:isVisible() == true then
  254. Text004:setFocus(true)
  255. end
  256. elseif Text004:hasFocus() == true then
  257. if Text005:isVisible() == true then
  258. Text005:setFocus(true)
  259. end
  260. elseif Text005:hasFocus() == true then
  261. if Text006:isVisible() == true then
  262. Text006:setFocus(true)
  263. end
  264. elseif Text006:hasFocus() == true then
  265. if Text007:isVisible() == true then
  266. Text007:setFocus(true)
  267. end
  268. end
  269. end
  270. function on.backtabKey()
  271. Text001:setText("N/A",90,0)
  272. Text002:setText("N/A",90,0)
  273. Text003:setText("N/A",90,0)
  274. Text004:setText("N/A",90,0)
  275. Text005:setText("N/A",90,0)
  276. Text006:setText("N/A",90,0)
  277. Text007:setText("N/A",90,0)
  278. Text001:setFocus(true)
  279. calc = 0
复制代码

评分

参与人数 1金钱 -10 收起 理由
ExAcler -10 Your English is so good

查看全部评分

 楼主| 发表于 2013-7-11 08:38:56 来自手机 | 显示全部楼层
本帖最后由 DAS 于 2013-7-11 15:22 编辑
adriweb 发表于 2013-7-11 01:51
Have you guys seen FormulaPro ... ?



....i know how to use it now.

i think,it was not friendly to begineer and ti-nspire cas(not colored)

===========================================================

i means Formula Pro`s GUI is not friendly to begineer,and not friendly to ti-nspire cas(not colored).

in fact , i can hardly to see the calc result and must turn on the light in 8:00am.

@adriweb

点评

begineer、can hardly to、not colored、in 8:00am. Crazy English learner.  发表于 2013-7-11 16:39
i means……  发表于 2013-7-11 16:06
user friendly.  发表于 2013-7-11 13:39

评分

参与人数 1金钱 -10 收起 理由
ExAcler -10 You must know it.

查看全部评分

发表于 2013-7-14 04:59:21 | 显示全部楼层
Well, we made a documentation on how to use it (keys etc.)

However, thanks for the feedback on clickpad devices, maybe we need to adjust the greyscale we use.
发表于 2013-9-7 12:00:22 | 显示全部楼层
good 加入gui吗
发表于 2014-2-26 16:21:19 | 显示全部楼层
请问如何 编写自己工程上用的公式变成TNS呢
 楼主| 发表于 2014-3-4 20:31:47 | 显示全部楼层
johnseeker 发表于 2014-2-26 16:21
请问如何 编写自己工程上用的公式变成TNS呢


先用tibasic写吧...如果不会或者tibasic满足不了你,可以加qq2917433887(可选)
发表于 2014-6-14 08:19:49 | 显示全部楼层
Power Formula TI-Nspire cas  3.6 不能用
发表于 2014-10-13 09:21:47 | 显示全部楼层
发表于 2015-3-4 16:12:59 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|cnCalc计算器论坛

GMT+8, 2024-3-28 23:43 , Processed in 0.063434 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表