At 3/23/08 02:38 PM, Paranoia wrote:At 3/23/08 02:31 PM, crushy wrote: Coding Help :)return(20 - Math.floor(Math.random() * 41));
Heh, that's two things you've helped me with this week, Thanks :D
HO HO HOPE you become a Newgrounds Supporter this year!
We're working hard to give you the best site possible, but we have bills to pay and community support is vital to keep things going and growing. Thank you for considering!
At 3/23/08 02:38 PM, Paranoia wrote:At 3/23/08 02:31 PM, crushy wrote: Coding Help :)return(20 - Math.floor(Math.random() * 41));
Heh, that's two things you've helped me with this week, Thanks :D
At 3/23/08 02:46 PM, UnknownFury wrote:At 3/23/08 02:38 PM, Paranoia wrote:What does Math.floor do?
Rounds numbers to the nearest significant figure.
I think this is Glaiel at the piano...amirite?
At 3/23/08 02:49 PM, crushy wrote:At 3/23/08 02:46 PM, UnknownFury wrote:Rounds numbers to the nearest significant figure.At 3/23/08 02:38 PM, Paranoia wrote:What does Math.floor do?
oh okay.
1.49029052 will be rounded to 1?
241242 will be rouned to 200000?
Sweet ^^
At 3/23/08 03:15 PM, DarkMana wrote: Math.ceil() rounds up to the nearest integer.
Math.floor(1.01) == 2
*Math.ceil(1.01) == 2
there you go :)
.
At 3/23/08 02:49 PM, crushy wrote:At 3/23/08 02:46 PM, UnknownFury wrote:Rounds numbers to the nearest significant figure.At 3/23/08 02:38 PM, Paranoia wrote:What does Math.floor do?
Whoops, sorry got my maths lingo mixed up, it just rounds the decimal places to whole numbers.
At 3/23/08 03:04 PM, UnknownFury wrote:At 3/23/08 02:49 PM, crushy wrote:oh okay.At 3/23/08 02:46 PM, UnknownFury wrote:Rounds numbers to the nearest significant figure.At 3/23/08 02:38 PM, Paranoia wrote:What does Math.floor do?
1.49029052 will be rounded to 1?
241242 will be rouned to 200000?
Actually, it rounds down to the nearest integer:
Math.round(); // rounds to whatever the nearest integer is
Math.floor(); // rounds down (i.e. always returns a lower or equal value)
Math.ceil(); // rounds up (i.e. always returns a higher or equal value)
When you're working with probabilities you should pretty much always use floor and ceil instead of round, otherwise you'll end up with an imbalance. For example, with:
Math.round(Math.random() * 3);
To return 0, a number needs to be less than 0.5, to return 3 it needs to be greater than or equal to 2.5, but for any other numbers it can be .5 above or below:
Math.round(Math.random() * 3);
Chance of returning 0 - 1/6
Chance of returning 1 - 1/3
Chance of returning 2 - 1/3
Chance of returning 3 - 1/6
By using floor and ceil you can ensure equal probabilities all round :)
At 3/23/08 03:24 PM, DarkMana wrote: ... you can't just decide which figures are significant, it's all about the mathematical operation and other number(s) involved.
Ahem, a significant figure is the first non-zero number when reading from the left:
1 - one significant figure
0.23423 - five significant figures
0.000021 - two significant figures
1200000 - two significant figures
Or if you want to look at it as Flash probably sees it:
1E0 - one significant figure
2.3423E-1 - five significant figures
2.1E-5 - two significant figures
1.2E5 - two significant figures
Thanks paranoia. *Goes through current script and changes all the rounds*
Also, Imagine I have an dynamic textbox contained within a movieclip. How comes when the movieclips alpha is 0 the textbox is still visible? If I change it in the properties panel the text box disappears with the mc but if I change it via actionscript it doesn't. Is it because I'm setting a value to the text box so it assumes it has to stay visible? Ways around this?
OK while the programmers talk about their programming stuff.. i have an art quesrtiton..
I recently went on work experiance and used photoshop a hell of a lot more then i did at home.. and the dude taught me how to use the fountain pen tool.. does anybody else use this?
.
Sorry for a bit of irrelevance..
But I keep seeing this thread now and thinkin bloody hell the Artist showcase is getting popular again. Im not used to this thread having all these pages.
At 3/23/08 03:31 PM, DarkMana wrote:At 3/23/08 03:28 PM, Paranoia wrote: Ahem, a significant figure is the first non-zero number when reading from the left:Damn my tenth grade math teacher.
I knew that :D
Whats the equivalent of tenth grade in england? 'cause I swear I learnt that years ago o.O
I learnt that last year.. im in year 10 now :)
.
At 3/23/08 03:31 PM, adman1993 wrote: OK while the programmers talk about their programming stuff.. i have an art quesrtiton..
I recently went on work experiance and used photoshop a hell of a lot more then i did at home.. and the dude taught me how to use the fountain pen tool.. does anybody else use this?
The pen tool is a fantastic tool and is extremely useful. What were you using instead? It can take a while to master it but its so useful :3
Sorry for double post.
At 3/23/08 03:37 PM, UnknownFury wrote: The pen tool is a fantastic tool and is extremely useful. What were you using instead? It can take a while to master it but its so useful :3
Well I mastered it whilst on work experiance.. I was using the line tool then manipulated it.. like bending the lines and stuff or drawing with my tablet then smoothing it over..
But it hit me the other day that im basically doing what is 10x easier with the pen tool :S
Sorry for double post.
Dw i saved you :3
.
At 3/23/08 03:31 PM, adman1993 wrote: I recently went on work experiance and used photoshop a hell of a lot more then i did at home.. and the dude taught me how to use the fountain pen tool.. does anybody else use this?
Whew, a break in the NUMBERS. I was about to starting talking about the color red or something...
The pen tool really is an amazing, and possibly the most powerful tool in photoshop. When cutting out images from the backgrounds I used to only use the magnet-lasso tool but after learned how to use the pen tool a couple years ago I've never gone back. The ability to edit an infinite amount of points on a line at any given time to make the EXACT PERFECT shape is something that has proved invaluable.
At 3/23/08 02:49 PM, BoMToons wrote: I think this is Glaiel at the piano...amirite?
http://www.youtube.com/watch?v=tgT9OdVmL 4s
ya that's me... I did a better job on route 66 though (had a solo in that one).
At 3/23/08 07:28 AM, dELtaluca wrote: ^^ 3D fluid dynamics simulation, only got the fluid itself simulated, no densities or particles or anything running in it obviously.
I agree that that looks awesome.
Will you upload videos?
Happy New Year
I'm a couple days late but enh.
:::Electric Earth Collab:::::::::Review Request Club:::::::::NG Calendar:::::::::Life is a playground so get out and play.:::
At 3/23/08 03:46 PM, Senti wrote: Whew, a break in the NUMBERS. I was about to starting talking about the color red or something...
Hmm the color red eh?
Known as 0xFF0000 to us nerds right? FF0000 is a hexidecimal number, which is similar to a decimal number (base 10) which we count in but is actually base 16 instead, so F is actually a number, not a letter. F = 15. There's a 15 in the 16^4 and 16^5 places, so 15*16^4 + 15*16^5 is what FF0000 stands for. Pretty neat if you think about it.
We use hex because it translates to binary easier than decimal. FF0000 can be translated as
1111 1111 0000 0000 0000 0000
a simple 4 digit replacement of hex digits with binary digits, so the computer can think a lot easier than having to perform more intensive tasks of converting our base-10 system to binary.
So back to red I guess.
The color red is perceived when our eyes detect a photon with a wavelength of ~625-740 NM (1 nm = 1x10^-9 m, or 1 billionth of a meter). Fun stuff, even though some colorblind people are missing the appropriate cells to detect that color, or distinguish it from other colors.
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah cock joke blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah....
At 3/23/08 04:07 PM, Glaiel-Gamer wrote: stuff
hehe, I love you :3
I actually knew and understood all(I think, if not most) of that up untill 'The color red is perceived when our eyes detect a photon with a wavelength of ~625-740 NM'. My intelligence is increasing. One day I shall be as intelligent as you, bitch. Watch out.
I made something. Please test it. http://spamtheweb.com/ul/upload/230308/7 3295_StockMarketC.php
Can we dumb down a bit..? Im feeling dumb :P All i can do is draw :3
.
At 3/23/08 04:33 PM, adman1993 wrote: Can we dumb down a bit..? Im feeling dumb :P All i can do is draw :3
Ok, stare at this drawing for a while
At 3/23/08 04:38 PM, Glaiel-Gamer wrote:At 3/23/08 04:33 PM, adman1993 wrote: Can we dumb down a bit..? Im feeling dumb :P All i can do is draw :3Ok, stare at this drawing for a while
I think drawings like this are pretty neat - like the impossible triangles and stuff like that.
The Color Red
The color red is perceived when our eyes detect a photon with a wavelength of ~625-740 NM (1 nm = 1x10^-9 m, or 1 billionth of a meter).
It follows, then, that most object in the real world which are observed as being the color red, are in fact specifically NOT red. For example, a red apple is considered "red" by most people when, in fact, the apple absorbs and reflects certain light. In particular, it reflects the red wavelengths away from itself to any viewers, such as ourselves. Our eyes then interpret these reflected photons as red. Thus, the apple *looks* red, but in actuality, if anything can be said *for certain*, it is that a red apple is definitely not red.
We should take care not to make the intellect our god; it has, of course, powerful muscles, but no personality.
At 3/23/08 04:07 PM, Glaiel-Gamer wrote: ~625-740 NM (1 nm = 1x10^-9 m, or 1 billionth of a meter)
Which, given c = 299,792,458 m/s (roughly 3E8), gives a frequency of approximately 479667932800000Hz - 405124943243243.24324324324324324Hz :)
At 3/23/08 04:42 PM, DougyTheFreshmaker wrote: The Color Red
The color red is perceived when our eyes detect a photon with a wavelength of ~625-740 NM (1 nm = 1x10^-9 m, or 1 billionth of a meter).It follows, then, that most object in the real world which are observed as being the color red, are in fact specifically NOT red. For example, a red apple is considered "red" by most people when, in fact, the apple absorbs and reflects certain light. In particular, it reflects the red wavelengths away from itself to any viewers, such as ourselves. Our eyes then interpret these reflected photons as red. Thus, the apple *looks* red, but in actuality, if anything can be said *for certain*, it is that a red apple is definitely not red.
Yeah we learnt this in biology when learning about the plants leaves etc. It doesn't actually use most of the energy it gets from the sun. 10% or so passes straight through. About 50% is reflected off(the green light waves), portraying the leaf as green, and the other 40% is converted through photosynthesis.
I think those numbers are right. Something like that.
I thought it was pretty simple with leaves, chloroplasts contain chlorophyll, chlorophyll is green, there is a lot of chlorophyll in a leaf cell.