--- Jim Hartmann wrote: > Very cool! But its not a true sine wave, its a > parabolic wave if that's a > real term. One segment of a triangle wave is a > line. The algorithm is an > integrator, and the integral of a line like y = x is > y = (x^2)/2+c, a > parabola (let c be your DC offset). Maybe someone > else can tell us what > the error magnitude amounts to comparing the > "parabolic wave" to a sine? I was wondering who'd drag this [OT] first. I did a quick back-of-the-notebook calculation and discovered what should've been intuitive. If you're familiar with time to frequency transformations like Fourier or Laplace then you'll see why I say this. Let's look at the way we've been discussing how to approximate sine waves and their corresponding harmonics. First we started with square waves. We know that the harmonic strengths fall off inversely to the harmonic number (and for symmetrical square waves, there are no even harmonics). This inverse relation ship, 1/s or 1/(jw), is a direct result of taking the transformation of a step function. The additional factors such as defining the harmonic locations are determined by the periodicity of the wave form. When we went to triangle waves, we noted that the harmonic strengths diminished as the square of the harmonic number, 1/s^2 of 1/(jw)^2 . Again, this is a direct result of taking the transform of a line. Continuing with this line of reason, we should (intuitively) suspect that a wave created with parabolas would have harmonics strengths diminishing with the cube of the harmonic number, 1/s^3 or 1/(jw)^3. Guess what? I suppose one could continue with this reasoning to suppress the harmonics even more. But (especially on the pic) you'll reach a point of diminishing returns. This whole subject btw, falls into the category of polynomial approximation. So far we've been using really simple polynomials. In fact to tie in with an earlier observation, so far these polynomials are like FIR filters. If one wanted to create the analogue (perhaps an inappropriate adjective) IIR filter, then perhaps rational Pade' approximations would be of some use. .lo __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com