I am seeking a formalism to define the average height of the rational points on a curve. This is straightforward if the number of points is finite, but (to me) not straightforward when the rational points are dense along the curve. I will stick to $\mathbb{R}^2$ but all generalizes to $\mathbb{R}^d$.

The *height* of rational number $x=a/b$ in lowest
terms is $h(x)= \max \{ |a|,|b| \}$.
A point $p \in \mathbb{R}^2$ is
rational
if both coordinates are rational, and the height $h(p)$
is the maximum height of its coordinates.

*Example*.
$$
\left(
x-\tfrac{1}{2}\right)^2+\left(
2
y-\sqrt{2}+1\right)^2=3
$$
has (I believe) exactly two rational points,
$$
(-\tfrac{1}{2},-\tfrac{1}{2}) \;,\; (\tfrac{3}{2},-\tfrac{1}{2})
$$
of heights $2$ and $3$, and so average rational height $2\frac{1}{2}$.

The challenge is to define average height for curves that are dense in rational points, for example, $x^2 + y^2 = 1$. One crude & clumsy attempt follows.

For $p \in \mathbb{R}^2$, define $r(p)$ as $$ r(p)= \begin{cases} 1 &\text{if $p$ is a rational point},\\ 0 &\text{if $p$ is not a rational point}. \end{cases} $$ and define $H(p)$ to be the same as $h(p)$ but extended to all points of $\mathbb{R}^2$: $$ H(p)= \begin{cases} h(p) &\text{if $p$ is a rational point},\\ 0 &\text{if $p$ is not a rational point}. \end{cases} $$

The average height of the rationals on a curve $C$ should be something like $$ \frac { \int_C H(p) \, r(p) \, ds } { \int_C r(p) \, ds } $$ but the denominator is zero. (Credit but no blame to GlenO in an MSE posting.)

. Is there a natural and well-defined notion of the average height of an infinite set of rational points on a curve? Or is it impossible to make sense of this concept?Q