From: Kadir H. <kha...@ya...> - 2010-06-29 14:34:41
|
.. and also mapping = "sign" is available. ________________________________ From: Kadir Haldenbilen <kha...@ya...> To: Khaerul Adzany <kha...@gm...>; vis...@li... Sent: Tue, June 29, 2010 5:15:14 PM Subject: Re: [Visualpython-users] materials.texture(mapping?) Khaerul, mapping is either "rectangular", or "spherical". Please see section below: http://vpython.org/contents/docs/visual/materials.html Kadir ________________________________ From: Khaerul Adzany <kha...@gm...> To: vis...@li... Sent: Tue, June 29, 2010 1:36:26 PM Subject: [Visualpython-users] materials.texture(mapping?) 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 ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first-- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |