GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - farmaazon/gielo: Simple curling simulation

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
benches
benches
 
 
docs
docs
 
 
game
game
 
 
pkg
pkg
 
 
sheet
sheet
 
 
simulation
simulation
 
 
slint
slint
 
 
src
src
 
 
team
team
 
 
tests
tests
 
 
unit
unit
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
rustfmt.toml
rustfmt.toml
 
 

Repository files navigation

Simple Curling Simulator

A simulation of the game of curling, for practising the right calls - execution (including sweeping) is outside the players' control, so be sure to consider all possible outcomes! Written in Rust with Slint; the browser version below is the same code compiled to WebAssembly.

animation

You can play the browser version: set up the player names and their accuracy (average error of weight and angle), then press Start. Click on the sheet to place a marker and see the stone's most probable resting position (don't adjust the marker for sweeping - it's assumed to be "included" in the delivering player's accuracy). Right-click to quickly switch rotation. Weight is expressed as hog-to-hog time - check "automatic" to set the weight to reach the marker.

Building the desktop version

$ cargo run --release

Tested mostly on Linux, but should work on all platforms supported by Slint.

Simulation details

To keep the simulation fast for analysis (e.g. quickly generating "heatmaps" of possible outcomes), it is advanced not step-by-step but event-to-event: from a starting situation we compute when the next event happens - a collision, a stone leaving play, or a stone coming to rest - and after each event recompute the velocity and acceleration vectors.

The "curling" of a stone's trajectory is modelled as a constant* force applied perpendicular to its motion. Because this acceleration vector rotates over time, computing it exactly is too complex; instead it is updated once per time quantum. The quantum length is adaptive — it ends when the approximation drifts too far from the true vector, so it's longer at high velocities.

*Not quite how real curling stones behave — they tend to curl more as their rotation slows down. Something to improve in the future.

About

Simple curling simulation

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.