phetsims / hookes-law

"Hooke's Law" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

Slight points at the top an bottom of spring when thickest #20

Closed ariel-phet closed 9 years ago

ariel-phet commented 9 years ago

If you look carefully at the spring when set to the highest spring constant on the intro screen there are some sharp points at the top and bottom.

To my eye it looks as though these are occurring because of the way the front and back are overlapping (or perhaps the way the gradient is applied?). Not a huge deal, and not sure if much can be done about this issue but seems worth a bit of tweaking/investigating to see if it could be improved/minimized

capture

pixelzoom commented 9 years ago

Most certainly due to lineCap:'square', with is desirable for the horizontal ends of the spring. Investigate separate paths for the ends, and use lineCap:'round' for the coil.

pixelzoom commented 9 years ago

Set lineCap:'round'. Using separate paths for the horizontal ends was too much work, and made it difficult to get the gradient fill correct. Screenshot from "Experimental" screen below.

screenshot_573

Closing.

pixelzoom commented 9 years ago

Guess I should get @ariel-phet's approval of this before closing. Look OK? Note that the extreme left and right ends are now rounded, instead of squared off.

ariel-phet commented 9 years ago

@pixelzoom - looking good. One tweak...could you layer the left hand side of the spring under the "wall" (so it looks like it is going into the wall)

pixelzoom commented 9 years ago

Left-hand side of springs moved under the "walls" in all screens. Closing.

pixelzoom commented 9 years ago

For example:

screenshot_576

ariel-phet commented 9 years ago

Looks great Closing