livecodelab
livecodelab copied to clipboard
question: "angleColor" of lines and rectangles behaves exactly like the angleColor of surfaces of a solid, but maybe it shouldn't...
...when a box has the "angleColor fill", the top surface pointing "up" has a different color than the bottom surface pointing down.
So, in other words, any face can have a different colour when pointing up or pointing down. This makes sense, because the angleColor, like a "normal map", has the same effect of having primary color lights on the three axes. So, it would make some optical sense. These examples of normal maps show how they do optically make sense: https://www.google.co.uk/search?client=safari&rls=en&q=normal+map&oe=UTF-8&redir_esc=&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&authuser=0&ei=QcK2UKPLKIid0QWrs4DACA&biw=1325&bih=749&sei=Q8K2ULrlBZSZ0QXjn4DoDw
BUT the problem is how this basic colouring based on normals affects lines and rectangles as well, which are not solids. So, a rectangle or a line can have two different colors depending on whether they point up or down, even though there is no visible difference between the two orientations, since a line pointing up has the same shape and profile and form and it occupies the same space as a line pointing up (and the same for a rectangle). So why would the lighting be different?
On one side, it would make more sense to avoid the distinction, as it's quite difficult to understand why a vertical line for example, or a rectangle facing the user, sometimes is one color and sometimes is another even though their shape and orientation appears to be identical. If many lines made a ring in the shape of an O facing the user, the right and the left halves would have different colors (and the same for top and bottom). None of these cases would make any optical sense in terms of lights. Light doesn't distinguish between rectangles or lines pointing down or pointing up.
On the other side, it's more mathematically elegant to say that lines and rectangles do have an orientation, and it gives the user some information to see that reflected in the normal color.
I'm leaning towards abolishing the difference in orientation, as it doesn't make much optical sense and would be more confusing than helpful.
probably the solution is here: https://github.com/mrdoob/three.js/issues/2285
Here is an example of the "orientation of the line" being useful, as it shows that/where the "opposite" surfaces of the moebius strip connect:
turns = 1 // 1 = Möbius strip
detail = 200 // try up to 400 or so
speed = 0.5
background black
rotate time /5000
scale 0.6
for i in [0...detail]
rotate 0,0,2*Math.PI/(detail)
move 2,0,0
rotate turns*i*Math.PI/(detail)+time/(1000/speed),0,0
line 1.04+1/detail
