I am having a terrible time understanding the lightposition variable for surface plots. The only documentation I have found is, uh, terse. https://plotly.com/julia/reference/surface/
(I happen today to be using Julia for which the machine-generated API is a hindrance but my question is language-independent and in particular is echoed at least in Python.)
I believe that the coordinates requested are to be interpreted as fixed to my screen, with y pointing to the top, x to the right, and z either into the screen or out of the screen–z seems to be connected to a left-handed coordinate system so -z points out of the screen.
Is this correct so far? If so, then why does the lighting depend on the values of the data coordinates?
Also, then why do my surfaces sometimes but not always get lit as though the light rotates with the plot when I manually rotate the plot?
What is the significance of the magnitude of each component? Is it literally a distance in the screen coordinate system? If so, what are the units? Does magnitude affect the brightness of the light? Or is this supposed to be a normalized vector where only the direction matters?
There is an indication that the x, y, z, components can be specified as a vector (Julia) as being each a vertex. What is a vertex? Is this a way of specifying multiple light sources? In any case, Julia does not allow a vector argument for these parameters.
All I need is a sensible explanation of lightposition that agrees with actual performance but I can’t find one on the plotly site.
There are tickets from 2018 such as #2477 https://github.com/plotly/plotly.js/issues/2477 related to this problem but please tell me that I have not invested tons of time learning an unmaintained library.