Thursday, October 1, 2009

Calculus in VPython




What you are seeing is a plotted graph of the function f(x) = x^2, and it's derivative f'(x) = d/dx [x^2] = 2x.

We are actually using VPython in my Computer Simulation and System Modeling (CSC 360) class to do simulations.

Check it out Check it out

Labels: , , , , , ,

Thursday, July 23, 2009

Friday, June 12, 2009

XNAFib - Update

XNAFib now can compute up to 20,000 numbers in the Fibonacci sequence. I’ve added a new progress counter and a timer to time how long the computations took to complete plus multi-threading. Also now I'm using an iterative (looping) version of the Fibonacci algorithm which is much faster than the recursive version. A Recursive algorithm uses much more memory and is slower because each recursive call pushes an AR (activation record) onto the call stack thus using more memory. As the values of N gets larger, the possibility of a stack overflow error is very likely. Well I better catch myself before I end up giving a whole lecture on iteration vs. recursion.


The program still completes faster on the PC than on the Xbox 360. It's not surprising because of my PC’s powerful Quad Core AMD Phenom 9600 X4 processor where as the Xbox 360 has a PowerPC Tri-Core Xenon processor plus the Xbox 360 .NET CLR isn't very mature yet. It's hard to compare the PC and the Xbox 360 because here, we are talking about two different hardware architectures.

Well enough of me rambling. I thank everyone who was been reading my blog posts. Thanks and God bless.

Labels: , , , , , , , , , , , , , ,