will your car scrape my driveway? (redone)

#code #tools #ai

Table of Contents

This post was written by AI, not by Elliott. Claude (Opus 5.5) rebuilt the original driveway calculator from scratch and drafted this page. Elliott plans to rewrite the words in his own voice.

The driveway profile is measured: Elliott’s numbers, taken with a 2 ft level and a tape measure (see my driveway).

what it does

Pick a car, or type in your own measurements. The calculator drives that car through my driveway one inch at a time, both nose first and tail first, and finds the smallest gap between the underside of the car and the ground. If the gap goes below zero, something scrapes, and the calculator tells you what (front bumper, underbody, or rear bumper), by how much, and where.

calculator

your car

from these: . presets are rough shapes, not specific models. measure your car for a real answer (see below).

direction

nose first tail first smallest gap under the car, by where the car's centre is. below the red line, it scrapes. click to jump there.
the driveway

the profile runs from the street toward the house. past the first and last reading it continues at the same slope. edit it to check a different driveway.

measuring your car

Park on flat ground and use a tape measure. All measurements are in inches.

  • wheelbase: centre of the front wheel to centre of the rear wheel. Spec sheets list this.
  • tire diameter: ground to the top of the tire. You can also work it out from the sidewall: 225/45R17 is 17 + 2 × 225 × 0.45 / 25.4 ≈ 25 in.
  • front overhang: centre of the front wheel, forward to the lowest part of the front bumper or splitter. Measure to the low edge that could hit, not to the very tip of the bumper.
  • front bumper height: ground to that same low edge.
  • rear overhang and rear bumper height: the same at the back. Hitches and exhaust tips count.
  • underbody clearance: the lowest point between the wheels, usually the exhaust, a skid plate, or the side skirts. The ground clearance on a spec sheet is usually this number, measured unloaded.
  • safety margin: anything closer than this is marked “too close to call”. The default is 1 in, because a rigid model ignores the suspension. Passengers, luggage, and the bounce from crossing a gutter all push the car lower.

The line under the inputs shows the approach, departure, and breakover angles that these measurements imply. If your car’s spec sheet lists those angles, compare them to check your measurements.

how it works

The old version modelled a straight slope meeting the street with one rounded corner, and treated the car as a line between the axles. This one works from a measured profile and a car with real dimensions.

  • the driveway is a list of points. You can enter it as heights (a level and a tape measure) or as slope readings (a level app on a board). Past the first and last reading, the profile continues at the same slope, so a driveway measured only partway down doesn’t grow a fake dip at the end.
  • the tires are circles that roll on that profile. At a sharp edge, a tire rides over the corner instead of dropping into it, so a real tire scrapes a little less than a point would.
  • the wheels are a wheelbase apart. For each rear-wheel position, the calculator searches (by bisection) for the spot where the other tire touches the ground at exactly that distance. This replaces the circle-and-line algebra that the old page solved by hand in Desmos and Wolfram Alpha, and it works on any profile shape, not only a slope plus one arc.
  • the underside is four points in the car’s frame: rear bumper, underbody at each axle, front bumper. The calculator rotates them with the car, checks the vertical gap to the ground every inch along the car, and keeps the smallest.
  • both directions: driving in nose first and backing in are different problems, because the front and rear overhangs differ. A long, low bumper usually hits where downhill changes to flat (the sag). The underbody usually hits where the street tips over into the slope (the crest).

The geometry code has tests against the textbook formulas. Over a sharp crest with point tires, the underbody gap must equal c − (L/2)·tan(θ/2). At a sharp sag, the bumper gap must equal h − overhang·tan(θ). The model matches both to within 0.05 in.

what it doesn’t model

  • Suspension. The car is rigid at its parked ride height. That’s what the safety margin is for.
  • Side-to-side tilt. If you enter the driveway at an angle, one wheel drops before the other and a corner of the bumper sits lower than its centre. Entering at an angle sometimes saves a scraping car, and sometimes makes a tight one scrape.
  • Anything past the last reading. The profile continues at the last slope, so a dip or level-out beyond your measurements isn’t checked.
  • Bumper shape. The underside is straight lines between the four points. A lip that hangs below the line from the bumper to the axle needs its own overhang and height.

my driveway

Elliott measured the left tire track with a 2 ft level and a tape measure. He rested one end of the level on the driveway, held it level pointing downhill, and measured the drop from the free end to the ground. Then he moved the level to where the tape landed and repeated. The first reading starts on a patch hump at the street edge, less than 1 in above the street. The calculator assumes the street is flat and 3/4 in below the hump; that part wasn’t measured.

stepalong (ft)drop (in)below the hump (in)slope
10–23.53.58.3°
22–469.514.0°
34–65.2514.7512.3°
46–85.7520.513.5°
58–10525.511.8°
610–125.53112.9°
712–1463714.0°
814–1664314.0°
916–185.548.512.9°
1018–20553.511.8°
1120–22457.59.5°
1222–24461.59.5°
1324–263.7565.258.9°

The old page’s guess of 13° was about right for the middle. What it missed is the top: the street rises slightly to the hump, then the driveway drops 8° in the first 2 ft and 14° in the next 2. That’s a sharp crest, and a sharp crest catches the underbody between the wheels.

One real check: Elliott’s 2004 Lexus ES330 scrapes in the middle of its underside every time it goes over the top, and it stops scraping when the wheels still on the street are lifted. That’s the same spot the calculator finds. With the ES330’s published numbers (107.1 in wheelbase, 6.1 in ground clearance), the calculator gives it 0.5 in to spare, which shows as too close to call. An older car with passengers sits lower than its spec sheet, so on this driveway, read too close to call as will probably scrape.

The readings stop 26 ft down, still sloping about 9°, where any car is well past the top. The calculator continues that slope, so it answers the question at the top only. The bottom, where the driveway levels out, isn’t measured, and a long, low bumper could still scrape there.

measuring a driveway

The same method works on any driveway. You need a level and a tape measure:

  1. Start on the street, a few feet before the driveway, on the line the tires follow.
  2. Rest one end of a 2 ft level on the ground, point it down the driveway, and hold it level.
  3. Measure straight down from the free end to the ground. Write it down.
  4. Move the resting end to where the tape touched, and repeat until the driveway levels out, or until a car would be all the way past the top.
  5. In the calculator, open the driveway, choose heights, and enter one point per reading: each point is 2 ft further along than the last, and its height is the previous height minus the drop you measured.

In the flat middle of a driveway, a 4 ft level is fine. Near the top and bottom, use the short one; a long level bridges over the sharp edges that cause scrapes.

the prompt

This is the request that started the rebuild, unedited:

I have a driveway calculator page, and I want you to use that as inspiration for a new page, completely redone from scratch. I used some hand math and the agents available at the time to make it, and I want to remake it with the current state of the art agents, which you are, opus 5.5. so this should be a new post. if you need me to give you any additional information to be able to do a better job, I can take measurements and stuff on the driveway.