Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to produce smooth random motion



On Jun 27, 2005, at 10:54 AM, Pierre-Olivier Latour wrote:

I don't think there's anyway to can change the original sequence of random numbers, however, you could post-process it with some mathematical operations that use the current date / time like multiply, modulo... this will ensure the final random sequence will never be the same.

For some reason, I can't get System Time to play well with _javascript_ in the screen saver environment. I'm feeding System Time into a _javascript_ block and doing

  if ( outputs[0] == null )
    outputs[0] = inputs[0] % 1.0;

to get a "random" number. It works fine in QC, but comes up NaN in the screen saver.

Here's a qtz showing this:

Attachment: systemtime.qtz
Description: application/quartzcomposer


(or http://www.panic.com/~dave/systemtime.qtz if the attachment doesn't go through..)

-D
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden

References: 
 >Best way to produce smooth random motion (From: pete boardman <email@hidden>)
 >Re: Best way to produce smooth random motion (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Best way to produce smooth random motion (From: Dave Hayden <email@hidden>)
 >Re: Best way to produce smooth random motion (From: David Coffin <email@hidden>)
 >Re: Best way to produce smooth random motion (From: Dave Hayden <email@hidden>)
 >Re: Best way to produce smooth random motion (From: Dave Hayden <email@hidden>)
 >Re: Best way to produce smooth random motion (From: Pierre-Olivier Latour <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.