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 28/06/2005, at 5:07 am, email@hidden wrote:

Anyone seen this before? Does someone have another method for  

generating random initial values for screen savers?



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.


________________________________________________________

Pierre-Olivier Latour                            email@hidden

Quartz Composer Architect                Graphics & Imaging Team


For an example, check out this screen-saver-style module. Image folder path is exported, so add it as a screen saver and try the options:

http://funwithstuff.com/quartz/Abstracted.qtz

It's not the cleanest, but System Time has some Math (modulo, add) applied, then that's used as the maximum for a Random patch. That gets rounded and fed into some _javascript_ and works well here.

Cheers,
Iain.

PS. I've sent this composition to the list before, but as an attachment subsequently eaten by Mailman. Enjoy the direct link above, and more in the parent directory:


Iain Anderson - email@hidden - http://funwithstuff.com


 _______________________________________________
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



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.