We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › My first sketch
Pages: 1 2 
My first sketch (Read 2494 times)
My first sketch
Dec 30th, 2008, 5:58pm
 
Hello world!

Here it is after 3 month I got the blue book and reading every day the famous processing blog sites and using this forum I manage to get my hello world sketch, check it out here:

http://homepage.ntlworld.com/ricardo.sanchez/processing/applet/

Hope you like it! and if you have any comments on the code PLEASE post it here, as the next step on this is making the orbs behave in 3 stages birth, survive and death.

I am very new to this language, they way it renders and how you have to build the stuff. Must keep the practice going.

One thing I want to say is this HELP me A LOT on my Actionscript code, specially the OOP side of programing, so for that thanks to Casey and Ben.

rS
Re: My first sketch
Reply #1 - Jan 1st, 2009, 9:33am
 
this is really peacefull and cool.  I'm looking through the opengl stuff now to see what i can learn from you...

thanks

nik
Re: My first sketch
Reply #2 - Jan 2nd, 2009, 6:07pm
 
nice... i like the circles off the edges... that soft halo is nice.
Re: My first sketch
Reply #3 - Jan 2nd, 2009, 6:26pm
 
Very nice, simple but pretty.
Just a suggestion, even thought it's better to give every orb an image reference in case you want to let each have a different one latter on, it's faster to take the img and make it a global variable, only having to load it once. Calling loadImage 500 is a bit costly Smiley
Re: My first sketch
Reply #4 - Jan 2nd, 2009, 9:31pm
 
Hey, thanks for the comments very cool!

Blahblab, the opengl stuff i got it from this post:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1226360818;start=4#4

as far as I can tell the code I use is only for the GLOW effect, and I think it also helps on the speed, but I just copy and paste so I cant tell any more on the subject. One thing is first I use color mode RGB then change it to HSB and got much better results, maybe is the same thing...

Kiza, thanks to point that out I will fix it on the weekend! and post here the new link, maybe I will try to draw the orb in processing, but not sure how I can get the blur inside the out border halo.

Also do you know if is possible to use the noise(x, y) to update the possition of the objects, or the way I did it is the best approach?

ej:
x = noise(n1);
y = noise(n2);


Cheers!
rS
Re: My first sketch
Reply #5 - Jan 3rd, 2009, 1:35am
 
Hi Kiza, it just renders the hole thing much faster! and it was easy to change, got to love OOP!

But I change it a bit instead of bringing all the orbs instanty, now they appear every 300 milliseconds, check the update on this post, where I got help with the millisecond interval stuff:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1230932393;start=0

or direct link here:

http://homepage.ntlworld.com/ricardo.sanchez/processing/glowingorbs_v2/

Cheers
rS
Re: My first sketch
Reply #6 - Jan 3rd, 2009, 3:00am
 
really nice, and as said above, the simplicity of the code is part of what makes it cool.

it reminds me that beautiful does not necessarily mean complex.
Re: My first sketch
Reply #7 - Jan 3rd, 2009, 8:09pm
 
Glad to hear it's faster. I do prefer the style of the previous one thought..
Re: My first sketch
Reply #8 - Jan 5th, 2009, 5:24pm
 
Both versions are very pretty to behold. You have inspired me Smiley

Also, i didn't recognize the lerp function and looked in up in the reference. Glad to have learned a new math function-- so simple, and useful-- this simple interpolation function saves a few lines of code and keeps things clean.

Funny, Perl has been my most-used language over the years.. not sure if there was a lerp in perl tho. get it?

"l-e-r-p" in
"P-e-r-l"

hahaha. ahem.
Re: My first sketch
Reply #9 - Jan 7th, 2009, 5:22pm
 
Hi,

Thanks for the comments, one thing about that function is that the objects are too concentrated in the center of the window, I want them to wonder around and fill the area, any ideas why is this behavior? anyone?

Cheers
rS
Re: My first sketch
Reply #10 - Jan 7th, 2009, 6:03pm
 
Now _that_ is funny. One person's bug is another person's feature Smiley  I was wondering how you got the orbs to swarm around the middle and thought that was a nice touch and intentional Smiley  haha

Re: My first sketch
Reply #11 - Jan 9th, 2009, 2:22am
 
I was about to say the clustering of them in the middle is really nice looking, the glow is complex from all the independent motions.
Re: My first sketch
Reply #12 - Jan 12th, 2009, 6:09pm
 
Mmmmmmmmmmmmmm Yeah! it was intentional

Of course Wink
Re: My first sketch
Reply #13 - Jan 15th, 2009, 8:03pm
 
Any chance of getting the glowing orb .png?  I would like to run this on my machine to play with and learn from.

Cool stuff btw,

-ricardo
Re: My first sketch
Reply #14 - Jan 16th, 2009, 9:15am
 
@ Ricardo, I just send you a private message with the location, let me know if you get them.

Also you can use any .png you want

One thing to mention on that code is that this:

float nx = lerp(0, width, noise(xnoise));
float ny = lerp(0, height, noise(ynoise));

can be replace with this:

float nx = noise(xnoise) * width;
float ny = noise(ynoise) * height;

If that makes sence

Cheers
rS
Pages: 1 2