Behavior : LJ potential
Author:Rex.Rainbow
- Lennard-Jones potential formula - ( (A/r^n)-(B/r^m) ) for attracting or rejecting objects.
Download
Properties
Source
- Source for attracting or rejecting.
Source tag
- Target will attract or reject to sources which have the same tag.
A
- Parameter A, for attracting magnitude. (A/r^n)-(B/r^m)
n
- Parameter n, for attracting declined. (A/r^n)-(B/r^m)
B
- Parameter B, for rejecting magnitude. (A/r^n)-(B/r^m)
m
- Parameter m, for rejecting declined. (A/r^n)-(B/r^m)
Sensitivity range
- Affecting when distance is less then this range. 0 is infinity. Source only.
Target
- Attract or reject to source.
Target tag
- Target will attract or reject to sources which have the same tag.
Actions
Activated
Action:Set source enable
- Enable to be a gravitation source.
- Source ( Combo ) : Enable to be source.
Action:Set target enable
- Enable to be a gravitation target.
- Target ( Combo ) : Enable to be target.
LJ potential
Action:Set parameter
- Set parameters of LJ potential.
- Parameter ( Combo ) : Parameter of LJ potential.
- Options : ["A","n","B","m"]
- Value ( number ) : Value of parameter.
Sensitivity
Action:Set sensitivity range
- Set sensitivity range for source.
- Range ( number ) : Sensitivity range.
Tag
Action:Set source tag
- Set source tag.
- Source tag ( string ) : Source tag.
Action:Set target tag
- Set target tag.
- Target tag ( string ) : Target tag.
Update
Action:Update
Update wo tag
Action:Clean
Action:Attracted by source
- Attracted by source.
- Source ( object ) : Source for attracting or rejecting.
Expressions
Enable
Expression:IsSource
Expression:IsTarget
Output
Expression:ForceAngle
- Get angle of total attracting force.
Expression:ForceMagnitude
- Get magnitude of total attracting force.
Expression:ForceDx
- Get dx of total attracting force.
Expression:ForceDy
- Get dy of total attracting force.
Parameters
Expression:A
- Get param A (attracting force)
Expression:n
- Get param n (attracting declined)
Expression:B
- Get param B (rejecting force)
Expression:m
- Get param m (rejecting declined)
Sensitivity
Expression:Range
Source
Expression:SourceUID
- Get attracting source uid.
Tag
Expression:SourceTag
Expression:TargetTag
Target
Expression:TargetUID
- Get attracted target uid.
Conditions
Output
Condition:Has force
- Return true if force is not 0.
Source
Condition:Begin attracting
- Triggered when attracting beginning, to get attracted target uid.
Condition:End attracting
- Triggered when attracting end, to get attracted target uid.
Condition:Has attracting
- Return true if source has attracting target.
Target
Condition:Has been attracted
- Return true if target has been attracted by source.
Condition:Begin attracted
- Triggered when attracted beginning, to get attracted source uid.
Condition:End attracted
- Triggered when attracted ending, to get attracted source uid.