================================================================================================ PÉTANQUE - an independent reimplementation https://petanque.skillsafe.ai/ ================================================================================================ WHAT THIS IS An independent, from-scratch reimplementation of PÉTANQUE, the Provençal boules game. It is not affiliated with, endorsed by, or connected to the Fédération Internationale de Pétanque et Jeu Provençal (FIPJP), any of its member federations, or any manufacturer of boules. No code, art, text or data from any other pétanque product was used. Everything here - the engine, the renderer, the art, the opponent - was written for this app. THE ORIGINAL Pétanque has no single author and no publisher. The form played today was devised at LA CIOTAT, near Marseille, in 1907, when a local player named Jules Lenoir - who could no longer run up to throw - was accommodated by marking a circle and having everyone throw with their feet together. "Pétanque" is from the Provençal "pè tanca", feet planted. The game descends from the older jeu provençal, in which the thrower takes a run-up. The first codified rules date from 1907 and the first tournament from 1910. The sport is governed by the FIPJP, founded in 1958 in Marseille. Sport: pétanque (boules) Origin: La Ciotat, France, 1907 Codified: by the FIPJP; this app follows the edition of DECEMBER 2020 Governing: Fédération Internationale de Pétanque et Jeu Provençal, https://fipjp.org/ WHAT THIS APP IS FOR To be a faithful pétanque, at the rulebook's own dimensions, in which the interesting decisions are the real ones: which shot, where to land it, how much backspin, and whether to point or shoot. ================================================================================================ SOURCES ================================================================================================ PRIMARY - the FIPJP's own documents. Every rule in this app is cited to an article of one of these, and the app's own specification panel shows the citation next to each figure. [RULES] OFFICIAL RULES FOR THE SPORT OF PÉTANQUE Approved by the Executive Committee of the FIPJP, DECEMBER 2020. 41 articles. https://fipjp.org/images/2021/reglements/Official_Rules_Petanque-En.pdf The English text on fipjp.org; the French edition carries the same edition line. [HOMOL] HOMOLOGATION OF COMPETITION BOULES FIPJP, January 2023. Supplies the hardness band, the markings, the sphericity and the striation limit, all of which Art. 2 of [RULES] defers to it. [LABELS] LABELS DES BOULES ET BUTS AGRÉÉS FIPJP, updated 15 June 2026. Re-confirms the jack specification and lists the manufacturers' hardness grades. [PRECIS] PRECISION SHOOTING RULES FIPJP. The geometry of the tir de précision, and the ONLY place in any FIPJP document where a carreau is given a rule. It also fixes the FIPJP's own reference boule at 74 mm and 700 g. SECONDARY - used to cross-check, never as a source for a rule. [OBUT] Obut (La Boule Obut), manufacturer size, weight and hardness guidance, and its 56-entry glossary of pétanque terms. https://www.obut.com/ Used for: the diameters and weights actually sold, the commercial hardness ladder, and the definitions of the shot names. One of its own pages states the jack is 35 mm, which contradicts Art. 3 and is recorded here as an error caught. [WP] Wikipedia, "Pétanque"; French Wiktionary entries for pétanque, portée, carreau, arrêt-buffet, fanny. Used for terminology and history only. PHYSICS - from outside the sport. The rules specify nothing about the ground. [KD] H. Katsuragi and D. J. Durian, "Unified force law for granular impact cratering", NATURE PHYSICS 3, 420-423 (2007); arXiv:cond-mat/0703072. The FORM of this app's terrain model: a depth term plus an inertial v^2 term. Their measured inertial drag length, scaled to a boule, is d1 = 9.7 cm, and this app's inertial term agrees with it within a factor of 1.2 to 3.6 over 2 to 8 m/s. Their DEPTH term is 56x softer than this app's, because their medium is fluidised glass beads at a 24-degree angle of repose: their own constants predict a boule sinking 6.5 mm just by standing on the bed, which is freshly raked gravel and not a played piste. The difference is compaction and it is stated rather than hidden. [JOHN] K. L. Johnson, CONTACT MECHANICS - the elastoplastic coefficient of restitution, e = 3.8 (Y/E*)^(5/8) (rho v^2 / 2Y)^(-1/8), so e falls as v^(-1/4). This app DERIVES its boule-on-boule restitution from that formula, fed the FIPJP's own 35-55 HRC hardness band. See "THE CARREAU" below. [BG] S. Bhadra and S. Ghosh, "Vibrational Effects on the Coefficient of Restitution", arXiv:2008.09893 (2020), Table I: 0.9265 to 1.014 for a stainless steel ball on stainless steel plates near zero speed. A ball-on-PLATE measurement with spring coupling, so values above 1 are the plate returning energy and are impossible between two free boules. Used as an upper anchor and as the source of the alternative v^(1/5) velocity expansion, which this app reports but does not use. [HIB] R. C. Hibbeler, ENGINEERING MECHANICS: STATICS & DYNAMICS, 11th ed., pp. 441-442, and the rolling-resistance table it and Astakhov, Baker (1914) and Gillespie supply: 0.001 to 0.0015 for a hardened steel ball on steel, 0.0385 to 0.073 for a stagecoach on a dirt road, 0.30 for tyres on sand. This app's 0.05 to 0.15 sits inside that bracket. THE EXACT PAIRING - a steel sphere on compacted gravel - IS NOT PUBLISHED ANYWHERE I COULD REACH. [TABOR] D. Tabor, THE HARDNESS OF METALS - indentation hardness is about three times the yield stress, which is how [HOMOL]'s HRC band becomes a stress. ================================================================================================ EVERY NUMBER, BY CLASS ================================================================================================ The app's own specification panel lists all 77 entries with their sources. The four classes are: SOURCED (42) an article of an FIPJP document, named. MEASURED (14) a published measurement or a standard physical constant. CALIBRATED (6) chosen so the model reproduces something observable. The target is named. RECONSTRUCTED (15) chosen, with a reason. Nothing here is a "documented" constant. The whole terrain model falls in the last two classes, and that is not a corner cut: Art. 5 of [RULES] says only that pétanque "is played on any surface", and no measurement of a boule's restitution or of a steel sphere's rolling resistance on gravel exists. --- THE SIX CALIBRATED FIGURES, AND WHAT EACH WAS CALIBRATED AGAINST --- Gravel bearing pressure 200 to 1100 kPa across the four terrains. Set so a typical portée digs a 17 to 20 mm hole. Art. 10 of [RULES] is the only rulebook sentence bearing on the ground and it lets a player "fill in a hole which would have been made by one boule played previously" - so a played boule leaves a hole of a size worth filling in. Horizontal/vertical 0.45. Scanned at FIXED bearing pressure, with the crater depth bearing ratio confirmed unchanged at 20.0 mm across the whole scan, against the three shots' own known behaviour: a portée runs 2 to 4 cm, a demi-portée 1.9 to 3.8 m, a hard roulette 10 to 11 m. At 0.60, the first draft's value, a demi-portée ran 0.81 m and could not point. Rolling resistance 0.05 / 0.075 / 0.105 / 0.15. Inside [HIB]'s bracket, set so a boule pointed 6 to 10 m leaves the hand at a speed a person can throw. Contact stiffness 4.1e7 N/m^1.5. Sets the bed's coefficient of restitution and nothing else. The model then MEASURES 0.27 at 1 m/s falling to 0.04 at 8 m/s, inside the 0.1 to 0.3 published for a sphere on a granular bed at low speed - so the restitution is an outcome, not an input. Contact damping 3.0 s/m, Hunt-Crossley. Without it the contact spring rings undamped at 110 Hz and a boule that has stopped moving never registers as at rest - two of the first probe's twenty-eight landings never settled inside twenty-five seconds. Bulk density of the bed 1600 kg/m^3, compacted gravel. Scales the inertial term, which is then checked against [KD]. --- THE FIFTEEN RECONSTRUCTED FIGURES --- Sliding friction, steel on gravel 0.65, the middle of a 0.6 to 0.8 bracket taken from a 35 to 40 degree angle of repose for crushed stone. Compare [KD]'s measured 0.45 for glass beads at 24 degrees. Steel on steel sliding friction 0.16, standard dry value. Boule on jack restitution 0.50 on boxwood, 0.58 on a synthetic. The three pointing shots roulette 8 deg from 0.15 m; demi-portée 22 deg from 0.85 m; portée 42 deg from 1.20 m. The rules name no shot and specify no release height. The données that result - a demi-portée landing about midway to the jack, a portée landing on it - match [OBUT]'s coaching guidance, which is a CHECK and not a source. The tir 20 deg from 1.30 m, arriving at the target's own centre height; a 24 to 35 degree arrival over Art. 7's band. Maximum backspin 60 rad/s, about 570 rpm. Eye height in the circle 1.62 m. Every colour on screen The rules specify no colour except that a jack may be painted (Art. 3). The two teams are told apart by their striation pattern, which [HOMOL] Art. 6 allows up to 1 mm deep, and by a coloured cap that is purely this app's affordance. The opponent Four levels, differing only in the spread on their aim, donnée, spin and shot choice. The score cap Art. 5 says only that games are played to 13. Because a whole end scores at once, a team on 11 taking 4 would have 15, and no scoreboard reads 15. A convention. Fanny at 13-0 Folklore, in no article. THE GENERAL END-SCORING RULE See the next section. This is the important one. What a tape measures The GAP between the surfaces, in three dimensions. The tie resolution 0.1 mm, finer than any tape a player carries. Magnus force from spin Neglected: under 1% of the boule's weight at 10 m/s and 60 rad/s, so it would move a landing point by millimetres. ================================================================================================ WHAT THE RULEBOOK DOES NOT CONTAIN - three findings ================================================================================================ 1. THE GENERAL END-SCORING RULE IS NEVER STATED IN ITS OWN RIGHT. The single most important rule in the sport - that the team holding the point scores one for every boule closer than the opponent's best - does not appear as a rule anywhere in the December 2020 edition. All 41 articles were searched. It appears only INSIDE Art. 29 (2), as the resolution of the equidistant case ("it plays them and scores as many points as it has boules closer to the jack than the nearest opponent's boule"), and inside Art. 14 (2) for a dead jack. Art. 16 uses "hold the point" without ever defining it, and Art. 5 gives the target of 13 without saying how a point is won. This app RECONSTRUCTS the rule from Art. 29 (2), and its own Help says so. 2. NOTHING SAYS WHAT A TAPE MEASURES. Art. 26 requires "appropriate instruments" and forbids measuring with the feet, and says nothing about the geometry. This app measures the gap between the two surfaces in three dimensions, which is what a tape held between a boule and the jack reads. That matters: because Art. 2 lets each player choose a diameter anywhere in 70.5 to 80 mm, gap ordering and centre-to-centre ordering are DIFFERENT ORDERINGS, and an 80 mm boule 4 mm further out by its centre than a 70.5 mm one is nearer by its surface. The app's harness measures how often the two disagree. 3. ART. 9 (3) DOES NOT SAY WHICH PART OF THE CIRCLE IT MEASURES FROM. Art. 7 (1) is explicit that the jack's 6 to 10 m is measured from the circle's INTERNAL EDGE. Art. 9 (3)'s 20 m and 3 m say only "from the throwing circle". This app takes the same edge reading for both, for consistency; the two readings differ by the circle's radius, 25 cm. ================================================================================================ THE CARREAU - and a correction to the received wisdom ================================================================================================ A carreau is the shot the sport is organised around: the shooter's boule strikes an opponent's dead centre, drives it out, and stops in its place. IT IS NOT SPECIAL-CASED IN THIS ENGINE. There is no "carreau" in the collision solver, the terrain model, the scorer or the turn order; the only occurrences in code are inside the FIPJP precision-shooting scorer, which LABELS an outcome after the physics has produced it. It falls out of one line of algebra. For a head-on impulse between masses m1 and m2 with restitution e, the striker keeps v1 (m1 - e m2)/(m1 + m2). At EQUAL masses that is (1 - e)/2, which goes to zero as e goes to 1. Art. 2's 650 to 800 g band means equal masses are a choice, and that makes the same expression the control: an 800 g boule striking a 650 g one keeps 23% of its speed against the equal-mass 14%. The restitution is DERIVED, not chosen. [HOMOL] Art. 3a fixes steel boules at 35 to 55 HRC; [TABOR] turns a hardness into a yield stress; [JOHN] turns a yield stress into a restitution. Fed that band the formula returns e = 0.57 at the legal soft floor and 0.80 near the safety ceiling, at shooting speed - which brackets the 0.75 to 0.90 an independent engineering estimate reaches from [BG]'s measurement and the observable fact that competition boules dent. WHAT THE GAME ADDS is the ground. A tir arrives descending, 24 to 35 degrees below horizontal over Art. 7's 6 to 10 m band, and a shot aimed at the target's own centre meets it exactly head-on - so the whole velocity is normal and the shooter's residual is also descending. That residual goes into the gravel: the shooter arrives in a hole of its own making, 74 mm short of where the target stood, and stops. Backspin cancels what is left, and the amount needed RISES with the distance - 20 rad/s at 5 m, 60 at 9 m - which is why the carreau is a skill. THE CORRECTION. [OBUT] publishes that shooters should choose their boules "from among the softest", and the reason usually given - that a soft, low-restitution boule "does not bounce back off the target, so it stays in the vacated place" - IS THE OPPOSITE of what an equal-mass head-on impulse does. The striker keeps (1 - e)/2 of its speed, so a LOW restitution means it keeps MORE and follows through. Measured in this engine with the spin removed, a 35 HRC boule finishes 719 mm from the target's place and a 52 HRC one 137 mm. A harder boule carreaus better. The real advantage of a soft boule lies elsewhere, and this app measures one: a smaller normal impulse deflects it less, so an off-centre strike carries on towards the jack instead of being flung aside. At a 20 mm offset a 35 HRC boule is turned 32 degrees and a 52 HRC one 52 degrees. ================================================================================================ WHAT DIFFERS FROM THE REAL GAME ================================================================================================ * No umpire and no discipline. Art. 21's one minute a boule and the whole of Art. 32 to Art. 41 - cards, absences, complaints, dress, the jury - are out. * One marked lane, so all four of its lines are dead ball lines. With no obstacle on the terrain, Art. 9 (2)'s invisible jack and Art. 9 (4)'s crossed lanes cannot arise, nor can Art. 9 (5)'s lost jack or Art. 9 (6)'s intervening out-of-bounds area. * Nobody interferes with a moving boule, so Art. 8, Art. 15 and Art. 20 do not arise; nobody disturbs a boule while measuring, so Art. 28 does not either; nothing breaks, so Art. 11 does not. * A player throws for the whole team rather than in turn, and the order within a team is not modelled - Art. 16 leaves it free anyway. * The terrain is flat and level. Art. 12 and Art. 22's boules moved "by the wind or slope of the ground" therefore cannot happen. * The donnée marker drawn on the terrain would be ILLEGAL in play: Art. 16 forbids using any object or drawing a line on the ground to guide a throw or mark its landing point. It is an aid, always shown. * The engine plays at a fixed 1/4000 s step. That is not a cosmetic choice: at 1/2000 a portée's roll-out comes out thirty times too long and non-monotone in the donnée. ================================================================================================ BUILD ================================================================================================ Hand-written WebGL2 with no libraries and no CDN; nothing outside this bundle is loaded. The engine (js/petanque.js) is pure, deterministic and DOM-free, seeded with mulberry32 so any game is reproducible from a number. Seven drawing primitives, each of which describes itself so that tools-normals.js - written BEFORE the geometry - can verify every triangle's winding against a predicate rebuilt from the primitive's own parameters, with zero exclusions. Sources for the rules were read from the FIPJP PDFs directly. Everything else in this file names its paper. Licence for the software: MIT. See LICENSE.txt. "Pétanque", the FIPJP's name and marks, and manufacturers' names remain their owners'.