From: Khaerul A. <kha...@gm...> - 2010-06-29 11:34:28
|
Hello my great friends! I've been trying vpython today and my project target is to display a series of image into faces... one image for each face, but now it's not really the problem. My problem is at the: materials.texture(mapping='mode') which I dont have any clue what value to fill in the 'mode' to pass into the mapping argument, is there any decent resources/reference for vpython that I can use? Because after awhile searching the original website I can't find any "API reference" or something like that. In case you people want to see my code, here it is: from visual import * #using P.I.L (Python Imaging Library) import Image #create frame object f = frame() #create a red face model = faces(frame = f) model.append(pos = (-3,0,-3)) model.append(pos = (-3,0,3)) model.append(pos = (3,0,3)) model.append(pos = (-3,0,-3)) model.append(pos = (3,0,-3)) model.append(pos = (3,0,3)) model.make_normals() model.make_twosided() #get material from file name = 'wgauss' width = 1840 height = 321 im = Image.open('w-gauss_of_v1.1_0.50_04.png') materials.saveTGA(name, im) data = materials.loadTGA(name) #set model's material model.material = materials.texture(data=im, mapping='sign') -- Thanks in advance for any (helpful) reply |