Alice 3.3: различия между версиями

14 байт добавлено ,  3 года назад
==Броуновское движение==
<source lang="c++">
constant DecimalNumber Force <-= 0.25
constant DecimalNumber Duration <-= 0.25
while true is true
{
each (Sphere sphere) in (new Sphere[] {this.sphere, this.sphere2, this.sphere3}) together
do together
{
sphere move = FORWARD, Force - nextRandomRealNumberRange(0.0, 2.0 * Force), duration = Duration, animationStyle = BEGIN_AND_END_ARBUTLY
sphere move = RIGHT, Force - nextRandomRealNumberRange(0.0, 2.0 * Force), duration = Duration, animationStyle = BEGIN_AND_END_ARBUTLY
}
}