1

I am using JES and am wondering what built in function I should use to make this effect work.

newG=(oldG+(abs(x*y*2.57901)%64))%256

So far I have this code

def forLoop():
  picture = makeEmptyPicture(300,200)
  show(picture)

  for p in getPixels(picture):
    setColor(p,black)

 repaint(picture)

  for p in getPixels(picture):
   oldG=(p)
   newG=(oldG+(abs(x*y*2.57901)%64))%256 
 repaint(picture)

The error I get is

The error was:x Name not found globally.

A local or global name could not be found. You need to define the function or variable before you try to use it in any way.

1 Answers1

0

you'll need to define the local names for x and y to be able to get the newG color, hope this helps


coding is something like this:

x= getX(p)
y= getY(p)
Master_Cdawgg
  • 15
  • 1
  • 6