reset password
Author Message
wcwir
Posts: 75
Posted 20:59 Nov 18, 2018 |

Hey,

Yesterday in class some of you saw this:

 

and wondered if it was an optical illusion -- after all, the code does not change the line thickness or the width of the space between the lines.

It is not an illusion though, and Alejandro was likely right that this has to do with "jaggies" (that's Dr. Amini's diagnosis). We won't get to interpolation in this class, but if you go on to CS 4550 you will, and also to the related concept of anti-aliasing.

I found more strange behavior with this otherwise pretty boring spiral (spiral(Turkey, 1, 90, 400)). The rendering varies according to how you access Trinket (probably different browser views have different CSS styling), and with how fast the turtle moves! Dr. Amini may have more answers on why that is.

I mentioned Moire effect yesterday, and I managed to get those to happen with the spiral code. Here is an example -- the parts marked in red pen are where you can see Moire effect:

We got a lot out out of few simple lines of code!

-- Weronika