News Feed

News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sorting 2D-arrays in PHP - anectodes and reflections
January 07, 2008 @ 08:41:00

On the ProDevTips website today, there's a new article looking at the sorting of arrays, specifically of the two- and three-dimensional sort.

One of the many problems with PHP that detractors are eager to point out is the fact that the language has thousands of global functions. Without the awesome CHM version of the PHP manual - finding your way in this jungle would be a mess. Simply finding a function like array_multisort is not trivial. And even if you find it, understanding it completely is not trivial either!

Not quite finding what he needed in the array_multisort function built into PHP, the author opts to create his own custom sorting function that make sorting 2D arrays simpler.

0 comments voice your opinion now!
sort 2d 3d array dimensional arraymultisort usort tutorial sort 2d 3d array dimensional arraymultisort usort tutorial
Graphing Data with PHP/SWF Charts
December 03, 2007 @ 11:14:00 has a new tutorial posted today about using the PHP/SWF charting system to graph your data:

In this tutorial, I'll introduce you to PHP/SWF Charts, a great solution for building PHP- and Flash-driven charts. PHP/SWF supports a wide variety of charting formats, including bar, candlestick, 3D columns, pie, 3D pie, and advanced charts such as scatter, polar, and composites. See the PHP/SWF gallery for a great compilation of examples.

They focus mainly on a bar chart to keep things simple. They show how to install the software (dead easy) and how to create a simple first chart complete with a graphic to illustrate. Flat charts are nice, but they show some of the real power of the library by transforming it into a 3D bar graph, giving the columns some depth and all it really takes is changing the chart type.

0 comments voice your opinion now!
data graph phpswf chart bar 3d tutorial data graph phpswf chart bar 3d tutorial

Jakob Westhoff's Blog:
It's alive - Image_3D live browser rendering
April 04, 2007 @ 08:32:00

There's plenty of 2D graphics libraries out there, some 3D ones as well, but that hasn't stopped Jakob Westhoff from creating his own driver for the Image_3d package to allow for live 3D image browser rendering.

Quite some time ago my friend Kore Nordmann had a talk at our local PHP Usergroup about 3D rendering techniques which was quite inspiring. Shortly after that talk I decided to write a simple 3D renderer. But, hey there are so many of them already out there, that I decided to do something more unusual.

I just started over and began to write a ECMA Script based live 3D renderer for browsers which understand the new "canvas" tag. After some simple tests I realized that it would be quite cool to implement this as a driver for Kore's Image_3D package, which is entirely written in PHP.

Be sure to check out his post to see what this new driver makes possible. There's an image complete with controls to rotate, zoom, turn of its axis and export to both the SVG and PNG formats. Definitely work checking out!

0 comments voice your opinion now!
3d image render browser driver package rotate zoom export 3d image render browser driver package rotate zoom export
3D graphics in pure PHP
November 08, 2006 @ 08:13:00

As spotlighted by the folks over on, there's a developer, László Zsidi, who has contributed several packages to the repository - including some that work to create 3D images with just the built-in functions PHP provides.

He has developed several pure PHP components that implement impressive 3D animated graphics, like a 3D objects rendering engine, emulate a waving flag or the reflex of an image near a lake. The generated frames are combined into a single animated GIF with another pure PHP component also written by László. All these components were nominated to the PHP Programming Innovation Award for the evident creativity, demonstrating that PHP can be used for non-trivial software applications.

Some of the libraries in the listing include:

0 comments voice your opinion now!
3d graphics builtin functionality reflect gif animation images 3d graphics builtin functionality reflect gif animation images Formus:
PHP "raycaster" 3D renderer
July 10, 2006 @ 06:02:09

In an incredible example of PHP's flexibility, there's this example of what it can do with the properly applied knowledge (and a little patience) - the creation of a 3D raytracer.

I mentioned recently that I was looking for an interesting PHP project. This evening I remembered an idea I had a while ago to make a 3D renderer in PHP (and if anyone's tempted to ask - "because I can" ). I did a bit of reading on old 3D engines, as I didn't want something modern and slow, and found out that the "raycaster" rendering used in Wolfenstein 3D is ridiculously easy to implement.

A few hours later and it's up and running I've not run any proper speed tests yet, but the images load up pretty much instantaneously. I have a couple of ideas of what this could be used for, so watch this space.

Screenshots are included in the post as well as tons of comments from all about the web (it was also linked on digg). He hasn't released the source for it yet, but it'll still be an interesting project to keep an eye on. In the meantime, there's always Kore Nordmann's Image_3D project to look into.

3 comments voice your opinion now!
raycaster renderer 3d simple example raycaster renderer 3d simple example

IBM developerWorks:
Paint 3-D images with PHP
April 10, 2006 @ 07:33:27

The IBM developerWorks site has posted a tutorial covering the generation of 3D Images inside PHP - with the help of the Image_3D PEAR package, of course.

PHP, a language originally intended for Web development, has been used for years to manage dynamic Web sites and database applications. Extensions to the language available through the PHP Extension and Application Repository (PEAR) have allowed developers to take the language in new and interesting directions.

PEAR's Image_3D package is an object-oriented interface for creating three-dimensional (3-D) graphics in a variety of formats, including PNG and SVG, two image formats with increasing support by modern Web browsers. Find out how to use the Image_3D package, learn the limitations of using dynamic 3-D images, and investigate solutions and practical applications of 3-D graphics.

You'll have to log in to get at the actual tutorial, but it's full of good info and code to get you started. You'll need a bit of knowledge of object-oriented programming to really get a handle on it, and a shell prompt (Windows or Linux) will be needed to run some of the examples.

0 comments voice your opinion now!
3d image_3d gd pear package tutorial 3d image_3d gd pear package tutorial

Richard Davey's Blog:
Creating 3D with PHP
November 11, 2005 @ 05:35:44

In this new post from Richard Davey today, there's a look at the latest release of a pretty cool little PEAR package - Image_3D.

On November 7th Tobias Schlitt and Kore Nordmann released a new alpha of their Image 3D Pear package. The aim of this package is to create 3D objects using nothing but native PHP code (no extensions). The objects can be rendered out via GD, SVG or ASCII. With a number of built-in primitives such as a cube, sphere, cone and torus, plus the ability to place coloured lights, alter object transparency and import 3DS files, this is one powerful package! I gave it a quick run through today and am reporting back on my findings.

Apparently "a quick run through" involves not only looking at what the package is all about, but also how to use it (just short of an actual code-based tutorial). He talks about some of the basics that are built in (like cones, spheres, 3D text) and a cool addition that will let you integrate other objects you've created - the ability to import files from 3D Studio...

0 comments voice your opinion now!
pear 3D Image_3D pear 3D Image_3D

Community Events

Don't see your event here?
Let us know!

version laravel language update library package install framework community interview voicesoftheelephpant series composer release introduction symfony opinion tool podcast security

All content copyright, 2014 :: - Powered by the Solar PHP Framework