magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 06 > Features  

Dynamic Biorhythm Graphs

Gnuplot And Ppmtogif Bring Your Web-Based Graphs

By Andrew Davison

Many Web applications require the dynamic generation of images in response to user input. Applications can dynamically draw images containing graphic primitives such as lines, circles, and polygons using the functions in Thomas Boutell's gd graphics library (www.boutell.com/gd/). But what if you want to generate graphs based on equations or tables of data? The most common approach is to combine two freely available packages, gnuplot and pbmplus, to plot the data and transform it into a GIF.

To illustrate, I'll present pb.c, an application that transforms graphs generated by the gnuplot utility into GIF files with the ppmtogif utility, and allows users to dynamically display various parts of the graphs.

Biorhythms

The graphs I'll use in pb.c depict the equations for the sine waves that constitute a biorhythm.

A "biorhythm" comprises three sine waves of different frequencies that supposedly control our physical, emotional, and intellectual fluctuations. The physical wave repeats every 23 days and controls vitality and endurance; the emotional wave repeats every 28 days and controls temperament and sensitivity; the intellectual wave repeats every 33 days and controls thinking capacity. A wave value above 0 is considered auspicious; when it falls below 0, beware. To calculate the sine waves for a given month, a user typically supplies his or her date of birth (when the waves began) and a month of interest.<>




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2