phetsims / function-builder

"Function Builder" is an educational simulation in HTML5, by PhET Interactive Simulations at the University of Colorado Boulder.
GNU General Public License v3.0
4 stars 4 forks source link

Greyscale function does not impact Warhol function #126

Closed KatieWoe closed 5 years ago

KatieWoe commented 5 years ago

Test device: Dell Operating System: Win 10 Browser: chrome Problem description: Found during https://github.com/phetsims/QA/issues/309, but unconnected to that release. When the greyscale function is placed before the Warhol function the result is indistinguishable from the Warhol function on its own. If greyscale if first, this does not seem to be a problem. Seen in both full sim and basic sim. Steps to reproduce:

  1. Go to the patterns screen
  2. Enable 3 step function machine
  3. Put the Warhol step at the end
  4. Put through 4 different inputs that can all be seen at once
  5. Add the greyscale function in before the Warhol function
  6. Observe

Screenshots: sameasotherone sameasothertwo

Troubleshooting information (do not edit):

Name: ‪Function Builder‬ URL: https://phet.colorado.edu/sims/html/function-builder/latest/function-builder_en.html Version: 1.0.16 2019-04-04 17:04:18 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 Language: en-US Window: 1536x722 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"7d27130a","branch":"HEAD"},"axon":{"sha":"9a0e2f3a","branch":"HEAD"},"babel":{"sha":"8eff18e3","branch":"master"},"brand":{"sha":"827202bf","branch":"HEAD"},"chipper":{"sha":"08553064","branch":"HEAD"},"dot":{"sha":"3628c3ae","branch":"HEAD"},"function-builder":{"sha":"8a6a6f38","branch":"HEAD"},"joist":{"sha":"25d6bdc6","branch":"HEAD"},"kite":{"sha":"88f0c3a0","branch":"HEAD"},"phet-core":{"sha":"c48bf320","branch":"HEAD"},"phetcommon":{"sha":"c01af6a7","branch":"HEAD"},"phetmarks":{"sha":"3fdfece0","branch":"HEAD"},"scenery":{"sha":"d3153780","branch":"HEAD"},"scenery-phet":{"sha":"0d6b589e","branch":"HEAD"},"sherpa":{"sha":"03590a07","branch":"HEAD"},"sun":{"sha":"cccaf534","branch":"HEAD"},"tandem":{"sha":"a8ac284b","branch":"HEAD"},"twixt":{"sha":"53b31872","branch":"HEAD"}}
amanda-phet commented 5 years ago

That does seem like a bug, but it is not. The warhol function takes an input and assigns it colors, so if the original color was red, green, blue, or gray (from the grayscale function), it assigns it four new colors with four backgrounds. The butterfly does something a little different but I can't remember why.

image

pixelzoom commented 5 years ago

@amanda-phet said:

... The butterfly does something a little different but I can't remember why.

FYI... The steps to 'Warhol' an image are:

  1. Scale the image by 50%.
  2. Convert the image to grayscale.
  3. Use intensity of pixels in the grayscale image to map pixels to colors.
  4. Draw the color-mapped image into 1 of the 4 quadrants.
  5. Repeat steps 3 & 4 for each quadrant, using a different color map.