[PD] Plotting points on screen with gem

Johannes M Zmoelnig zmoelnig at iem.kug.ac.at
Wed Jul 11 14:50:15 CEST 2001

On Wed, 11 Jul 2001, Rory Walsh wrote:

> Thanks for the help! However I am still not getting
> anywhere as all the examples seem to involve
> pre-existing .jpg's, but what i want to do is to
> create an intirely new image from scratch.
this is only an example. the involvation of pre-existing .jpg's 
is only there to make a simple algorithm.
this is what it does:
take a pair of coordinates xy (it is generated at random, but of course
this is just for fun, you can use your own thing, pe scan through the
generate a colour-value for this coordinate (this is why we need the
.jpg's. they are kind of map from xy->colour. in your application this
might be a mapping-function fit for fractals depending on midi-data
excerpts form brainwaves)
now comes the fun:
put a square with the specified colour at the specified position (yes,
this is what you want, put a "pixel" with a colour at a position)

another possibility (SPAM -- advertisement - pfui) might be the pix_set
object. you can find it somehwere at http://umlaeute.mur.at/gem
but then, this only takes long packages of floats (for example 786432 for
a 512x512 image (512x512x3 for the colour) and dumps them into the
pix-buffer. you can then render the pix-buffer onto a square (via
the problem is, that you do not really have the possibility to simply
change a specified pixel at will.
you therefore might use the matrix-objects from zexy found at 
ftp://iem.kug.ac.at/pd/Externals/ZEXY (for examples mtx_element)
a "matrix" is a list "matrix <num_of_rows> <num_of_cols> <a_11> <a_12> ...
since you only need the elements ("<a_11> <a_12> .. <a_nm>") you will have
to skip the leading three atoms of the list.
you can do this via the niagara-object (also part of zexy)
maybe i will add a method for my matrices to the pix_set object sometimes
when i have time

you see, it is not very simple to do that simple things

simply superior


> The thought
> of creating hundreds of tiny square's and positioning
> them to cover the whole screen seems pretty daunting.
> Is there any object that will take XY axis points and
> plot a pixel on the screen accordingly? It seems like
> it should be faily simple but that doesn't seem to be
> the case! Thanks again for the help! 

> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie

More information about the Pd-list mailing list