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_
   Discussion
   General Processing Discussion
(Moderators: fry, REAS)
   Thoery of Processing
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Thoery of Processing  (Read 813 times)
meiy

mei_yu89
Thoery of Processing
« on: May 20th, 2004, 6:05am »

Hi  
I am a Processing lover and currently working on a school project - a proceeding paper to introduce Processing.
I have some question for you, if anyone have time to answer them, that will be a great help:
Why Processing?
What are the technical factors (Beside build in functions) in detail that separated Processing from commercial packages like Macromedia's Director and Flash?  
What are the technical limitations for using Macromedia products? And how Processing over come those limitations? Any examples?
Can the works created in Processing be created using Macromedia tools?
Thanks and happy Processing!
 
flight404

WWW Email
Re: Thoery of Processing
« Reply #1 on: May 20th, 2004, 7:20am »

Here is a good place to start for some of the Processing vs Flash/Director info...
 
http://processing.org/discourse/yabb/board_CourseBlueprints_act_ion_display_num_1063988900.html
 
meiy

mei_yu89
Re: Thoery of Processing
« Reply #2 on: May 20th, 2004, 4:45pm »

Thanks so much flight404 for the quick respond! That's exactly that I need!
By the way I am using your site www.flight404 for a example of recompile Processing, and contributed to the new version.
Thanks Again!
Mei
 
meiy

mei_yu89
Re: Thoery of Processing
« Reply #3 on: May 21st, 2004, 7:50pm »

could anyone give me a example of code to show how processing is faster in calculation then Lingo?
Or any examples of Processing is over come the limitations from Flash or Director?
Thanks!
 
arielm

WWW
Re: Thoery of Processing
« Reply #4 on: May 22nd, 2004, 11:17pm »

first, some context:
http://processing.org/discourse/yabb/board_Programs_action_disp_lay_num_1076460293.html
 
- using a precalculated mesh: director can do real time 3d very quickly, it can also move dozen of huge bitmap sprites on screen without any delay.
 
- flash can display predefined vector shapes with amazing speed, it is also not bad with real time bitmap display (scaling, rotating...), all this with antialising
 
doing the same kind of stuff with processing (i.e. standard java, without using "hardware acceleration) would definitely be slower.
 
now to the other side of the coin:
 
- you want to draw a real-time generated object with director, e.g. a mesh made of 5000 vertices that get re-arranged at each frame: you need to use lingo for that, at this point: your custom (interpreted) lingo loop is something hundread times slower than (compiled) java...
 
- the same kind of scenario with flash: flight404 wants to move 5000 meandering dots in real time, but actionscript is so slow that he has to limit the number to something like 100... using java: it's not a big issue to execute hundread-of-thousand lines of code in only a few milliseconds, flight404 can tell you more about that now that he works also with processing
 
other examples of things it's possible to do in real-time with java, but no way with director:
- manipulating the pixels of a 320x240 / 25fps video.
- a cellular automata with 400x400 cells, simulating sand, fluids or gas.
 
things that you still can't achieve with flash (flash doesn't give access to pixels at all, so the comparison can only be in other fields):
- 1000 banking rectangles moving constantly, each one on generated-on-the fly bezier curves.
- a drawing pad which does complex form recognition (i.e. character recognition) in real-time...
 
the bottom line, to me, is that since lingo and actionscript are so slow, and since director and (especially) flash don't give access to all the machine ressources (e.g. pixels), they are heavily limiting their users, literally closing them into THE macromedia metaphor...
 
processing is a great platform to overcome these artificial limits and start to explore new directions with great freedom.
 
then, when even more strength is required, it's definitely possible to switch to a combination of pure java & opengl for both fast processing & rendering power (unfortunately loosing the cross platform + viewable online advantage, for now...)
 

Ariel Malka | www.chronotext.org
meiy

mei_yu89
Re: Thoery of Processing
« Reply #5 on: May 23rd, 2004, 4:26am »

thank you so much Ariel for the respond, I am really appreciated. I am not a programmer, I will ask some stupid questions, so don’t laugh. You state:
----------------------------------------------------
using a precalculated mesh: director can do real time 3d very quickly, it can also move dozen of huge bitmap sprites on screen without any delay.
flash can display predefined vector shapes with amazing speed, it is also not bad with real time bitmap display (scaling, rotating...), all this with antialising  
doing the same kind of stuff with processing (i.e. standard java, without using "hardware acceleration) would definitely be slower.
------------------------------------------------
In above predefined situation, why Processing (and Java I suppose) is slower than Macromedia?  
Is predefine/precalculate mean not real time?  
 
Mei
 
arielm

WWW
Re: Thoery of Processing
« Reply #6 on: May 23rd, 2004, 11:09am »

a propos "precalculation":
 
you build a very complex mesh in 3d studio max and import it into director: if you want to display it as it is (the only lingo part would be to change the camera properties at every frame), it will be very fast because director uses direct-x or opengl to do so (hardware acceleration), i.e. your nvidia geforce or ati radeon card is doing the hard work...
 
now, processing (where everything is done with java) is not using hardware acceleration by default, rather: it has what's called a "software renderer", made in java, which is much slower.
 
make sense?
 

Ariel Malka | www.chronotext.org
meiy

mei_yu89
Re: Thoery of Processing
« Reply #7 on: May 23rd, 2004, 6:32pm »

OK Ariel, thank you so much!
But why when "mesh made of 5000 vertices that get re-arranged at each frame" Java can do better than it can do with 100 vertices?  
Thanks
Mei
 
arielm

WWW
Re: Thoery of Processing
« Reply #8 on: May 23rd, 2004, 10:18pm »

cough, er, hmm, well...
 
consider the following pseudo-code:
 
Code:
loop 5000 times
{
 add a vertex to the mesh using a complex math formula
}

since lingo is an interpreted language, it will take it at least 100 more time to execute this kind of job than java, which is a compiled language.
 
conclusion:
 
- the time it takes director to build the mesh at each frame is very long, but the time it takes to display it is very short
 
- for java, just invert the previous sentence.
 
so for instance, if you have a mesh made out of 5000 vertices, you will probably achieve a framerate which is very low (only a few frames per second...) with director.
 
on the other hand, generating that mesh would be very fast with java but without hardware acceleration (used for displaying), it could be hard to achieve an decent framerate but still feasible.
 
uh, i guess real-time 3d was not the best example to illustrate the difference between director and processing!
 

Ariel Malka | www.chronotext.org
meiy

mei_yu89
Re: Thoery of Processing
« Reply #9 on: May 24th, 2004, 4:07am »

Thanks again Ariel for answering my questions, sorry to been such pain.
If the 3d mesh is not a good example, could you give me a good example?
 
 
arielm

WWW
Re: Thoery of Processing
« Reply #10 on: May 24th, 2004, 10:21am »

it's not that it's not a good example, just that it's not the best one...
 
on the other hand, it shows that there is no clear winner on this particular plan (real-time 3d), and that afterall, it's not a competition (macromedia vs java/mit/open-source/etc...)
 
processing is offering a framework (programming environment + community) for people that would like to experience that old/new paradigm (i.e. it existed before, but it was not easilly reachable) of science/technology meeting art/design.
 
it can also be considered as a temporary shelter/incubator on the way to more complex platforms (like pure java & opengl or c/c++...)
 
back to the essence of your question: one thing that processing is surely better at is calculating, in other words: everything that involves a lot of calculations in real-time is probably not going to work with director/flash (preventing macromedia users to start exploring different directions...)
 
you can try to find additional information about these 2 concepts:
- interpreted programming languages
- compiled programming languages
 
they're a key to understand one of the main differences between the 2 worlds.
 

Ariel Malka | www.chronotext.org
meiy

mei_yu89
Re: Thoery of Processing
« Reply #11 on: May 25th, 2004, 3:15am »

Thanks so much Ariel for all the postings, very helpful information!
Mei
 
Pages: 1 

« Previous topic | Next topic »