There isn't a "simple" way, because the rendering area is really a 3-D viewport, not a bitmap.
You could just render a square at a "size" which is one pixel. Should be straightforward math to do this. Actually, this is probably the best way. Set up the dimen with some values, then just create a square with the correct size. Using translate, you can set the position in XY without any real problems. You probably want to be running in single buffer mode so that each time you "bang" the square, it will render into the viewport without clearing the frame buffer.
Let me know if this doesn't make any sense.
Later, Mark
============================ = mdanks@stormfront.com = Lead Programmer PS2 = http://www.danks.org/mark ============================
-----Original Message----- From: Rory Walsh [mailto:rorytheroar@yahoo.com] Sent: Tuesday, July 10, 2001 2:39 PM To: pd-list@iem.kug.ac.at Subject: RE: [PD] Plotting points on screen with gem
Thanks Mark for the suggestion I looked at the example but I still don't see how this can help me. Is there a simple way I can get a yellow dot for example to appear at a given set of XY coordinates on the screen? I'm thinking the simplest way possible will do me?
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
To Mark Danks,
Thank you very much.this makes perfect sense and it works to a point but I'm not sure how to create the single buffer u mentioned , perhaps with a little more time i while. i really want to make a trail of points.
Am I correct in assuming that if i want to plot points
as small as one tenths I simply make a square of side .01. this seems to be the smallest dimension visible.
thanks for ur help Rory
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
On Wed, 11 Jul 2001, Rory Walsh wrote:
To Mark Danks,
sorry, not me
Thank you very much.this makes perfect sense and it works to a point but I'm not sure how to create the single buffer u mentioned , perhaps with a little more time i while. i really want to make a trail of points.
just give the gemwin a "buffer 1" message. you might want to have a look at the "gemPixDataSimple.pd" and gemPixDataComplex" helpfiles in gem/examples/gem_pix
btw: mark/günter:: there is still this dubious problem with casse-sensitivity with all those picture-files "fractal.JPG" instead of "fractal.jpg" "dancer.JPG" instead of "dancer.jpg" ...
Am I correct in assuming that if i want to plot points
as small as one tenths I simply make a square of side .01. this seems to be the smallest dimension visible.
0.01 certainly is one percent, 0.1 is one tenth
a size of "4" (given to geos, for example a "square" object) will completely fill the vertical side gem-window. thus is you create a 600x400 gem-window, a square sized "1" will be 100x100 pixels. then, and only then, a size of 0.01 will be 1 pixel (if your window is 512x512 (default), 1 pixel will equal to a geo-size of 0.0078125)
mfg.cds.sddt IOhannes
thanks for ur help Rory
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
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. 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
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 lines) 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 pix_texture) 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> ... <a_nm>" 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
mfg.cds.tds IOhannes
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
These seem like they could be used for what i want, especially the pix-set object, it says to edit your src/Base/GemSetup.cpp file, so that it contains the lines to call the GemPlus_setup routines (void pix_dump_setu(), ...)I tried opening the GemSetup.cpp file and I added the line void pix_dump_setup();, do I have to compile it then? I don't realy have any knowledge of C/C++ so I'm really chancing my arm! Whne I open one of the sample patches it does not recognize the new GemPlus objects? Can you suggest and ideas or maybe instruct me on how to correctly edit the .cpp file, thanks again for the help!
Regards, Rory.
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
hi rory !
yes you have to recompile gem !
hope i get it all together now: (and i hope you are using linux) i find now, that it is a little complicated...
..extract the GemPlus.tgz ..then copy or move the GemPlus/src/Pixes/pix_* files into your gem/src/Pixes/ directory. ..cd into your gem/src/Base directory ..edit your GemBase.cpp so that it contains both "void pix_set_setup()" and "pix_set_setup()" (+ the ...) lines in the correct places (you'll find them). don't forget to save ..cd into your gem/src/Gnu directory ..type "./configure" (without the " of course) and hit return (or enter) ..if you get any error-messages try to fix them (install needed libraries etc) ..type "make" + [return] ..now you should have a "Gem.pd_linux" file somewhere (in the gem/ directory). make sure that you are loading this one when starting pd ..you should now have your GemPlus objects
hope this will do if not feel free to ask
mfg.cds.sta IOhannes
On Wed, 11 Jul 2001, Rory Walsh wrote:
These seem like they could be used for what i want, especially the pix-set object, it says to edit your src/Base/GemSetup.cpp file, so that it contains the lines to call the GemPlus_setup routines (void pix_dump_setu(), ...)I tried opening the GemSetup.cpp file and I added the line void pix_dump_setup();, do I have to compile it then? I don't realy have any knowledge of C/C++ so I'm really chancing my arm! Whne I open one of the sample patches it does not recognize the new GemPlus objects? Can you suggest and ideas or maybe instruct me on how to correctly edit the .cpp file, thanks again for the help!
Regards, Rory.
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
Thanks thats grat however I am running PD and Gem on Windows! But while I have you on the topic I have just recently compiled Pd on Redhat linux and I am now trying to get Gem to run. I believe that I must compile it as there is no pre-compiled version for Redhat? Is that correct? I'm fairly new to Linux so I hope there is an easy way! Thanks again for the instructions on getting the GemPlus objects to work and hopefully as soon as I get Gem to run on my linux machine I will be able to get these objects to run! Thanks again.
Regards, Rory
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
Thanks Johannes, that worked, hopefully this might sort out my problem, it seems to be quite useful! Thanks Again!
Rory.
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
Rory, I tried for ages with exactly the same problem and gave up, to return later! Maybe a simple extern needs to be written....
nick
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. 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
Was there anything that you tried that came close to a solution, maybe I can take it up where you left off? There's currently two of us here in the studio working on the problem and we're hitting dead ends everyway we turn? Thanks again for the feedback.
Regards, Rory.
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