[PD] grid math?

Maurizio Umberto Puxeddu mauriziopuxeddu at yahoo.it
Sat Apr 19 17:03:24 CEST 2003


row = int(n / w)

you may have to use +1 and -1 depending on how you numbered the things
(columns, row, items).

Maurizio Umberto Puxeddu.

On Sat, 2003-04-19 at 16:50, Andre Schmidt wrote:
> ok,
> 
> got the X coordinate with this:
> 
> [- 1]
>  |
> [mod 7]
>  |
> [+ 1]
> 
> but i can't figure out how to get the Y...hmm...
> 
> -andre
> 
> On Saturday 19 April 2003 15:47, Andre Schmidt wrote:
> > On Saturday 19 April 2003 15:26, you wrote:
> > > int, / and mod (%) ?
> >
> > sorry, i'm not so good in math. i can't figure it out :(
> > patch ? ;)
> >
> > thnx
> > -andre
> >
> > > Or do I have completely misunderstood what you say?
> > >
> > > Maurizio Umberto Puxeddu?
> > >
> > > On Sat, 2003-04-19 at 15:24, Andre Schmidt wrote:
> > > > hi,
> > > >
> > > > i'm trying to do a histogram visualisation of lotto numbers...
> > > > we got 49 numbers, so i get a 7x7 grid using blinkenlights...
> > > >
> > > > but
> > > >
> > > > how do i "easily" calculate in PD a X/Y postition of a number...
> > > > like number 27 has position x6 y4 in the 7x7 grid...
> > > >
> > > > cheers
> > > > -andre
> > > >
> > > > _______________________________________________
> > > > PD-list mailing list
> > > > PD-list at iem.kug.ac.at
> > > > http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
> >
> > _______________________________________________
> > PD-list mailing list
> > PD-list at iem.kug.ac.at
> > http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
> 
> 
> _______________________________________________
> PD-list mailing list
> PD-list at iem.kug.ac.at
> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list






More information about the Pd-list mailing list