EasyManuals Logo
Home>Epson>Printer>FX Series

Epson FX Series User Manual

Epson FX Series
376 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #194 background imageLoading...
Page #194 background image
Figure
13-5.
Plotting a circle
Circle Plotting
You can have your program examine the cells of an array in any
order; the following program scans them row by row, using two
loops:
20 FOR R=l TO N: FOR C=l TO N
At each cell, line 30 calculates the cell’s distance from a center point by
using the distance formula:
30
D=SQR((R-11)^2+(C-11>^2)
Next the program compares this distance with a number
(10)
that
specifies the radius of a circle. Notice that this formula commonly
results in a number that includes a decimal fraction, e.g.,
8.94.
If the distance for the current cell A(R,C) is close to 10, you set its
contents equal to one: otherwise, you leave it alone.
40
IF INT(D+.0)=l0 THEN A(R,C)=l
Line
40
sets any cell whose distance is between
9.5
and 10.5 equal
to one.
177

Table of Contents

Other manuals for Epson FX Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Epson FX Series and is the answer not in the manual?

Epson FX Series Specifications

General IconGeneral
BrandEpson
ModelFX Series
CategoryPrinter
LanguageEnglish

Related product manuals