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: Dashboard effect in Java application



ah, that
yes I did

I don't calculate cosa, sina and acosa inside of the pixel loop (and it was so in the very first version)
that's why it didn't help
here is what I did:
in static initializer I calculated something like that (it's still in the code) :
public static int NUMB_TRIGONOM_DOTS = 500;


    public static double []acoss = new double[NUMB_TRIGONOM_DOTS+1];

    static{
        calculateTrigonomFunctions();
    }
...

protected static void calculateTrigonomFunctions(){
for(int i = 0; i <= NUMB_TRIGONOM_DOTS; i++){
acoss[i] = 180 * Math.acos((double)i/(double)NUMB_TRIGONOM_DOTS) / Math.PI;
}
}


and all of that didn't help much because :

time of the painting ~80ms >> than time for calculating trig functions
and I calculate trig functions only once per dt cycle

interesting that replacing float to double gave about 10% in performance.

thanks


On Dec 21, 2004, at 10:56 PM, Tom Davies wrote:

I meant a lookup table of the results of evaluating trigonometrical
functions like sin and cos

Tom

On Tue, 21 Dec 2004 22:52:26 -0500, Dmitry Markman <email@hidden> wrote:
I'm not very familiar with image's lookup tables
but I thought it's related to the color conversion
cube transition has nothing to do with color conversion

or maybe you mentioned other lookuptable
so I didn't get it again :-(

thanks


On Dec 21, 2004, at 4:38 PM, Tom Davies wrote:

On Tue, 21 Dec 2004 16:10:34 -0500, Dmitry Markman <email@hidden>
wrote:

On Dec 21, 2004, at 3:19 PM, Levi Yourchuck wrote:

A couple of points on :

Have you considered putting in a table for the trig functions?
if I understand right your question: you can trigger the changing by
clicking right bottom corner of the table

I'm pretty sure Levi meant a precomputed look-up table.

Tom

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

This email sent to email@hidden


Dmitry Markman




--
email@hidden


Dmitry Markman

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

This email sent to email@hidden
References: 
 >Re: Dashboard effect in Java application (From: Tom Davies <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.