An Introduction to Numerical Methods in C++, Revised Edition

A8: Mapping the screen

A8 Mapping the screen

In this section we show how to map the screen, as we did in 15.3, in order to show a quadratic Julia set. We take over unchanged the functions inside and julia from 15.3, treating them as global functions. An appropriate class is:

class TMapScreen : public TScreen {public:      TMapScreen(LPSTR ATitle) : TScreen(NULL, ATitle) { };      void MapScreen(HDC, RECT&, complex&,                         COLORREF, COLORREF, COLORREF);      virtual void Paint(HDC PaintDC,                         PAINTSTRUCT &PaintInfo);};

The function MapScreen closely resembles drawblock in 15.3:

#pragma argsusedvoid  TMapScreen::MapScreen(HDC hDC, RECT &rect,                  complex &c, COLORREF bkdcol,                  COLORREF insetcol, COLORREF outsetcol){      int nx = rect.right - rect.left;      int ny = rect.bottom - rect.top;      for(int j = 0; j < ny; ++j)        // scan columns      {  ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Computer-Aided Design (CAD) Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.