# Maple code (classic style) to find analytic expression for normal # vectors from parametric surface equation with(linalg); # define the ellipse function p := [ax * cos(u) * cos(v), ay * sin(u) * cos(v), az * sin(v) ]; # find the cross product of the direction derivatives in the u and v directions n := simplify(crossprod(diff(p,u), diff(p,v))); # Now, looking at the above result, divide by the quantity that is # constant to each component (this is important, as there are times # when it might be zero...) n := simplify(evalm(n / cos(v)));