MATLAB: How to find the normal to a hemisphere surface

hemispherenormal

How do i find the normal to a hemisphere surface with radius r = 6, and center point
c = [2,1,3];

Best Answer

Think about what the normal vector means. It points straight out from the hemisphere. What other known point is on the same line? (Hint: What do you know about the center of the sphere? What property does it have?)
That means, from ANY point on the surface of the hemisphere, call it [x,y,z], the normal vector is as simple as:
C = [2 1 3];
normalvec = [x y z] - C;
This vector is normal to the surface, and points outwards. Just negate the vector if you want it to be inward pointing.