Links:
view my trainer profile on TrainerExchange.com Listed on: Dmegs Web Directory

PHP video tutorials

phpmath.com
phpclasses.org
Canadian Mathematical Society
camel.math.ca

Algebra.com
Blogs:
rationalcode.com
Silverlight Playground

Technology:
silverlight.net
XNA Creators Club Online
php
asp.net


Image To HTML - Convert Image To Text - Convert Your Image To Pure HTML In Seconds!

by Administrator 31. July 2009 13:54

You can use this program to convert an Image to pure HTML. The generated HTML file can be downloaded as well.

I load the image in php and read it pixel by pixel and based on the pixel RGB value generate the appropriate HTML tag. To save the server bandwidth and cpu time, I limited the image type to GIF and Jpeg and the image dimentions to 400 by 300 pixels and the image size to 50KB.

You can try this cool application here. I hope you enjoy it.

Bezier Curves In PHP!

by Administrator 24. March 2009 06:58

If you've worked with graphic softwares like Freehand, you should be familar with the Bezier Curve. 

According to WiKipedia, In the mathematical field of numerical analysis, a Bézier curve is a parametric curve important in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.

I used GD graphic library and eval() fucntion is PHP to develop the Bezier class. This class takes the coordinates of 4 points needed for a bezier curve and draws it in an image. This image can be saved like any other web image. You can draw your own Curve by clicking on the following sample image.

The class code can be downloaded from my page in phpclasses.org.

Currently rated 3.0 by 3 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Algorithms and Data Structures | Mathematics | PHP

Online PHP Calendar

by Administrator 24. March 2009 06:10

I developed this class long time ago just for fun. It outputs the calendar of a given month and year including future dates as an HTML table.

The width of the calendar table is also configurable.
Leap years are handled correctly. Try it by clicking on the sample images.

 

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Algorithms and Data Structures | PHP

Koch Fractal, This time in PHP

by Administrator 23. March 2009 14:22

Try it here! 

According to Wikipedia, A fractal is generally "a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole,"[1] a property called self-similarity.  

Recently I added a post about a Silverlight application to draw Koch Curves. I re-programmed it in PHP using the PHP GD image library. The output is a Jpeg and can be saved like a normal image. You can try the application by clicking on the sample image. The only input you need to provide is the number of iterations (levels) which can be selected from the given dropdown.

You can also download the PHP code from phpclasses.org. Click on the sample image to try it yourself.

Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Algorithms and Data Structures | Mathematics | PHP

.NET Magnet Painter

by Administrator 9. March 2009 15:27

I wrote this VB.NET application about two years ago. It simulates drawing with a magnet and iron filings. You can save your drawings in a text file and reload it later.

I developed this application with having electromagnetics concepts in mind so actual formulas are used to calculate the speed and direction of the filings.

The first step is defining the canvas. Here you set the width and height of the canvas and also the width and number of filings.

Then you have the canvas ready for you with loaded iron filings as follows:

You can adjust the magnet strength by clicking on the circles (buttons) on the top left. Darker circle means stronget magnet. At the end you can save your awesome painting and reload it again in future. You can download the executable here.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

.NET | Algorithms and Data Structures | Physics

Fractal (Koch Curves) in SilverLight 2.0

by Administrator 9. March 2009 14:06

As a Flash and C# developer, I was always curious to try SilverLight so I read a book on SilverLight 2.0 and really enjoyed it. I tested my SilverLight knowledge by doing a "cool" application on fractals.

According to Wikipedia, A fractal is generally "a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole,"[1] a property called self-similarity.

You can try it here. In the first textbox, you need to enter the number of recursion levels. I don't recommand anything over 7. In the second textbox, you need to enter the size of the recursion in pixels. After setting these values, press the button.

IE should be used to try this demo and SilverLight 2.0 plugin must be installed.

Click to try it yourself

Currently rated 2.5 by 2 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

.NET | Algorithms and Data Structures | Mathematics | SilverLight 2.0

Online Spell Checker

by Administrator 6. March 2009 10:40

The applications that let the users compose text, for instance, of articles or e-mail messages, can benefit of text spelling features as they let the users review and eventually fix spelling mistakes before submitting the final version of the texts that are composed.

PHP comes with text spelling extensions like pspell but in some installations these extensions are not available.

This class provides a text spelling solution completely based on PHP code that only uses basic functions

The class makes it possible to provide text spelling features without depending on the availability of PHP spelling extensions.

You can try it here. The code is also downloadable here. I won the December 2004 phpclasses.org prize for this application.

   

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , , ,

Algorithms and Data Structures | PHP

PHP Root finder!

by Administrator 6. March 2009 10:34

This cool PHP script takes an expression, f(x) and calculates all the roots between a start and end point. It also provides a nice graphical output which can be saved.

Here is  a sample output:

 

Click to try

You can try it yourself here. The code is downloadable from phpclasses.org.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Algorithms and Data Structures | Mathematics | PHP

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

Reza Salehi
Microsoft Certified Professional

Microsoft Certified Trainer

Microsoft Certified Professional Developer

Microsoft certiied Technology Specialist (ASP.NET 2.0)

About Me

I started this blog to share my ideas, programs and interesting programming notes. Visitors who are interested in mathematics, physics and astronomy may find my blog interesting.

I live in Toronto, Canada and work as a Senior Software Developer and Microsoft Certified Trainer.

My online Microsoft web page is available  here.  Online business card.

RecentComments

Comment RSS