What does Continuous Glucose Curves and the Minimal Model conclude, in numbers, about “Trapezoids and Increments: Numerical Methods and Errors for the Area under a Continuous Glucose Curve”?
Answer: Chapter 1 shows that the area under a curve is a set of conventions: from one set of readings the total area is 13410.0 and the exactly cut incremental area 2710.0, and each mg/dL of baseline moves the area by about eighty.
Scope of the numbers: It is not medical advice, claims no effect of any kind and offers no dietary, fasting or medication plan; any self-experiment must first be discussed with a licensed physician. Its parameters are illustrative; all calculations are generated by its programs.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 13410.0, 2710.0
| window 0-120 min, baseline 92 mg/dL | |
| total AUC | 13410.0 net iAUC 2370.0 positive incr 2370.0 |
| iAUC (GI) | 2710.0 clipped 2730.0 below-baseline 340.0 |
| window 0-180 min, baseline 92 mg/dL | |
| total AUC | 18795.0 net iAUC 2235.0 positive incr 2235.0 |
| iAUC (GI) | 2710.0 clipped 2730.0 below-baseline 475.0 |
| baseline as mean of 3 pre-meal readings | 93.33 |
| baseline iAUC(GI) 0-120 change per +1 mg/dL | |
| 87 | 3125.6 |
| 92 | 2710.0 -83.1 |
| 97 | 2330.2 -76.0 |
Show the full program
# Chapter 1. p12: five areas from one set of readings that dips below
# baseline. Readings (mg/dL) every 15 min from 0 to 180 min are an
# illustrative curve, not anyone's record. Definitions:
# total AUC trapezoid of the raw readings (Tai 1994 = trapezoid)
# net iAUC area above baseline minus area below it
# iAUC (GI) area above baseline only, cutting each segment at the
# exact crossing point (the glycaemic-index convention)
# clipped iAUC readings below baseline set to baseline, then trapezoid
# positive incr net area, but reported as 0 when net < 0
import math
STEP = 15
READ = [92, 131, 158, 143, 114, 96, 84, 79, 86, 90, 91, 89, 92]
PRE = [97, 91, 92] # 餐前 -10、-5、0 分钟三个读数(示意)
def seg_pos(y0, y1, h):
# 一段线性插值在基线之上的面积(y 已减去基线)
if y0 >= 0 and y1 >= 0:
return h * (y0 + y1) / 2.0
if y0 <= 0 and y1 <= 0:
return 0.0
hi = max(y0, y1)
frac = hi / (abs(y0) + abs(y1))
return h * frac * hi / 2.0
def areas(read, base, step, upto):
n = upto // step
ys = [r - base for r in read[:n + 1]]
tot = step * math.fsum([read[0] / 2.0] + read[1:n] + [read[n] / 2.0])
net = step * math.fsum((a + b) / 2.0 for a, b in zip(ys, ys[1:]))
pos = math.fsum(seg_pos(a, b, step) for a, b in zip(ys, ys[1:]))
cl = [max(y, 0) for y in ys]
clip = step * math.fsum((a + b) / 2.0 for a, b in zip(cl, cl[1:]))
return tot, net, pos, clip, max(net, 0.0)
for upto in (120, 180):
t, n, p, c, q = areas(READ, READ[0], STEP, upto)
print("window 0-%d min, baseline %d mg/dL" % (upto, READ[0]))
print(" total AUC %8.1f net iAUC %7.1f positive incr %7.1f"
% (t, n, q))
print(" iAUC (GI) %8.1f clipped %7.1f below-baseline %6.1f"
% (p, c, p - n))
base3 = math.fsum(PRE) / len(PRE)
print("baseline as mean of 3 pre-meal readings: %.2f" % base3)
print("baseline iAUC(GI) 0-120 change per +1 mg/dL")
prev = None
for b in (87, 92, 97):
p = areas(READ, b, STEP, 120)[2]
note = "" if prev is None else "%7.1f" % ((p - prev[1]) /
(b - prev[0]))
print(" %3d %9.1f %s" % (b, p, note))
prev = (b, p)Single source and citation
Fan, Y. (2026). Areas under Continuous Glucose Curves, the Two-Compartment Minimal Model of Insulin Action and the Dynamics of the Switch to Ketone Metabolism (Version 1.0.0), Chapter 1: Trapezoids and Increments: Numerical Methods and Errors for the Area under a Continuous Glucose Curve. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-286 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026286,
author = {Fan, Yafu},
title = {Areas under Continuous Glucose Curves, the Two-Compartment Minimal Model of Insulin Action and the Dynamics of the Switch to Ketone Metabolism},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 2 · Same Meal, Different Curves: Decomposing Individual Variation and the Ceiling on Prediction
- Chapter 3 · The Bergman Minimal Model: the Mathematical Structure of a Remote Compartment of Insulin Action
- Chapter 4 · Sensitivity to Personal Parameters: Which Parameter Moves the Post-Meal Curve
- Chapter 5 · The Switch to Ketone Metabolism: a Gradient, Not a Toggle
- Chapter 6 · The Measurement Chain: Interstitial Lag, MARD and Sensor Bias
- Chapter 7 · Classical Sources East and West: the Suwen on Rich Food and Bernard on Averages
- Chapter 8 · Closing the Loop: A-B-A Logs, Randomised Blocks and Pre-Registration