Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-DiagramOptionsPhysics

Namespace PSWriteHTML

Configures the physics settings for a network visualization.

Remarks

Configures the physics settings for a network visualization in a detailed manner, allowing customization of stabilization, velocity limits, timestep, and other parameters to optimize the behavior of the physics simulation.

Examples

Authored help example

EXAMPLE 1


An example
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-DiagramOptionsPhysics [-AdaptiveTimestep <Nullable`1>] [-BarnesHutAvoidOverlap <Nullable`1>] [-BarnesHutCentralGravity <Nullable`1>] [-BarnesHutDamping <Nullable`1>] [-BarnesHutGravitationalConstant <Nullable`1>] [-BarnesHutSpringConstant <Nullable`1>] [-BarnesHutSpringLength <Nullable`1>] [-BarnesHutTheta <Nullable`1>] [-Enabled <Nullable`1>] [-MaxVelocity <Nullable`1>] [-MinVelocity <Nullable`1>] [-Solver <barnesHut|repulsion|hierarchicalRepulsion|forceAtlas2Based>] [-StabilizationEnabled <Nullable`1>] [-Stabilizationfit <Nullable`1>] [-Stabilizationiterations <Nullable`1>] [-StabilizationonlyDynamicEdges <Nullable`1>] [-StabilizationupdateInterval <Nullable`1>] [-Timestep <Nullable`1>] [-WindX <Nullable`1>] [-WindY <Nullable`1>] [<CommonParameters>]
#
Parameter set: BarnesHut

Parameters

AdaptiveTimestep Nullable`1 optionalposition: namedpipeline: False
If this is enabled, the timestep will intelligently be adapted (only during the stabilization stage if stabilization is enabled!) to greatly decrease stabilization times. The timestep configured above is taken as the minimum timestep. This can be further improved by using the improvedLayout algorithm. Layout: https://visjs.github.io/vis-network/docs/network/layout.html#layout
BarnesHutAvoidOverlap Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
BarnesHutCentralGravity Nullable`1 optionalposition: namedpipeline: False
There is a central gravity attractor to pull the entire network back to the center.
BarnesHutDamping Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
BarnesHutGravitationalConstant Nullable`1 optionalposition: namedpipeline: False
Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000).
BarnesHutSpringConstant Nullable`1 optionalposition: namedpipeline: False
This is how 'sturdy' the springs are. Higher values mean stronger springs.
BarnesHutSpringLength Nullable`1 optionalposition: namedpipeline: False
The edges are modelled as springs. This springLength here is the rest length of the spring.
BarnesHutTheta Nullable`1 optionalposition: namedpipeline: False
This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.
Enabled Nullable`1 optionalposition: namedpipeline: False
Toggle the physics system on or off. This property is optional. If you define any of the options below and enabled is undefined, this will be set to true.
MaxVelocity Nullable`1 optionalposition: namedpipeline: False
The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximum value.
MinVelocity Nullable`1 optionalposition: namedpipeline: False
Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops.
Solver String optionalposition: namedpipeline: Falsevalues: 4
You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automatically selected, regardless of what you fill in here.
Possible values: barnesHut, repulsion, hierarchicalRepulsion, forceAtlas2Based
StabilizationEnabled Nullable`1 optionalposition: namedpipeline: False
Toggle the stabilization. This is an optional property. If undefined, it is automatically set to true when any of the properties of this object are defined.
Stabilizationfit Nullable`1 optionalposition: namedpipeline: False
Toggle whether or not you want the view to zoom to fit all nodes when the stabilization is finished.
Stabilizationiterations Nullable`1 optionalposition: namedpipeline: False
The physics module tries to stabilize the network on load up til a maximum number of iterations defined here. If the network stabilized with less, you are finished before the maximum number.
StabilizationonlyDynamicEdges Nullable`1 optionalposition: namedpipeline: False
If you have predefined the position of all nodes and only want to stabilize the dynamic smooth edges, set this to true. It freezes all nodes except the invisible dynamic smooth curve support nodes. If you want the visible nodes to move and stabilize, do not use this.
StabilizationupdateInterval Nullable`1 optionalposition: namedpipeline: False
When stabilizing, the DOM can freeze. You can chop the stabilization up into pieces to show a loading bar for instance. The interval determines after how many iterations the stabilizationProgress event is triggered.
Timestep Nullable`1 optionalposition: namedpipeline: False
The physics simulation is discrete. This means we take a step in time, calculate the forces, move the nodes and take another step. If you increase this number the steps will be too large and the network can get unstable. If you see a lot of jittery movement in the network, you may want to reduce this value a little.
WindX Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes to the right (positive value) or to the left (negative value).
WindY Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes downwards (positive value) or upwards (negative value).
New-DiagramOptionsPhysics [-AdaptiveTimestep <Nullable`1>] [-Enabled <Nullable`1>] [-ForceAtlas2BasedAvoidOverlap <Nullable`1>] [-ForceAtlas2BasedCentralGravity <Nullable`1>] [-ForceAtlas2BasedDamping <Nullable`1>] [-ForceAtlas2BasedGravitationalConstant <Nullable`1>] [-ForceAtlas2BasedSpringConstant <Nullable`1>] [-ForceAtlas2BasedSpringLength <Nullable`1>] [-ForceAtlas2BasedTheta <Nullable`1>] [-MaxVelocity <Nullable`1>] [-MinVelocity <Nullable`1>] [-Solver <barnesHut|repulsion|hierarchicalRepulsion|forceAtlas2Based>] [-StabilizationEnabled <Nullable`1>] [-Stabilizationfit <Nullable`1>] [-Stabilizationiterations <Nullable`1>] [-StabilizationonlyDynamicEdges <Nullable`1>] [-StabilizationupdateInterval <Nullable`1>] [-Timestep <Nullable`1>] [-WindX <Nullable`1>] [-WindY <Nullable`1>] [<CommonParameters>]
#
Parameter set: ForceAtlas2Based

Parameters

AdaptiveTimestep Nullable`1 optionalposition: namedpipeline: False
If this is enabled, the timestep will intelligently be adapted (only during the stabilization stage if stabilization is enabled!) to greatly decrease stabilization times. The timestep configured above is taken as the minimum timestep. This can be further improved by using the improvedLayout algorithm. Layout: https://visjs.github.io/vis-network/docs/network/layout.html#layout
Enabled Nullable`1 optionalposition: namedpipeline: False
Toggle the physics system on or off. This property is optional. If you define any of the options below and enabled is undefined, this will be set to true.
ForceAtlas2BasedAvoidOverlap Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
ForceAtlas2BasedCentralGravity Nullable`1 optionalposition: namedpipeline: False
There is a central gravity attractor to pull the entire network back to the center. This is not dependent on distance.
ForceAtlas2BasedDamping Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
ForceAtlas2BasedGravitationalConstant Nullable`1 optionalposition: namedpipeline: False
This is similar to the barnesHut method except that the falloff is linear instead of quadratic. The connectivity is also taken into account as a factor of the mass. If you want the repulsion to be stronger, decrease the value (so -1000, -2000).
ForceAtlas2BasedSpringConstant Nullable`1 optionalposition: namedpipeline: False
This is how 'sturdy' the springs are. Higher values mean stronger springs.
ForceAtlas2BasedSpringLength Nullable`1 optionalposition: namedpipeline: False
The edges are modelled as springs. This springLength here is the rest length of the spring.
ForceAtlas2BasedTheta Nullable`1 optionalposition: namedpipeline: False
This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.
MaxVelocity Nullable`1 optionalposition: namedpipeline: False
The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximum value.
MinVelocity Nullable`1 optionalposition: namedpipeline: False
Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops.
Solver String optionalposition: namedpipeline: Falsevalues: 4
You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automatically selected, regardless of what you fill in here.
Possible values: barnesHut, repulsion, hierarchicalRepulsion, forceAtlas2Based
StabilizationEnabled Nullable`1 optionalposition: namedpipeline: False
Toggle the stabilization. This is an optional property. If undefined, it is automatically set to true when any of the properties of this object are defined.
Stabilizationfit Nullable`1 optionalposition: namedpipeline: False
Toggle whether or not you want the view to zoom to fit all nodes when the stabilization is finished.
Stabilizationiterations Nullable`1 optionalposition: namedpipeline: False
The physics module tries to stabilize the network on load up til a maximum number of iterations defined here. If the network stabilized with less, you are finished before the maximum number.
StabilizationonlyDynamicEdges Nullable`1 optionalposition: namedpipeline: False
If you have predefined the position of all nodes and only want to stabilize the dynamic smooth edges, set this to true. It freezes all nodes except the invisible dynamic smooth curve support nodes. If you want the visible nodes to move and stabilize, do not use this.
StabilizationupdateInterval Nullable`1 optionalposition: namedpipeline: False
When stabilizing, the DOM can freeze. You can chop the stabilization up into pieces to show a loading bar for instance. The interval determines after how many iterations the stabilizationProgress event is triggered.
Timestep Nullable`1 optionalposition: namedpipeline: False
The physics simulation is discrete. This means we take a step in time, calculate the forces, move the nodes and take another step. If you increase this number the steps will be too large and the network can get unstable. If you see a lot of jittery movement in the network, you may want to reduce this value a little.
WindX Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes to the right (positive value) or to the left (negative value).
WindY Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes downwards (positive value) or upwards (negative value).
New-DiagramOptionsPhysics [-AdaptiveTimestep <Nullable`1>] [-Enabled <Nullable`1>] [-MaxVelocity <Nullable`1>] [-MinVelocity <Nullable`1>] [-RepulsionCentralGravity <Nullable`1>] [-RepulsionDamping <Nullable`1>] [-RepulsionNodeDistance <Nullable`1>] [-RepulsionSpringConstant <Nullable`1>] [-RepulsionSpringLength <Nullable`1>] [-Solver <barnesHut|repulsion|hierarchicalRepulsion|forceAtlas2Based>] [-StabilizationEnabled <Nullable`1>] [-Stabilizationfit <Nullable`1>] [-Stabilizationiterations <Nullable`1>] [-StabilizationonlyDynamicEdges <Nullable`1>] [-StabilizationupdateInterval <Nullable`1>] [-Timestep <Nullable`1>] [-WindX <Nullable`1>] [-WindY <Nullable`1>] [<CommonParameters>]
#
Parameter set: Repulsion

Parameters

AdaptiveTimestep Nullable`1 optionalposition: namedpipeline: False
If this is enabled, the timestep will intelligently be adapted (only during the stabilization stage if stabilization is enabled!) to greatly decrease stabilization times. The timestep configured above is taken as the minimum timestep. This can be further improved by using the improvedLayout algorithm. Layout: https://visjs.github.io/vis-network/docs/network/layout.html#layout
Enabled Nullable`1 optionalposition: namedpipeline: False
Toggle the physics system on or off. This property is optional. If you define any of the options below and enabled is undefined, this will be set to true.
MaxVelocity Nullable`1 optionalposition: namedpipeline: False
The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximum value.
MinVelocity Nullable`1 optionalposition: namedpipeline: False
Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops.
RepulsionCentralGravity Nullable`1 optionalposition: namedpipeline: False
There is a central gravity attractor to pull the entire network back to the center.
RepulsionDamping Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
RepulsionNodeDistance Nullable`1 optionalposition: namedpipeline: False
This is the range of influence for the repulsion.
RepulsionSpringConstant Nullable`1 optionalposition: namedpipeline: False
This is how 'sturdy' the springs are. Higher values mean stronger springs.
RepulsionSpringLength Nullable`1 optionalposition: namedpipeline: False
The edges are modelled as springs. This springLength here is the rest length of the spring.
Solver String optionalposition: namedpipeline: Falsevalues: 4
You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automatically selected, regardless of what you fill in here.
Possible values: barnesHut, repulsion, hierarchicalRepulsion, forceAtlas2Based
StabilizationEnabled Nullable`1 optionalposition: namedpipeline: False
Toggle the stabilization. This is an optional property. If undefined, it is automatically set to true when any of the properties of this object are defined.
Stabilizationfit Nullable`1 optionalposition: namedpipeline: False
Toggle whether or not you want the view to zoom to fit all nodes when the stabilization is finished.
Stabilizationiterations Nullable`1 optionalposition: namedpipeline: False
The physics module tries to stabilize the network on load up til a maximum number of iterations defined here. If the network stabilized with less, you are finished before the maximum number.
StabilizationonlyDynamicEdges Nullable`1 optionalposition: namedpipeline: False
If you have predefined the position of all nodes and only want to stabilize the dynamic smooth edges, set this to true. It freezes all nodes except the invisible dynamic smooth curve support nodes. If you want the visible nodes to move and stabilize, do not use this.
StabilizationupdateInterval Nullable`1 optionalposition: namedpipeline: False
When stabilizing, the DOM can freeze. You can chop the stabilization up into pieces to show a loading bar for instance. The interval determines after how many iterations the stabilizationProgress event is triggered.
Timestep Nullable`1 optionalposition: namedpipeline: False
The physics simulation is discrete. This means we take a step in time, calculate the forces, move the nodes and take another step. If you increase this number the steps will be too large and the network can get unstable. If you see a lot of jittery movement in the network, you may want to reduce this value a little.
WindX Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes to the right (positive value) or to the left (negative value).
WindY Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes downwards (positive value) or upwards (negative value).
New-DiagramOptionsPhysics [-AdaptiveTimestep <Nullable`1>] [-Enabled <Nullable`1>] [-HierarchicalRepulsionAvoidOverlap <Nullable`1>] [-HierarchicalRepulsionCentralGravity <Nullable`1>] [-HierarchicalRepulsionDamping <Nullable`1>] [-HierarchicalRepulsionNodeDistance <Nullable`1>] [-HierarchicalRepulsionSpringConstant <Nullable`1>] [-HierarchicalRepulsionSpringLength <Nullable`1>] [-MaxVelocity <Nullable`1>] [-MinVelocity <Nullable`1>] [-Solver <barnesHut|repulsion|hierarchicalRepulsion|forceAtlas2Based>] [-StabilizationEnabled <Nullable`1>] [-Stabilizationfit <Nullable`1>] [-Stabilizationiterations <Nullable`1>] [-StabilizationonlyDynamicEdges <Nullable`1>] [-StabilizationupdateInterval <Nullable`1>] [-Timestep <Nullable`1>] [-WindX <Nullable`1>] [-WindY <Nullable`1>] [<CommonParameters>]
#
Parameter set: HierarchicalRepulsion

Parameters

AdaptiveTimestep Nullable`1 optionalposition: namedpipeline: False
If this is enabled, the timestep will intelligently be adapted (only during the stabilization stage if stabilization is enabled!) to greatly decrease stabilization times. The timestep configured above is taken as the minimum timestep. This can be further improved by using the improvedLayout algorithm. Layout: https://visjs.github.io/vis-network/docs/network/layout.html#layout
Enabled Nullable`1 optionalposition: namedpipeline: False
Toggle the physics system on or off. This property is optional. If you define any of the options below and enabled is undefined, this will be set to true.
HierarchicalRepulsionAvoidOverlap Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.
HierarchicalRepulsionCentralGravity Nullable`1 optionalposition: namedpipeline: False
There is a central gravity attractor to pull the entire network back to the center. Default (Number) 0.0
HierarchicalRepulsionDamping Nullable`1 optionalposition: namedpipeline: False
Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.
HierarchicalRepulsionNodeDistance Nullable`1 optionalposition: namedpipeline: False
This is the range of influence for the repulsion. Default (Number) Default 120
HierarchicalRepulsionSpringConstant Nullable`1 optionalposition: namedpipeline: False
This is how 'sturdy' the springs are. Higher values mean stronger springs.
HierarchicalRepulsionSpringLength Nullable`1 optionalposition: namedpipeline: False
The edges are modelled as springs. This springLength here is the rest length of the spring.
MaxVelocity Nullable`1 optionalposition: namedpipeline: False
The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximum value.
MinVelocity Nullable`1 optionalposition: namedpipeline: False
Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops.
Solver String optionalposition: namedpipeline: Falsevalues: 4
You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automatically selected, regardless of what you fill in here.
Possible values: barnesHut, repulsion, hierarchicalRepulsion, forceAtlas2Based
StabilizationEnabled Nullable`1 optionalposition: namedpipeline: False
Toggle the stabilization. This is an optional property. If undefined, it is automatically set to true when any of the properties of this object are defined.
Stabilizationfit Nullable`1 optionalposition: namedpipeline: False
Toggle whether or not you want the view to zoom to fit all nodes when the stabilization is finished.
Stabilizationiterations Nullable`1 optionalposition: namedpipeline: False
The physics module tries to stabilize the network on load up til a maximum number of iterations defined here. If the network stabilized with less, you are finished before the maximum number.
StabilizationonlyDynamicEdges Nullable`1 optionalposition: namedpipeline: False
If you have predefined the position of all nodes and only want to stabilize the dynamic smooth edges, set this to true. It freezes all nodes except the invisible dynamic smooth curve support nodes. If you want the visible nodes to move and stabilize, do not use this.
StabilizationupdateInterval Nullable`1 optionalposition: namedpipeline: False
When stabilizing, the DOM can freeze. You can chop the stabilization up into pieces to show a loading bar for instance. The interval determines after how many iterations the stabilizationProgress event is triggered.
Timestep Nullable`1 optionalposition: namedpipeline: False
The physics simulation is discrete. This means we take a step in time, calculate the forces, move the nodes and take another step. If you increase this number the steps will be too large and the network can get unstable. If you see a lot of jittery movement in the network, you may want to reduce this value a little.
WindX Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes to the right (positive value) or to the left (negative value).
WindY Nullable`1 optionalposition: namedpipeline: False
The amount of force to be applied pushing non-fixed nodes downwards (positive value) or upwards (negative value).