Write a program that draws the image shown in Figure 3G.39 onto a DrawingPanel of size 650

Question:

Write a program that draws the image shown in Figure 3G.39 onto a DrawingPanel of size 650 × 400. The image represents a famous optical illusion called the “Cafe Wall,” in which a series of straight squares appears to be slanted.

Drawing Panel 区

The image has a gray background and many rows of black and white squares with a blue X drawn through each black square. The two freestanding rows in the diagram have the following properties:

Table 3G.8 Cafe Wall Row Properties

The diagram has four grids of rows of squares, with 2 pixels of vertical space between adjacent rows. A key aspect of the optical illusion is that every other row is shifted horizontally by a particular offset. The four grids have the following properties:

Table 3G.9 Cafe Wall Grid Properties

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: