Learning C with Fractals - 1st Edition - ISBN: 9780126683158, 9781483277813

Learning C with Fractals

1st Edition

Authors: Roger T. Stevens
eBook ISBN: 9781483277813
Imprint: Academic Press
Published Date: 8th January 1993
Page Count: 334
Sales tax will be calculated at check-out Price includes VAT/GST
Price includes VAT/GST

Institutional Subscription

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping
No minimum order.


Learning C with Fractals provides the fundamentals of the C programming language and the generation of fractals.

The book is comprised of 21 chapters that discuss the aspects of the C programming language. The text begins with an introductory chapter that provides the basic hardware requirements and basic information to get the student started. Subsequent chapters tackle the writing and compiling of C programs; the main program and functions; the program's interaction with DOS (Disk Operating System); and the operators and expressions in C. Topics on initializing variables, conditional statements, manipulating strings, and the different programming functions are covered as well.

Computer programmers and those interested in learning computer programming will find the book useful.

Table of Contents

List of Color Plates

Chapter 1. Introduction

Hardware Requirements

C Programming Style


Preprocessor Directives

The #include Directive

The #define Directive

Reserved Words

Data Types

Chapter 2. Writing and Compiling C Programs

Borland C++ and Turbo C++

Zortech C++

Microsoft C++

Power C

Chapter 3. Main Program and Functions

The Main Program

Functions within a Program

Function Limitations


Chapter 4. Interaction of C with DOS

DOS Fundamentals

Using DOS from C: the int86 Function

The Setmode Function

The cls Function

The Plot Function


Chapter 5. Operators and Expressions

Operator Definitions

Operator Precedence

Mixed Types and Typecasting

Chapter 6. Initializing Variables

Global and Local Variables

Initializing Data Items

Initializing Arrays

Chapter 7. Using Loops

The while Loop

The Mandelbrot Set

The do-while Loop

The Hyperbolic Cosine Fractal

The for Loop

The Legendre Polynomial Fractal

Chapter 8. Conditional Statements

The if-else Statement

Relational Operators

More Complicated if Statements

The Julia Set

The ? : Trinary Conditional Function and the Dragon Curve

The Switch-Case Statement

Chapter 9. Output to Screen and Printer

The putch Function

The putc and fputc Functions

The putchar and fputchar Functions

The puts and fputs Functions

The putw Function

The printf Function

Type Characters

The Flag Field

The Width Field

The Precision Field

The Size Field

Expanded Mandelbrot Set Example

Chapter 10. Disk Reading and Writing

Opening a Disk File

Closing a File

The fseek and Rewind Commands

The putc and fputc Functions

The fputs Function

The putw Function

The fprintf Function

The freod and fwrite Functions

The Tchebychev C5 Polynomial Fractal Curve

Restoring a Display from a Disk File

Chapter 11. Keyboard Input

The getch and getche Functions

The getc and fgetc Functions

The getchor and fgetchar Functions

The gets and fgets Functions

The getw Function

The scanf Function

Specifying the Input Format

Type Characters

An Example Using scanf

Problems with scanf

The bioskey Function

The Mandelbrot Set as a Map of Julia Sets

The Mandelbrot Set with Integer Arithmetic

Moving the Cursor and Drawing the Preview Julia Set

The Arrow Function

The Julia Function

The gotoXY Function

The Plot Function

The plotxor Function

Chapter 12.Using Pointers in C

What Is a Pointer?

The Plasma Fractal Display

Initializing the Palette

The Subdivide Function

Rotating Colors

Chapter 13. Structures and Unions


The typedef Statement

Using a Structure


Expanding the Tchebychev C5 Fractal

The move_cursor Function

The Plot Function

Chapter 14. Mathematical Functions

The Cosine Fractal

Chapter 15. Character and Number Conversions

The otoi Function

The otol Function

The otof and _otold Functions

The strtod and _strtold Functions

The itoa Function

The Itoa Function

The ultoa Function

The ecvt Function

The fcvt Function

The gcvt Function

Testing for Character Type

Newton's Method Fractals

Chapter 16. Manipulating Strings

String Copying Functions

String Appending Functions

String Comparison Functions

String Character Search Functions

String Subset of Characters Search Functions

Uppercase/Lowercase Conversions

Setting Characters in a String

Converting Time or Date to a String

The strlen Function

Converting Strings to Numbers

Reversing a String

String Token Search

The readfile.c Program

Chapter 17. Memory Management

Memory Models

Things You Can't Do

The malloc and calloc Functions

The Stack and the Heap

The Free Function

The formalloc and farcalloc Functions

The farfree Function

The memchr Function

The memcmp and qsort Functions

The memset Function

The movedato Function

Offsetting Using movedata

Creating Plasma Mountains

Chapter 18. Time and Date Functions

The Time Function

Setting the Time Zone

The ftime Function

The ctime Function

The asctime Function

The gmtime Function

The localtime Function

Setting System Time from C

The srtffime Function

The difftime Function

The Phoenix Fractal

Chapter 19. Recursion

The von Koch Snowflake Fractal

Chapter 20. How to Handle Frequently Used Functions

The Seventh-Order Newton's Method Fractal

Functions in an include Statement

Creating a Library

Chapter 21. Common Mistakes in C Programming

Using the Wrong Units

Failure to Include Proper Header Files

Wrong Expression for Equality in Conditional Statements

Improper Use of Semicolon

Failure to Allow Loop to Terminate

Wrong Format for printf Function

Improper Definition of Far Pointer

Exceeding Array Limits

Problems with #define Statements

Appendix A. ASCII Output Characters



No. of pages:
© Academic Press 1993
Academic Press
eBook ISBN:

About the Author

Roger T. Stevens

Ratings and Reviews