Recherche Google
ModalysConnections > Force Connection
page précédentepage suivante

Force Connection

Description

Applies force to an access.

(make-connection 'force ... )

Lisp Syntax and Default Values

The 'force connection can be created using the following Lisp syntax:

(make-connection 'force access_reference force_controller weight)

Parameters

The 'force connection takes three arguments:

  • access_reference: any access.
  • force_controller: a one-dimensional controller outputting a value for force in Newtons.
  • weight: (optional) controller weighing the interaction.

The force controller is a one-dimensional controller which outputs a value for force in Newtons. The direction of the force is determined by the sign of the output value (i.e., a positive number will apply force in one direction, and a negative number will apply force in the opposite direction).

The weight controller is optional. If not provided, it defaults to 1.

Discussion

Among the connections used for moving objects around, i.e., 'position, 'speed, and 'force, 'force should be used whenever possible. Its primary advantage is that it is by far the least expensive of the three functions in terms of computation; but also, it is often the most “gentle” way of doing things. For instance, a sudden change in position or speed will often result in a harsh and “unnatural” effect, especially when a change in direction is involved. If, however, an object is moving in one direction and one suddenly pushes it (using 'force) in the other, it will take time to slow down, making a smooth deceleration before changing direction. The only disadvantage to 'force is that it is sometimes a bit tricky to control. It is often helpful to try a model out using 'position or 'speed, changing 'force after everything else is working.

Applying a constant force to an object is a good way to simulate gravity in Modalys.

Options

There are no special options for this connection.

page précédentepage suivante
A propos...©IRCAM 2014Réalisé avec Scenari