Given a 3d normal vector I want to find the normal vector with the maximum y value.
I'm currently thinking about this as a disk with radius 1, where I need to find the maximum point on the disk (assuming the disk isn't flat) but I can't come up with a clean way to find this vector.
I think I could use the Simplex algorithm to find the point but this seems overkill / more complicated then it needs to be.
Thanks in advance for any help :)
Let $n$ be the vector that is normal to the plane of the disc, then in spherical coordinates
$ n = ( \sin \theta \cos \phi, \sin \theta \sin \phi, \cos \theta ) $
Two vectors that span the rim of the disc are
$ u_1 = ( \cos \theta \cos \phi, \cos \theta \sin \phi, -\sin \theta )$
and
$u_2 = ( - \sin \phi, \cos \phi , 0 ) $
So that now any point of the rim can be expressed as
$ P = \cos \psi \ u_1 + \sin \psi \ u_2 $
The maximum $z$ of $P$ occurs when $\psi = \pi $, and therefore the vector you're looking for is just $(- u_1) $
$N = - u_1 = (- \cos \theta \cos \phi, - \cos \theta \sin \phi, \sin \theta ) $