Multibody Contact Force Block Examples in Simscape Multibody

Examples demonstrating contact force modeling in Simscape Multibody
666 Downloads
Updated 13 Jan 2026
This repository contains a set of examples that demonstrate the Spatial Contact Force block and Planar Contact Force block. The examples cover:
  • Solid-to-solid contact between parameterized solids like bricks, spheres, and cylinders
  • Contact between CAD geometry including STEP files.
  • Point Cloud definition for efficient contact modeling of complex shapes.
  • Grid Surface modeling for efficient contact modeling with terrain.
  • Custom force law definition including collision and friction forces.
Use the "Download from GitHub" button above to access files compatible with the current release of MATLAB.
Use the links below to access files compatible with earlier releases of MATLAB.
Open the project file Spatial_Contact_Force_Examples.prj to get started.
To learn more about contact modeling with Simscape Multibody, please visit:
Try these free, hands-on tutorials to learn how to use Simscape:
See also:
This submission uses the S^2 Sampling Toolbox Anton Semechko (2022). Suite of functions to perform uniform sampling of a sphere (https://github.com/AntonSemechko/S2-Sampling-Toolbox), GitHub. Retrieved March 24, 2022.

Cite As

Steve Miller (2026). Multibody Contact Force Block Examples in Simscape Multibody (https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/25.2.1.7), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with R2020a to R2025b
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
25.2.1.7

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/25.2.1.7

25.2.1.6

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/25.2.1.6

25.1.1.7

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/25.1.1.7

25.1.1.6

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/25.1.1.6

24.2.1.7

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/24.2.1.7

24.2.1.6

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/24.2.1.6

24.1.1.6

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/24.1.1.6

23.2.1.6

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/23.2.1.6

23.1.1.5

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/23.1.1.5

22.2.1.5

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/22.2.1.5

22.1.1.5

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/22.1.1.5

22.1.1.4

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/22.1.1.4

21.2.1.3

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/21.2.1.3

21.1.1.2

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/21.1.1.2

20.2.1.1

See release notes for this release on GitHub: https://github.com/mathworks/Spatial-Contact-Force-Examples-Simscape-Multibody/releases/tag/20.2.1.1

20.1.1.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.