Toy program for variable size checkers grid
Andreas Pavlogiannis <[email protected]>
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I 'm a new vpython user, trying to get familiar with working with 3D
objects. In particular, I'm trying to understand how I can make an
arbitrary checkers board with N rows and M columns. Unfortunately,
taking the following sample code from
http://www.vpython.org/contents/docs/visual/materials.html
/from visual import *
checkerboard = ( (0,1,0,1),
(1,0,1,0),
(0,1,0,1),
(1,0,1,0) )
tex = materials.texture(data=checkerboard,
mapping="rectangular",
interpolate=False)
box(axis=(0,0,1), color=color.cyan, material=tex)/
and just adding some extra rows, columns, or both to the checkerboard
variable does not work.
Could you please give me some pointers on this?
Thanks,
Andreas
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users