File Exchange

image thumbnail

Rolling Ball on Plane

version (24.7 KB) by Janne Salomäki
Model of a rolling ball on plane using SimMechancs.


Updated 09 Feb 2015

View Version History

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This model simulates a rolling ball on plane. It is constructed in SimMechanics (2nd generation). The contact between ball and plane is modelled by taking into accout the support force and simple friction force. The model uses an S-function coded in C language. It must be compiled first by giving a command "mex ballplanecontact.c" in the MATLAB Command Window. The model was inspired by SimMechanics Contact Forces Library.

Cite As

Janne Salomäki (2021). Rolling Ball on Plane (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Sujay C

ball contact element not available thus its not playing

Rzwan Ahmed Afzal

Hi, i want to change the sphere into a cylinder, so that i can simulate the behavior of a wheel instead of a ball. Can you please suggest what factors should i be looking to change inside the contact forces library in order to simulate a rolling wheel on a flat surface? Thanks in advance!

Yu Zhao

Interesting simulation. Thanks!

David Chiu

Hi, is it possible to upload a complied version? SDK is acting funny on windows 7.


MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!