WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : A class to draw real 3D graphics with surface area
Categories : Graphics, PHP, PHP Classes Click here to Update Your Picture
Mr alti
Date : Feb 22nd 2001
Grade : 3 of 5 (graded 32 times)
Viewed : 19738
File : class_new.php3
Images : No Images for this code example.
Search : More code by Mr alti
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?

require('class_new.php3');
$graph=new graph(500,400); //width and height of the graph
srand(time());

$im=time();
$graph->filename="images/graph".$im.".gif";
$graph->datay=array();
$graph->nbz=5; //number of z on axe (one less than number of line because line
start at 0)
$graph->nbcourbe=6; //number of lines
$graph->nbdonnee=19;
$graph->nbx=20; // nnmber of x on axe
$graph->nby=35; // number of y on axe
$graph->labelX=array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);

$graph->labelY=array
(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,3
1,32,33,34,35,36,37,38,39,40);
$graph->labelZ=array("courbe 1","courbe 2","courbe 3","courbe 4","courbe 5","courbe
6");
$graph->titre="GRAPH 3D";
$graph->titre_labelY="Label des Y";
$graph->titre_labelX="Label des X";
$graph->diago='oui'; // 'non' if you don't want diagonal
//$graph->color (number of surface (start from 0), red, green, blue)
$graph->coloris (0,245,197,197);
$graph->coloris (1,245,211,163);
$graph->coloris (2,252,180,76);
$graph->coloris (3,252,105,76);
$graph->coloris (4,205,85,65);
//$graph->lignecolor (number of line(start from 0), red, green ,blue)
//attention there is one more line color than surface color
$graph->lignecolor(0,11,25,157);
$graph->lignecolor(1,17,36,219);
$graph->lignecolor(2,103,116,239);
$graph->lignecolor(3,152,161,242);
$graph->lignecolor(4,204,208,248);
$graph->lignecolor(5,229,231,253);
//gnrateur alatoire de courbe
// il faut de prfrence mettre les courbes petites valeur en premier pour aller
dans un ordre
croissant


for ($ne=0;$ne<19;$ne++) {
$num[0]=rand(0,35);
$num[1]=rand(0,35);
$num[2]=rand(0,35);
$num[3]=rand(0,35);
$num[4]=rand(0,35);
$num[5]=rand(0,35);
sort($num);
$graph->datay[0][$ne]=$num[0];
unset($graph->datay[0][6]); // to see what's passing when a data is not define
$graph->datay[1][$ne]=$num[1];
$graph->datay[2][$ne]=$num[2];
unset($graph->datay[2][12]); // to see what's passing when a data is not define
$graph->datay[3][$ne]=$num[3];
$graph->datay[4][$ne]=$num[4];
$graph->datay[5][$ne]=$num[5];

};

$graph->create_graph();

$graph->create(); // create image
echo"<table width=750><tr><td align=center><img src=\"/images/graph$im.gif\"
width=500
height=400></td></tr></table>";
$graph->destroy(); // destroy image

?>

Latest ver at : http://alti.free.fr/alti/php



crop and resize image class using gd library function
Categories : PHP, PHP Classes, GD image library, Graphics
HTML_Graphs provides a simple PHP interface for creating pure HTML charts.
Categories : Graphics, PHP, PHP Classes, Charts and Graphs
Image Cache
Categories : Graphics, PHP Classes, PHP
Three Cool Classes and One Trick
Categories : PHP, PHP Classes, Graphics, Email
Advanced Image WaterMarker
Categories : PHP, PHP Classes, GD image library, Graphics, Object Oriented
PHP interface class to the eBusiness Charts generatation remote service.
Categories : PHP, PHP Classes, Graphics, Charts and Graphs
Image Generation Class ( PNG Format )
Categories : PHP, GD image library, PHP Classes, Graphics
EasyPhpThumbnail Class - The EasyPhpThumbnail class allows you to generate thumbnails and handle image manipulation for GIF, JPG and PNG on-the-fly.
Categories : PHP, PHP Classes, Object Oriented, Graphics, GD image library
HTML_Graphs uses PHP to provide a consistent interface for creating HTML based charts. The user of the class sets up arrays that are passed to html_graph() which then takes care of all the messy HTML layout.
Categories : Graphics, Arrays, PHP, PHP Classes, Charts and Graphs
imageMarker v 3.00 with new advanced features
Categories : PHP, PHP Classes, Graphics, GD image library
PHP Image Validation Class - test if a specific file is of a certain image type without relying on the said file extension.
Categories : PHP, PHP Classes, Data Validation, Graphics, Beginner Guides
3dLib - a class for drawing in 3D space. Supported functions: Line, SetPixel, Polygon, FilledPolygon, etc. 3dChart() function has been added for one-call drawing of 3d charts. Support of mostly used 3d-transformations.
Categories : Graphics, Math., PHP Classes, PHP, Charts and Graphs
Simple class that uses GD to draw pie charts. After the class definition there's some sample code to demonstrate how you use the class.
Categories : Graphics, PHP, PHP Classes, GD image library, Charts and Graphs
Render TTF Text to PNG. Text message, font, size, rotation, padding, color, background, and transparency can all be defined via URL.
Categories : PHP, PHP Classes, Graphics
Array Insertion
Categories : PHP, PHP Classes, Arrays
 Faro Rasyid wrote :623
i`m new to PHP and amazed by what PHP capable...
this is very cool class thank you