I am using the method here to draw a sphere, if VertexNormals is set, there will be a little shadow on the top of the ball. I'm not familiar with VertexNormals' calculations. Can we repair this defect?
vertNormals[vl_ /; ArrayQ[vl, 3, NumericQ]] :=
Block[{mdu, mdv, msh},
msh = ArrayPad[#, {{1, 1}, {1, 1}}, "Extrapolated", InterpolationOrder -> 2] & /@ Transpose[vl, {2, 3, 1}];
mdu = (ListCorrelate[{{1, 0, -1}}/2, #, {{-2, 1}, {2, -1}}, 0] & ) /@ msh;
mdv = (ListCorrelate[{{-1}, {0}, {1}}/2, #, {{1, -2}, {-1, 2}}, 0] & ) /@ msh;
MapThread[Normalize @* Cross, Transpose[{mdu, mdv}, {1, 4, 2, 3}], 2]
];
MakePolygons[vl_/;ArrayQ[vl,3,NumericQ],OptionsPattern[{"Normals"->True}]]:=
Module[{dims=Most[Dimensions[vl]]},
GraphicsComplex[Apply[Join,vl],
Polygon[Flatten[Apply[Join[Reverse[#],#2]&,
Partition[Partition[Range[Times@@dims],Last[dims]],{2,2},{1,1}],{2}],1]],
If[TrueQ[OptionValue["Normals"]/.Automatic->True],
VertexNormals->Apply[Join,vertNormals[vl]],Unevaluated[]]]
];
list = Table[{Sin[θ]Cos[φ], Sin[θ]Sin[φ], Cos[θ]}, {θ, 0., Pi, Pi/50}, {φ, 0., 2Pi, 2Pi/50}];
Graphics3D[{EdgeForm[], MakePolygons[list, "Normals" -> True]}]
Related Links:
Polygon mesh: Compute vertex normals for smooth shading
https://resources.wolframcloud.com/FunctionRepository/resources/PointArrayToPolygons/
