Skip to content

Spinning top

Basic contacts

A spinning chuck winds up a top and lets it go on its tip.

0.00 s
The steel preset (the default), recordedon an NVIDIA RTX PRO 6000 Blackwell.

Run it

Terminal window
cd examples
# the default preset (steel), then the others
uv run shelf play spinning_top
# change solver settings live
uv run shelf tune spinning_top

Source: examples/shelf/01_basic_contacts/spinning_top/ · ported from steel-webgpu assets/scenes/spinning_top (hero_montage export) @ ad03e49

Presets

PresetSolverStatusChecked

Solvers with no row are untested on this example. The full settings are inpresets.toml.

Code

examples/shelf/01_basic_contacts/spinning_top/example.py
# SPDX-FileCopyrightText: Copyright (c) 2026 Skild AI and the Steel contributors
# SPDX-License-Identifier: Apache-2.0
# Direct source: steel-webgpu; see presets.toml and THIRD_PARTY.md.
# Modified for Steel Shelf: preset-driven execution and shared runner integration.
###########################################################################
# Example Spinning top
#
# A motorised chuck grips the top's stem, spins it up and releases it; the top keeps spinning upright on its tip.
#
# Rebuilt from steel-webgpu's exported scene (assets/scenes/spinning_top: scene.json
# and scene.bin, copied next to this file); see common/exported_scene.py. The
# visual meshes draw when a steel-webgpu checkout sits next to the shelf.
#
# Command: python -m shelf run spinning_top
#
###########################################################################
import newton.examples
from common.exported_scene import ExportedSceneExample
class Example(ExportedSceneExample):
file = __file__
if __name__ == "__main__":
parser = Example.create_parser()
viewer, args = newton.examples.init(parser)
newton.examples.run(Example(viewer, args), args)