$\newcommand{\Reals}{\mathbf{R}}\newcommand{\dd}{\partial}\newcommand{\Cpx}{\mathbf{C}}\newcommand{\Basis}{\mathbf{e}}\newcommand{\Brak}[1]{\left\langle #1\right\rangle}\newcommand{\Vec}[1]{\mathbf{#1}}$If $\Vec{x}$ denotes a point of the unit sphere in the hyperplane orthogonal to $d$, the cone with vertex at the origin, having aperture $2\theta$ and opening along the ray spanned by $d$, can be parametrized by
$$
X(t, \Vec{x}) = t \frac{d}{\|d\|} + t\tan\theta\, \Vec{x}.
\tag{1}
$$
One way to turn this into a useful specification is to fix:
A parametrization $(f_{1}, \dots, f_{n-1})$ of the unit sphere in $\Reals^{n-1}$. (Stereographic coordinates cover the whole sphere with two conformal charts; generalized spherical coordinates might be preferable.)
An orthonormal basis $(\Basis_{j})_{j=1}^{n-1}$ for the hyperplane orthogonal to $d$.
Then write
$$
\Vec{x} = f_{1} \Basis_{1} + \cdots + f_{n-1} \Basis_{n-1}
$$
in equation (1).