# Pétanque > A 3D browser reimplementation of pétanque, the Provençal boules game governed by the FIPJP, > built at the rulebook's own dimensions with a gravel terrain modelled from first principles and > a carreau that emerges from the collision law rather than being scripted. Site: https://petanque.skillsafe.ai/ Licence: MIT for the software (LICENSE.txt). Not affiliated with the FIPJP. Sources by article, and every calibrated figure: /CREDITS.txt ## What it is Pétanque was devised at La Ciotat in 1907 and is governed by the Fédération Internationale de Pétanque et Jeu Provençal. This app follows the FIPJP's Official Rules for the Sport of Pétanque in the edition approved by its Executive Committee in December 2020, together with the FIPJP's Homologation of Competition Boules (January 2023) and its Precision Shooting Rules. Pure client-side: no model, no server call, no credits. Runs entirely in the browser on WebGL2. ## The rules it implements, by article - Art. 1 triples 3v3 with 2 boules each; doubles and singles with 3 each - six boules a team - Art. 2 boules of metal, 70.5 to 80 mm, 650 to 800 g, hollow, untampered - Art. 3 a jack of 30 mm +/- 1 mm and 10 to 18 g, wood or synthetic, never magnetic - Art. 5 terrain 15 x 4 m minimum for championship play, never below 12 x 3 m; games to 13, or 11 for leagues and qualifying heats; barriers 1 m outside the exterior line - Art. 6 a drawn circle 35 to 50 cm across, a manufactured one 50 cm inside diameter; both feet entirely inside until the boule lands; ONE attempt at the jack - Art. 7 the jack 6 to 10 m from the circle's INTERNAL EDGE, 50 cm from any obstacle and from the END line, no minimum from a side line; the next circle traced round where the jack finished, with a step-back when the full throw will not fit - Art. 9 the seven ways a jack dies; the 20 m and 3 m limits; "entirely beyond the boundary" - Art. 10 a player may fill in the hole a previously played boule made - Art. 14 the three branches when the jack dies mid-end - Art. 16 the team that does not hold the point plays; no object may guide a throw - Art. 19 a boule is dead only after COMPLETELY crossing the boundary; straddling is valid - Art. 22 a boule moved by a boule played in the same game stays where it is put - Art. 26 measuring, with appropriate instruments and not with the feet - Art. 29 the three answers when two opposing boules measure equal; a void end - Homologation Art. 3a steel boules 35 to 55 HRC; Art. 6 striations at most 1 mm deep - Precision Shooting sections 1, 3 and 4 the tir de précision, and the only FIPJP rule that scores a carreau: 5 points when the target leaves the 1 m circle and yours stays in it ## Three things the rulebook does not contain, and this app says so 1. The general end-scoring rule - one point for every boule closer than the opponent's best - is never stated in its own right. It appears only inside Art. 29 (2), as the resolution of the equidistant case, and inside Art. 14 (2) for a dead jack. Art. 16 uses "hold the point" without defining it. Reconstructed from Art. 29 (2). 2. Nothing says what a tape measures. This app measures the gap between the surfaces in three dimensions - and because Art. 2 makes the diameter a free choice, that is a different ordering from centre-to-centre. 3. Art. 9 (3) says only "from the throwing circle" where Art. 7 (1) says "internal edge". This app takes the edge reading for both; they differ by 25 cm. ## The terrain, which no rule describes Art. 5 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 is published anywhere. So the ground is built from first principles: an elastic-plastic contact against a datum that advances plastically, with the normal force capped at the gravel's bearing pressure over the horizontal projection of the buried spherical cap, a ploughing drag over the cap's vertical projection, and a furrow that decays as the boule moves forward so that climbing out of the hole costs what it should. A pressure field on a sphere applies NO torque about the sphere's centre - every surface normal passes through it - so the plough cannot spin a boule up, and Coulomb friction at the contact can bring it to rolling but never past it. That one law gives all three shots with no special case: arrival angle roll-out on standard terrain (74 mm / 700 g boule) 10 deg 6.5 to 27 m a roulette runs 30 deg 3.5 to 7.8 m a demi-portée 50 deg 0.05 to 0.6 m a portée digs in 70 deg 0.011 to 0.016 m and stops The FORM of the law is Katsuragi & Durian's measured granular-impact force law (Nature Physics 3, 420, 2007); its LEVEL is calibrated, against the size of the hole Art. 10 thinks worth filling in. The app's own specification panel lists all 77 constants in four classes - 42 sourced to an FIPJP article, 14 measured outside the sport, 6 calibrated, 15 reconstructed - with the citation or the calibration target next to each. ## The carreau Not special-cased. A head-on impulse between equal masses leaves the shooter (1-e)/2 of its speed, which goes to zero as e goes to 1. The restitution is derived: the FIPJP's own 35 to 55 HRC band gives a yield stress and Johnson's elastoplastic analysis gives e = 0.57 to 0.80 at shooting speed. A harder boule therefore carreaus better - which is a CORRECTION to the usual advice that shooters should buy soft boules because a low restitution keeps them in place. It does the opposite. What a soft boule really is better at is a mis-hit: a smaller normal impulse deflects it less. Both are measured in the app's harness. ## Controls Shot (roulette, demi-portée, portée, tir), aim, the donnée, backspin, and a power meter you release in the green band. Space or the button swings; arrow keys aim; [ and ] move the donnée; V changes the view; M measures; T uses the range table. Four opponent levels.