FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Responsive Form, Games
(Moderator: REAS)
   feedback texture
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: feedback texture  (Read 2099 times)
vent

WWW
feedback texture
« on: Apr 20th, 2003, 11:55pm »

Being a lingo (director) person, I wanted to use processing's faster setPixel function. This is what I came up with.  
 
If anyone has optimization suggestions, please post them.
 
thanks.
 
http://www.shapevent.com/proc/
« Last Edit: Apr 20th, 2003, 11:56pm by vent »  

http://www.shapevent.com/
Martin

122417302122417302martingomez_listsmg1ph WWW Email
Re: feedback texture
« Reply #1 on: Apr 22nd, 2003, 8:39am »

hello. very nice. did you have a director version of this before? if yes, how easy was it for you to shift from lingo to processing?
 
REAS


WWW
Re: feedback texture
« Reply #2 on: Apr 22nd, 2003, 2:56pm »

thank you for posting this example. actually getPixel() and setPixel() are slow. if you are looking for speed, it's beter to access the pixels[] buffer directly. the call setPixel(x, y, color) is the same as pixels[y*width+x] = color. there was an extended discussion about this on the board during the fall:
 
http://proce55ing.net/discourse/yabb/board_Syntax_action_displa_y_num_1041923079.html
 
and
 
http://proce55ing.net/discourse/yabb/board_Syntax_action_displa_y_num_1037826044.html
 
vent

WWW
Re: feedback texture
« Reply #3 on: Apr 23rd, 2003, 4:57am »

I had a director file that did something very similar--
but because lingo's setpixel function is so slow I had to draw to a much smaller area. The transition from lingo to processing wasn't a problem for me because I have fiddled with java in the past, I do some work with c and microcontrollers and work as an actionscript programmer. Also, Processing is extremely intuitive and user friendly, which I would think would make the transition from any scripting language rather painless.
 
I'm using the pixels[] buffer in one part of this code but in another I'm using setpixel. After looking at those threads it looks like I should do away with setpixel.
 
I'll post a new version here as soon as I get a chance.
 
Thanks.
« Last Edit: Apr 25th, 2003, 4:12am by vent »  

http://www.shapevent.com/
vent

WWW
Re: feedback texture
« Reply #4 on: Apr 28th, 2003, 5:53am »

Here is the new version.  
 
http://www.shapevent.com/proc/tex
 

http://www.shapevent.com/
pollux

WWW Email
Re: feedback texture
« Reply #5 on: May 1st, 2003, 9:10pm »

beautiful work.
 
i was wondering if when the mouse gets released, the image could transit to the static mode. i mean, when you press the mouse, there's a sensation of transition between states. i think it'll give more rythm to the work if that same sensation could be achieved after mouse release. (i'm not sure of explaining myself well..)
 

pollux | www.frwrd.net
benelek

35160983516098 WWW Email
Re: feedback texture
« Reply #6 on: May 2nd, 2003, 3:26pm »

on May 1st, 2003, 9:10pm, pollux wrote:
(i'm not sure of explaining myself well..)

 
why not make the alternate version to show us what u mean
 
vent

WWW
Re: feedback texture
« Reply #7 on: May 3rd, 2003, 9:23pm »

>i think it'll give more rythm to the work if that same sensation could be achieved after mouse release.
 
Thanks for the suggestion. I think your right -- having a transition when the mouse is released would be a nice feature...  
 
 
 
« Last Edit: May 3rd, 2003, 9:24pm by vent »  

http://www.shapevent.com/
vent

WWW
Re: feedback texture
« Reply #8 on: May 18th, 2003, 11:00am »

By avoiding the color(0,0,0) format when setting the pixel buffer value I was able to speed this up quite a bit. Its still in the same place:
 
http://www.shapevent.com/proc/tex
 

http://www.shapevent.com/
Pages: 1 

« Previous topic | Next topic »