Paint 3-D images with PHP

April 27, 2008

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.

In this tutorial

This tutorial is for PHP programmers interested in dynamically generating 3-D graphics. Images can be created from scratch, built up from objects and light sources positioned in space according to X, Y, and Z coordinates. Programmers with experience using 3-D Studio Max will see how to import objects from 3DS files into PHP creations. Complex surfaces defined by parametric equations can easily be mapped using Image_3D. Finally, business applications and data reports can be enhanced by adding pie charts generated on the fly.

Prerequisites

This tutorial assumes at least a base knowledge of objects and classes, as the entire interface for Image_3D is object-oriented. Access to a Linux® shell account or a Windows® command prompt is required for executing command-line PHP examples shown in the first half of the tutorial. Basic experience with JavaScript is also assumed.

System requirements

The following software and tools are required to follow along:
PHP V5 The Image_3D package is written using the PHP V5 object and class syntax. Image_3D The PEAR package will need to be installed. Typically, the installation of Image_3D should be easy if you have root (or administrator) access to your machine. Because Image_3D is in alpha release, the PEAR installation may complain that the package is not "stable." Use the -f option to force the installation:

 

GD Examples in the second half of the tutorial can be built for use on a Web site. The and are two options, if you don’t already have a Web server available.SVG viewerMozilla Firefox V1.5Adobe SVG plug-in

7 Things You Can Do to Improve Your Online Marketing Presence

Increasingly, online marketing is a crucial part of any marketing plan. Executing the programs in your plan, however, is just as critical. For many, finding the time is difficult. To make progress, you must set time aside each day (or other regular time period) for marketing online. To that end, take a moment right now to block out time for online marketing over the next six months, beginning today.

Use that time today and over the next six months to execute Internet- based programs in your plan. No plan yet? No problem. You will, of course, want to finish your marketing plan so you can refine your activities, but you can begin improving your online presence today by doing one or more of the following ideas:

Volunteer for Online Interviews

Podcasts, Webcasts, blogs, RSS feeds and newsletters (ezines) are all venues for online interviews or discussions. You’ll want to approach publishers who regularly conduct interviews with guests of your caliber, so finding opportunities will take some research. Do this by searching general search engines (such as google.com) or directories. Some directories to get you started: podcast.net (podcasts), ezinehub.com (ezines), sydic8.com (RSS feeds/blogs)

Identify 10 Bloggers in Your Category

Then send them your product as a gift. The idea is to expose your product to influencers in your category by giving them an opportunity to try it free. If they like it, they may give it a mention in their blogs. Note that this is a subtle online marketing technique. The idea is NOT to advertise to them, ask a favor of them or ask them to blog about the product. Choosing to mention (or not mention) your product should be solely up to them.

You can find and read blogs by searching blogging directories such as technorati.com.

Join an Online Network

Online social networks allow you to set up a profile page and interact with others who have your same professional interests. Each caters to a different type of audience, and there are do’s and don’ts, so you’ll want to read about a network before joining, read some of the profiles and learn a particular site’s rules before plunging in. Some networks to explore: linkedin.com, ryze.com, myspace.com, orkut.com, friendster.com, tribe.net

Draft a Press Release

First and foremost, the release must be something newsworthy to the media (if you need ideas, read the article here: http://www.websitemarketingplan.com/pr/NewsAngle.htm). Also, be sure to include a link to your Website or blog in the press release. Finally, distribute the release through an online press release service such as PRWeb.com.

Begin Surveying Your Website Visitors

Surveys can help you identify opportunities for improvement. Since online attention spans are very short, try asking a single two-part question such as Fred Reichhold’s Ultimate Question: "On a scale of 1 to 10, how likely are you to recommend __________." Fill in the blank with your Website name (or other relevant product). To those who reply with a 6 or lower, ask why not. Most likely you will see a pattern in the comments that will point to ways of improving your Website. There are software packages to help you set up an online survey. Also, surveymonkey.com is a popular Web interface for producing online surveys.

Put Your Product’s or Company’s Creation Story Online

Or work on conveying one or more of Patrick Hanlon’s 7 Primal Branding pieces online — creed, icons, rituals, sacred words, nonbelievers and leaders. According to Hanlon, these seven pieces form belief systems that inherently attract people who want to believe in a product. Those people form the communities that surround successful products and services.

Study Your 5 Closest Competitors’ Websites and Online Marketing Activities

Aside from gaining a better understanding of trends in your industry, you will also gain new insights into promotional strategies and tactics for your own business. As you research, brainstorm a list of ideas and use that list to plan a new online strategy or tactic for your own business.

There you have it - seven ideas for improving your online marketing presence. Choose one and get started today!

About the Author

Bobette Kyle draws upon 15+ years of Marketing/Executive experience, online marketing experience, and a marketing MBA as inspiration for her writing. Bobette is proprietor of the Web Site Marketing Plan Network (http://www.WebSiteMarketingPlan.com). She is also author of the marketing plan and Web promotion book "How Much For Just the Spider? Strategic Website Marketing For Small Budget Business." You can search all articles on the network through the marketing directory by going here: http://www.websitemarketingplan.com/directory

How Customer-Focused is Your Website?

You’re at a dinner reception. The stranger next to you strikes up a conversation.

It only takes a few minutes before you realize: “This guy’s completely self-absorbed.” No matter how hard you try, every topic leads back to him. Soon, you find yourself inching away.

Guess what? You can find the same thing on the web. Sites that are egocentric. More interested in talking about themselves than solving customer problems. However, unlike the dinner reception situation, your escape from a self-absorbed website is quick and painless.

(Although there are offenders across the board, the biggest culprits seem to be business-to-business companies and small- to mid-sized firms.)

To heck with product benefits or helping prospects and customers solve their problems – the narcissistic website dwells on the company’s spectacularly engineered offerings, their superior manufacturing techniques, the brilliance of their people, the company’s offices. Is there a place for bragging? Sure, but it’s secondary to the customer’s issues. Too many websites forget this.

When you consider that the average visitor has an attention span measured in seconds, and that he scans the web instead of reading every word, a narcissistic website has the same effect as a narcissistic tablemate: it turns people off.

In contrast, an intelligent website doesn’t leave a visitor stranded, searching for the customer benefits of the company’s products or services. It:

¨      Provides clear statements that are customer benefit oriented

¨      Supports its claims (often using customer and third party support) 

¨      Proactively addresses potential objections

¨      Ushers the visitor into a dialogue

Let’s look at a very simple before-and-after example.

We’re at the website of a widget manufacturer. Their target market? Widget buyers from manufacturing firms.

The homepage leads off with:

    "Since 1908, Acme Widget has precision-manufactured more than 10,000 varieties of widgets. What’s the Acme difference? State-of-the-art technology – including the latest laser manufacturing techniques – along with six sigma processes to ensure the highest quality."

Sound good to you? Where does the customer fit in?

While prospects and customers care a lot about the companies they deal with, they care first and foremost about their own needs. In this instance: “How will Acme Widget solve my problems?”

Here’s another take on the copy:

     “Whether you are looking for red, green, purple or color matched widgets, no other company offers a wider selection, faster delivery or more production-friendly engineered designs than Acme Widget.

    Independent tests show that using the Acme ViperWidget can result in improving your production speeds by as much as 35%, while significantly reducing defective rates over traditional widgets.

    Great selection. Fast delivery. Increased production speeds and reduced defectives for lower overall manufacturing costs. One name. Acme.

    Download our free white paper, ‘Increasing Your Production Speed while Lowering Defectives with Better Engineered Widgets,” highlighting the recent tests of more than five hundred widgets conducted by independent testing laboratory, International Widget Laboratories."

This time, the copy speaks to the interests of the customer. Customer problems – and Acme’s solution – stand front and center. Note, I still referred to the Acme’s engineering abilities. The difference here is that the reference to engineering is now linked to customer benefits.

Imagine a widget buyer visiting two sites: one with the first copy, the other with the second.

 ¨      With the first site, the buyer learns a little about the company, but not enough to differentiate it from the competition. And not nearly enough to understand, and appreciate, the benefits of doing business with the firm.

¨      At the second site, the buyer learns about the company’s wide selection, fast delivery, exceptional production speeds and lower defect rates. All strengths she can quickly grasp. What’s more, the white paper provides third-party support – validation – for the company’s claims.

The underlying concept is simple and an underlying marketing communications truth. The most effective marketing communications puts your customers and prospects first, not your company. By focusing on customer and prospect needs, you are more likely to fulfill your company’s needs.

As obvious as this statement would appear, it is similarly obvious that many marketers don’t really follow it. 

A Quick Check-up to Find if Your Company Website is a Narcissist

Pretend you are a customer visiting your company’s website for the first time. Write down five key concerns you have related to purchasing these kinds of products or services or choosing a company that you feel (or marketing research indicates) reflects the key concerns of your target market when researching companies like yours. Spend up to one minute at your website. Close the browser. How many of your five key concerns were addressed? How well did they address your concerns? A brief amount of copy addressing a key concern and a link to more detail is fine; no mention of these concerns is not.

Did the web page copy get to the heart of your concern or was it focused on the itself instead of the prospects needs? Use what you have learned to further test your website in front of real prospects and customers. Find out their most important problems they are hoping your website will help them answer and re-design your website around helping them.   

It’s your choice: propaganda that only ends up stroking your company’s ego or profits.