Re: Toy program for variable size checkers grid

"K.-Michael Aye" <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
On Jul 29, 2011, at 13:20 , Andreas Pavlogiannis wrote:

> 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?
> 
What's the error? How did you add 'some extra rows'? The obvious extension to 5 elements per element does not work? Like so:
(1,0,1,0,1),
(0,1,0,1,0),
etc. ?

Michael


> 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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.