本帖最后由 fjp0931 于 2009-3-18 23:36 编辑 作者: yzy539 时间: 2009-3-19 19:13
You can enter mathematical expressions in fields that require a numeric value, such as length, radius, or distance. You can also enter the expression in the user input line. These expressions can include:
+, -, *, /
sin, cos, tan, asin, acos, atan
sqrt (square root)
^ (power: x^y where y is an integer)
exp (e^x)
PI (or lower-case pi)
bracket terms
floor(n) (highest integer less than or equal to n; rounds n down to the next integer)
ceil(n) (smallest integer not less than n; rounds n up to the next integer)
Examples
3*(5.5+17.2) = 68.1
sin(45)+3*11.4 = 34.907106781186549
tan(45) = 1.0
1.5^3 = 3.375
floor(42.17) = 42
ceil(28.17) = 29
floor(-2.3) = -3
ceil(-2.7) = -2作者: yzy539 时间: 2009-3-19 19:14
If/then/else statements can be entered in the form:
if condition
then expression
else expression
The expressions in the then/else clause should evaluate to a value that can be assigned to the value relation or variable.
The conditional operators are:
==
!=
<
<=
The following expression causes a hole to move to 25mm if the distance z=30, otherwise it remains at 5mm (where z=3*x):
if z==30
then 25
else 5
An if/then/else form may also be nested. For example:
if condition-1
then expression-1
else if condition-2
then expression-2
else expression-3
else expression-4作者: yzy539 时间: 2009-3-19 19:14
就这些了.呵呵.作者: 神偷 时间: 2009-3-20 09:26
学学了,进一步学习,运动.大家讨论的还不错嘛.呵呵作者: fjp0931 时间: 2009-3-27 21:26
谢谢老大!又有新问题了:两个方块,一个运行了一段距离停止后,等待若干时间,第二个方块才开始运行。这个等待能实现吗?作者: yzy539 时间: 2009-3-27 22:28
一样的,就是设定驱动的关系大于一个数字后 ,不变,等超过一个指定数字后,再变,和前面的没有什么不同作者: fjp0931 时间: 2009-3-27 23:16
不太明白,能图示说明一下吗?谢谢!作者: yzy539 时间: 2009-3-28 11:16
如下图,和前面将的没有什么区别.
你好好思考一下吧.作者: fjp0931 时间: 2009-3-28 17:20
谢谢老大!如果方块1向前移动100,等待5秒后,方块2再向前移动50,如何控制方块2的速度和方块1是一样的呢?作者: renchao_roy 时间: 2009-8-29 12:20
版主对这些都有研究啊,我现在正在为凸轮仿真发愁哩,有没有办法啊。作者: swjbrian 时间: 2011-2-11 21:46
YOU ARE MY GOD