Rigorous definition of positive orientation of curve in $\mathbb{R}^n$

A curve as a "drawn" subset of ${\mathbb R}^2$ has no a priori orientation.

On the other hand, consider a $C^1$-curve $\gamma$ given by a regular parametrization $$\gamma:\quad [a,b]\to{\mathbb R}^2\ ,\qquad t\mapsto z(t)=\bigl(x(t),y(t)\bigr)\ .\qquad(1)$$ Here $z(b)=z(a)$ is allowed, and regular means that $\dot z(t)\ne(0,0)$ for all $t\in[a,b]$. Such a presented $\gamma$ is by definition oriented according to increasing $t$, which means that for any $t\in[a,b]$ the vector $$\dot z(t)=\bigl(\dot x(t),\dot y(t)\bigr)=\lim_{h\to 0+}{z(t+h)-z(t)\over h}$$ is considered as pointing "forward", or in the positive direction.

Any region $R$ in the plane has a boundary $\partial R$, which a priori is only a certain subset of ${\mathbb R}^2$. In many cases (e.g., if $R$ is the unit disk $D$) this boundary set can be presented as a regular closed curve $\gamma$. This curve is positively oriented with respect to $R$, if $R$ is to the left of $\gamma$ (this is not as Wolfram has it).

In terms of formulas this can be expressed as follows: For any $t\in[a,b]$ the vector $\dot z(t)$ is a tangent vector in the positive direction, and $n(t):=\bigl(-\dot y(t),\dot x(t)\bigr)$ is the vector obtained by turning $\dot z(t)$ anticlockwise by $90^\circ$, or "to the left". So $\gamma$ is positively oriented with respect to $R$ if for all $t\in[a,b]$ and sufficiently small $\epsilon>0$ the point $z(t)+\epsilon\ n(t)$ lies in $R$.

When it turns out that the first obtained presentation $(1)$ of $\partial R$ has the wrong orientation with respect to $R$ (i.e., $R$ lies to the right of $\gamma$) then one can easily reverse $\gamma$ by considering the new presentation $$\hat \gamma:\quad [-b,-a]\to{\mathbb R}^2\ ,\qquad t\mapsto z(t)=\bigl(x(-t),y(-t)\bigr)\ .$$

Only if the curve $\gamma=\partial R$ is positively oriented with respect to $R$ Green's formula $$\int_{\partial R} (P\ dx+Q\ dy)=\int_R(Q_x-P_y)\ {\rm d}(x,y)$$ holds.


You can only give a rigorous definition of orientation for a plane curve. Given such a curve, as a continuous function $\gamma\colon[a,b]\to\mathbb{R}^2$ with $\gamma(a)=\gamma(b)$, you can define the index of this curve with respect to any point $c$ not on the curve as follows: Write $$\gamma(t)-c=\lvert\gamma(t)-c\rvert (\cos\theta(t),\sin\theta(t))$$ where $\theta\colon[a,b]\to\mathbb{R}$ is continuous. Such a function $\theta$ exists, and is unique up to an additive constant multiple of $2\pi$. The index of $\gamma$ with respect to $c$ is $$\operatorname{ind}_c(\gamma)=\frac{\theta(b)-\theta(a)}{2\pi}.$$ The curve is positively oriented if the index is $+1$ for points $c$ inside the curve, and negatively oriented if it is $-1$.