Preorder Windows 7 and save 50% or more
 
Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Bookstore...
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
  Ready-to-Run Visual Basic Graphics Programming: John Stalcup's Methods  
 
Overview Table of Contents Updates
What Readers Have Done What's New in Edition 2 Wiley
Save 15% Amazon.com Amazon.co.uk
 
 
 

VB6 Scale Method Bug

The way these pictures are generated is really quite simple.

Take an equation like this one:

    ((x+y)/((y^2)/x)+x^2) Mod 256

The x stands for the x coordinate of a pixel on an image, and the y stands for the y coordinate of a pixel. The program plugs in every x and every y from 0 to the width of height of the image (in pixels) and for each the result of the equation is the color of the pixel that is drawn on screen.

So for every pixel left or right or down or up the x or y value changes by one whole integer. But the program gets really cool when you use the zoom tool. This makes it so that instead of starting at (0, 0) it starts at the top left corner coordinates of whereever you zoomed. It also makes it so that instead of one whole unit of difference per pixel moved, it adds only some small fraction to the x or y value the next time through the equation. This makes it so that you can zoom in on pictures, and move in any direction.

There are tons of possible equations to use and you can zoom to 1.3 trillion percent and you can go a huge distance to the left, right, top, or bottom. So, there are nearly infinite possible pictures to find.

 

 
  Ready-to-Run Visual Basic Graphics Programming: John Stalcup's Methods  
 
Overview Table of Contents Updates
What Readers Have Done What's New in Edition 2 Wiley
Save 15% Amazon.com Amazon.co.uk
 
 
 

Copyright © 1997-2008 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated