1. Random Number Mapping

----- <Unteseted Program> -----
include graphics.e

sequence reps
                  reps = repeat(0,640)
integer i

if graphics_mode(19) = 0 then
        for t = 1 to 640*100 by 1 do
                i = rand(640)
                reps[i] = reps[i] + 1
                pixel( 14, {i-1, 480-reps[i]} )
        end for
end if
----- <End> -----

The above code should disply the results as graphs growing up the the screen.
If the graphs should actually grow no more than 100 pixels. Some will grow more
because it is not a true random number generator.

-----
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com


Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » topic index » view message » categorize

2. Re: Random Number Mapping

That statement about not having a true random number generator reminded me
     of a sentence in something for learning how to do asm programs for the PC -- the
     trouble is, there's no way to generate truly random numbers on the PC WITH ANY
     AMOUNT OF SPEED.  So if speed is not an issue, is it possible to generate truly
     random numbers somehow?  Just a thought.
                           - Robert McDougal


Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu