Hello,
I wanted to create a sphere with texture on it. So I tried to make the image wrap around the sphere, but when I run the code, only the rotating sphere shows. Is there something wrong with the code?
def setup():
size(550,700,P3D)
global img
img = loadImage('uranus.jpg')
r = 0;
z = 200;
def draw():
global r
global z
background(0)
stroke('#FFFFFF')
strokeWeight(2)
fill('#FF0000')
translate(width/2, height/2, z)
rotateY(r)
beginShape()
texture(img)
textureWrap(REPEAT)
noFill()
pushMatrix()
translate(0,0)
sphere(100)
lights()
popMatrix()
*emphasized text*