Professional Documents
Culture Documents
Mathematical Elements For Computer Graphics by David F. Rogers, J.Alan Adams
Mathematical Elements For Computer Graphics by David F. Rogers, J.Alan Adams
DAVID F. ROGERS
J. ALAN ADAMS
MATHEMATICAL
ELEMENTS FOR
- ...
..... ,...
W'
J(
, ..
..
'
MIKE HAYDEN
~~n1YATICAL
ElBNrs
FOR
CO'RJTER G\1\PH l cs
MATHEMATICAL ELEMENTS
FOR
COMPUTER GRAPHICS
DAVID F. mRS
J.
PIWf>
Engineering oepart:ment
United States Naval Academy
l~cal
New York
t~oo
M:lnt:real
S3o Paulo
New
Delhi
Panazra
Paris
3 4 5 6 7 8 9 0
FGRFGR
7 9
Oa\nd F
1937r.\"lt:hesratica.l elencnts for o:xt~ter graphics .
CONTENTS
XIII
PIUAC
QW'lER 1
nmax.x:TIOO
ro Cll<lPl1l'ER GRAPHIC
1-2
1-3
1-4
1-5
1-6
ll
1-7
16
References
23
1-1
OW'TR 2 romrs
2-l
2-2
2-3
2-4
2-5
2-6
2- 7
2-8
liND LINES
Introcb::tioo
Representation of Points
24
24
24
25
25
Parallel Lines
27
28
29
Intersect.ing Lines
30
t-tidr:oint Transformation
2-9
~t.Jtlcn
11
2-10
ReflectJ.on
scaling
31
2-11
32
33
34
36
41
2-16
Points at Infinity
2-17
35
an Arbitrary Axis
44
References
CW\PJER 3
43
46
3-1
Introduction
46
3-2
'lbme-Dinensional Scaling
3-3
'nlrec-Dirrensional Shearing
3-4
'furee-DiJrensional IOtations
47
49
49
3-5
51
3-6
54
3-7
Three-D~ional
3-8
3-9
lbtations about
an Arbitrary Axis
54
r-~trix
55
Gect~etry
59
60
3-11
Perspective TranSfonMt.ions
3-12
3-13
Pomts at Infinity
66
73
77
3-14
3-15
Stereograriric Projection
References
QW1fER t
78
84
87
89
PLANE aJRVES
89
90
4-l
Introduction
4-2
Nonpara.rrctric
4-3
Param:>t.ric CUr\tes
4-4
4- S
4-6
Nonpa.ram:?tric
102
4-7
103
4-8
4-9
curves
~resentation
92
of Conic Sections
94
98
104
106
108
<nm:NI'S VII
5-.l
5-2
5-3
5-4
5-5
5-6
5-7
5-8
ll3
us
References
OW'TER 5
ill
Bourdary COnditions
116
ll6
116
119
123
124
Paratolic Blending
133
Bezier CUrves
a-spline CUrves
139
SPACE a.JRVES
Int.rodu:tion
o.uves
Representation of Space
CUbic Splines
N<mralized Paraneters
144
155
References
ffiAPTER 6
.157
157
158
162
164
165
166
168
170
175
176
180
181
185
186
188
6-1
6- 2
6-3
6-4
6-5
6-6
6-7
6-8
6-9
6-10
Int.rodllct ioo
Spherical surfaces
PlanE: 'Jurfaoes
CUrved SUrface Ieprescntation
Bilinear Surface
IDfted or Ruled Surfaces
Linear COons surfaces
A-1
A-2
A-3
SOFniARE
canonical Space
IWENDIX B
NM'RIX <PERATI(N)
B-1
Te.oninology
B-2
B-3
B-4
Multiplicatioo
~t
of a Square Matrix
.189
191
194
196
196
197
197
198
a-s
C-1
Im-erse ot a
Square t-1iltrix
199
200
200
201
202
202
203
204
204
C-2
C- 3
C-4
c-s
C-6
C-7
r.n
C-8
C-9
206
C-10
207
e-ll
205
C-13
207
208
209
C-14
210
en Algoritbns
A Stereo Algorithm
c-20
rar~ic
Ellipse Al.gon.tm&
c-23
c-24
C-25
INIIX
210
211
213
214
215
216
217
217
218
220
223
225
226
228
228
229
230
232
FOREWORD
Since its inception rore than a decade ago, the field of carput.er
gr~
has
problems
1.n
Grafhlcs for Ccrp..lt.er- Aided Design," in 1971 and it is still true t.oday.
believe that an inadequate balance of attentioo has been given to applicatiooorientcd problem; .
regard to both the nature and use of applications r epresents an essentja] and
ultiJMte requitetettt in the devel o p tent of practical catputer graphic syst.enS .
~.athenatical
gra{ilic appl.icatioos .
graphic prograrmcrs and analysts struggle over or gloss over the basic
as the catplex problems of the mat:.hem:ltical eleuents .
operational potential of catputer graphics is often
as~
~izcd
whenever the
, iUlCl use.
I t exmplifi.es the
rare
type of '-Ork that rrost practit.iooers stould wish to place in a prominent locatioo
for rrost disciplines. It is also well suited as the b<lsis for a oourse in a
cx:rtputer science educatioo curriculum.
I c:n1gratul.ate tho
s.
H. "Olas" 0\ascn
PREFACE
cx:mtU'licatioo and the re11 technology of catpUters. AlJrost everyone can expect
to be affected by this rapidly expanding techoology. A new era in the usc of
CXITpUter graphics,
not just by the large mrpanies and agencies \\ho ml'.lde rra.ny
of the initial advances in software and hardware, but by the general user, is
beginning.
Al.trough
new ways of pt:eSentlng material are given, no actual ''new" mathematical TMterial
is presented .
technical literature.
111 CTM
notatJoo.
ematical in nature rather than t.rose \olhi.dl <Nere rrore procedural in nature. For
this reason the reader will find rrore extensive discussions of rotatioo, translatioo, perspective , and curve and surface descriptloo than of clippi.ng or
hidden line and surfaro rerroval..
are given , along with generalized tec::hn.iques for rotation, translation, and
aro
and three-
to the mathematics of
srort
discussioo of
grapuc
HeM-
each user will in general find it r..eoessary to work within the oonfines of the
'1h:l furx1aJmnt.al ideas in this book have been used as the foln}ation for an
introductory oourse in
c:utp.~ter
It
J.S
~mjoring
in technical
It is also suiUible as
sore
advanced mathesratics
courses.
Further, it can
be
Finally,
Lratial, the f<-~t."Ulty, and espcc:ially the midshipnen was conducive to the
de~lop<r.nt
nurk of
nu:U.OUt.h COllege
PREFACE YN
\ole
~mny
people.
the entire m:umscript and made rrany valuable suggestioos, Rich .Reisenfeld \lh::l
reviewed the material on B-spli.ne curves and surfaces, Professor Pierre Be2ier
\lh::l reviewed the 11\llterial on Bezier curves and surfaces and Ivan Sutherland ....no
Special
aclcncwled~t
Olarles Lang, and Tcny Nutlx:Jume provided greater insight into the subject of
CCJ1l",rt:er graphics .
t-t.ach of the art ...orlc: for Chapter l has been provided t.hrough the good
Specific acknor.ol-
Fig. 1-S
Adage Inc.
Fig. 1-7
.Adage Inc.
Fig. 1-8
David F. JO]erS
.1. Alan Adams
CHAPTER l
INTRODUCTION TO
COMPUTER GRAPHIC
TECHNOLOGY
aro
A direct
interfaoo between the results of a CAD application and the neoessacy part
pr~xi'lmling
(miniconputer) controller to
roae eata
ation.
Th'
'lhe
application~
Interacti"\:! qrapucs also uses the <X1TpUt:er to prepare and present pictor-
ial rote..-ial.
picture as it is being presented; i.e., t:ht:! observer interacts with t:hc picture
m real t:.in!.
the 1000 lines of the picture are JTOSt oonveniently represented by a 1000 x 4
nutrix of hooogeneous OX>rdinates of the end points of the lines ,
n::~St
tion is
a 4 x
aro
the rota-
tran.sfornation rratrix.
I f this
To
mtputer cti.splays that al lo;, dynamic notion require that the picture
Even if it is assured
that the picture is recalculated {\4?d!lted) only 15 times eadl seoond, i.e.,
ever)'
Hare.
to l.ntcractivcly
T"DN
rJrarwli..ng can n:duc:c the t.irre to accntplish the required matrix multiplication .
lfodever, 0 pOlnt will be reached wnere this is no longer possible .
m'ly not
I~
accept.ab lP .
be reduced.
'llla <Xlllr
'Ihi.s is the
lnt:h this tcrmioology in mind the renainder of this chapter will give an
OVCIViL~
of cx:rput.er gratillcs
displhJS
~va.i 1<-bl,..
W<lre
~h....
am
1-1
~GRAPHI CS
CNERVIEW
!J:
catputer
gr~ics
as defined
abo~
can be a very
o:xt~lex
display lists and tree structures for preparing and presenting pictures to an
1\
Ne~
A picture
1-2
la>REsa-rr1 ~ P1<:n~s
To BE PREsENTED
F'\lndaJrentally the pictures represented in cnTpUt:er cp:aphics can be considered as a collection of lines , points, and textual material.
1\
line can be
(~,y ,z 2 ),
erators.
1-3
PREPARING
P1ctll.rCS
1n
t:ure.
very m::plex data bases wtudl require a oocrplex Pn'XJrM\ to access them.
'l1lese
<n1plex CaUl b-'lSCS ruy inwlvc rinq st.ruccu:res, tree st:nx:turcs, etc., and the
~tsclf !"~
which the user can reddil} invent sinple data base structures \\lhich can be
a~sed.
easily
'ttlcre are
trea~
nove the be5n, pen, cursor, plottinc] head (hereafter CAl led the cursor)
entit'l:
to t:he point, dra.<.> a line to that point, or draw a dot at thal point.
c..'O
F\lnda-
absolute or
l.S
'lhe largest. integer rnmber that can be spec2n-l - 1, where n is lhe nutber of bits in the
displays, t.his
1S
32767.
5\.{l{X)rt
CQlPUter graphic
~var,
diffl.culties arc cnoount:ered ~.~.ne.n larger integer ru::bers than can be specified
are required.
At.
first
'-'C
re:scnta>lc
val~ wi 11
result in the
y1eld the
fhen::n:na
Thew~
hcrog~us
generatia~
cal.l.OO wraparound.
out of this
di~ is to
'1hQ
tb~'ever, ~
use of
lil
.:lS
ami tra.ry
n\Jlber.
I(,
o:JUa1
c1
16-bit
were
c:arpu~r
~re
poNer
or
haxogunuous cxxmlinat:es
In this case '''e can let h = 1/2, and the CXX)rdinatcs of the
point are then def ined as ( 30000 , l/2y , l/2z 1 1/2) , all acceptabl a nUtbers for
a 16-bit CXIIlpllter .
In fact resolu-
tion is l ost in all the ooordinat2s evan i f only one of them exceeds the 11\lX.i.nun expressable mmbor of a particular <Xluputer.
1~
ne<X!SSa.ty
to note that
the data base usad to prepare the picture for presentation is alnost never the
sarre as the display file used to present Ute picture .
the total p1.ctura wile the display file represents only sare portion, vie.,r, or
The picture contained in the data base may be J:eSizcd, rotated, trans-
base.
f"any
nec-
views.
As
to perform
arrr
called cx:ncatenatioo.
'lhi.s process of
ed as discussed above.
lJ'l
so.ft..rare gen-
erallY is sufflcicntly t.ine CXlOSuni.ng that dynamic real- t.irre intoracti\'C qtafhj.cs
is not possible.
In ge.ncra.l there are two cypes of w~ - cllppinq <md scissoring . CUpping i.m.olves deteonininq whid\ lines or FOt"tions of lines in the
picture lie outs1de the wi.nda-1. 'lbose lines or portions of H.ne.s am then disin hardNare.
carded and not displayed; i.e. , they are not passed on to the displ ay devioo.
In the scissoring t.edlnique, the display device has a larger fhysical drl!Winq
space than is required . Only those lines or l.i.re segrrcnts within the specified
visible
e1.e1
than scissoring; e.q., clipping makes available a much larger drawirq area than
sd ssonnq . In scissoring, those lines or Se<JITClts of lines \'f'hich are not visible in the wi.ndc:7w are also drawn. 'lhis, o f oourse, requires ti.lre, since the
line gererator l't'llSt spend tiJm drawing the entire data base whether visible or
invisible rather than only part of t.'le data base as in the CAse for cliwing .
.In two dim::msions
w~
Fig. 1-1.
whether they are mtpletely within or without:. the windo.q or partially within
the far (yon) boundary at F , and the sides at SL, SR, ST, and
sa.
a:>nwrt fran t:he ooordinat.es used in the picture data base called user coordin-
ates, to those used 1::1} the displey device, called display ooord.irotcs .
In par-
~l.onal 0 1:"
U t:hree-
tn the
--
Wtndo ''
cn l trt l1nc
d ~P Ia ~ cd
!II
Lnc:
paru;~ ll y
"'1th1n
wwdow p~ll from b-e
d t\ph,,.d pall\ .t-h. c- d
no t dt:.pla ycd
I tnt entrtly
J OUISide O(
w 111dow no t
dt)p l aycd
~ di.Jrensional
windo.o~ing (clipping) .
Figure 1-1
-I
Figure 1-2
ional
frustun of vision w.indo.ol.
rcost general case oonversion to display exx>rdi.natcs within a specified t:h.medin'cnsional viewport~ a linear rrapping frau a si>Hu.d ed
[rustun
of
cant efficiencies.
\\hen a ha.z:d..rare character generator is used, the !'rogr& which drives the
qrapuc device nust first specify size , orientatioo, and the position
the character or text strlll9 is to begin.
,mcz-c
{k.lon being
p~sscd
the
th<.:
neces-
sary .Lines to c:lra\.. the c:haractcr, and draws the characters on the displ ay de-
vice.
1-5
t.l)c
In effect this
N\.ITCrous
inte~
flore sq::hlsticated
We shall
actiw device.
easily
~lied
to the proyram.
\>,'hen
I-OSitioned over a l.i.nc sc:qm:nL or other ll.ghted area of a CRr and activated,
the posl. tion of
The
JCI'f
SCITe
principle.
the catputer.
nature.
In particular, ro~t
The result.i.ng
siCJOials are convortccl fran analog (voltages) to digital signals using an analog
to dig.1tal (A/D) oonverter.
A joy stick is
sti&s, rouses, t.rad: balls, azrl similar devices are useful for particular
appll c:at.:lons.
IJ&C..'VC.r, they sOOuld not be used to provide very pr ecise posi tioo-
al information.
Control dials
a.c;
ti(');Cters clnd <lSSOCi..ltl'd circuitry such that the position of the dial can be
sc.::nsed using anal.oq to cliqlt.dl <X:lnvcrsion t.echrtiqoos .
syst:.e~Tc.
7.0:11''
~hiiiiCI
hullnn
1 l1h cr npltc
hunulc
I
I
Ph ~>lrnuluplu: r
C/
.__., Pu l~c
luhe
~hnl'lll!1
c trcull 1 > -
l et di~Piol)
cnnr 111llc 1
dja]s.
~cs
Li~ts
program.
1.ndicat.ing which S'"'itch or s.dtches are active are also usually provided .
The analog tablet is the ItDSt versatile and accurate devloe for cx::mrunlcat..irq {X)Sitional information to the mrputer.
can perform all the functions of a light pen, joy stick , track ball,
tion swi t.dles , or control dials .
IrOUSC , func-
It is also possible
to sense whether or not tho pen is in close proximity to the tablet surface.
acx~uracies of
:!:
:!:
Typical analog
tion in t1'IL! picturo-di..splay area are tied to:)ether by rreans of cursor (a small
visibl e syrri:nl) whose tTOtion on the pictl.ln! display area is in concert with
that: of the pen m the tablet .
JX)inting function , the indication occurs in the data base and rot in the displ.dy file. 'n1us, the proqrdlmlin:] is sirrplified. Also, dr~ or sketching
cr r-ointlng
~ing
Cml
be irrplcrrentod
trocnagnet.ic princi?lcs.
~of
these
'' '
''
'
'. . '
.........~'
-
,.....
'l)erating principle.
1-
1l:SCR I PT I(XII
OF Sot"C
TypICAL
E\Jncti.oo s.dtale:S .
will be c.cnsidered.
In particular,
devices - storage t\be, refresh, and raster scan; a pen and ink plotter; and
a dot oot.ri.x plotter - will be described .
storage tube display, also CAlled a bistable storage tube cll.st>lay, can be
oonsidered as similar to an oscillosoope \17ith a very long persistence phospl':>r.
A storage tube display is shown in Fig. 1-9 . A line or character will remain
visible (up to an rour) until erased by the generation of a specific electrical
signaL 'llle erasing prooess mquires about 1/2 serond . Storage t\be displays
have several advantages and disadvantages.
the
lao~.
CXJPY of lhe picture , and conceptually they are sarewhat eas1.er to program and
the
di.spl~ bci.ng'
scr.cwhat:
s~-cr
t.~e
user ar.3
'fule-
Vl.SlOn uses a raster scan tedmi~ (see below) to generate the reqw..red picture, ,,t\e.reas the traditional refres.'l CR!' gra!Xllcs display is of the call igraFhic
or li.nr-draw.i.n:] type.
elerents in
verJ rapidly,
CQ'ISt.ruct.: t."'"
rate.
enUre picture
rnny
nus is
A refresh ra~ t."lat is too ].o..,. \..:ill result i...r1 a ~"nrCCOO called flicker .
'Ihi.s is SL'!Ular to the effect "ttich results fran runni..ng a rrovie projector too
slew.
sequ"..l'lre
fu function of
refresh rate.
~lay
is obvious:
'lbe OOiplexity of the picture is l.i.mited by the size of the display buffer and
ture can be \.{)dated every refresh or, say, every other refresh cycle if dolble
buffering is used.
drcr,.. the mcplet.c picture exists in the display buffer, any individual ele!mnt
or
a refresh CRI'
graphic device is the relative difficulty of abta.i.nirxj a hard oopy of the pic-
ture.
1\lthough refresh CRJ' graphic displnys are generally rrore e>epcnsive than
storage ttiJe displays , the above characteristics make them the Uisplay of choice
when dynamic rrotion in real t.irre or very rapid interaction with the display is
required.
A raster scan CRT grafh,ics display uses a starxlard television monitor for
In the raster scan display the picture is cnrposed of a
series of dots.
These dots are traced out using a dual raster scan t:.cchniqoo,
ccn-
ques this is
~9
rrore feasible .
disadvanta~
what sl011er, the selective erase feature is rrore difficult to inpl.erent, and
they 11\:lY be directly
interfa~
plotter.
F~g.
types - flat-
the plotting tool, which need rot be a pen, noves across the plotting surface
ll1
generally station-
ary aro
--
_.... _,_.
--- - --
ing tool.
-~
,;::;;JI-...c..-- -
the paf>"'r
-::-~
and forth
uroer
the rrork-
O::crpared to CRT
sl~ .
grapucs deVl.ces
COnsequently t.'"eey
--
~~
...-.:.
~'
-----~-- L
_____.-'" - '\.
......
-~-<..:
--:11.:-..T>
-__
-
oot
a coubination
no--ever, where
-'
-- --- ----------'
----
__,-
~ck
--
---------
. r=::
c:..
-__,....--:::
=
~which
lS esrployed .
In detail, a specially
coated paper which will hold an electrostatic charge is passed owr a writing
head -.,tu.ch oont:cu.ns n ro..- of SJMll
per inch
iU'1:'
ial paper.
typical.
~-riting
nibs or styb..
charged P<l?"r is passed over a toner which is a liquid oontaining dark toner
particles.
~
then visible.
Very
high speeds can tx> d:>tainOO, typically fran 500 to 1000 lines per minuto .
'lhe elccLrosl..c:iUc cbt rnatri.'< printer/plotter is a raster scan device; i.e. ,
1t. pres~ts
'll'T'
A further cti..ecedvantagoe
1..9
relatively lew
th.. very high speo..-.d wi th "''hich drawing!> can be prtdloed and an excellent reli-
ooility rcoord.
Figure 1- u
Drum plotter.
,
Pll pe 1
drne
I one r
upp iJCiltor
Rcill
e lee t rode
.._ ....
OJ
-I
Pa Jl e r
$Uppl)i
1-7
~It'"!
sate
t~Ethods .
f'irst let's consider the difference beb.'een a passive and an active grafhics
d>vi~.
i.e., it
alla..~S
are
c1
EXillTplcs
oot matrix
printer, pen and ink plotters, and stor~ tlbe cathcxie ray tlbe (CXJ') and refresh CRI' devices . Exar.'plcs of sate of these deVices curl the typical pictures
that th~ rniljht qenr;:rab: an. sho..-n in fig. 1- 10, 1-U, and 1- 15 t.h.ro\ql 1-20.
'!be
re~r
might wonder aboot ronsidcrinq thP tel etype and the high-speed line
printer as gr.J(..hics devices . l~ver. the'; have been used to drcr,... sirple
qrafhs or plots for a nurber of years .
,p
-
rill
J.
I
~~iii:'!
..:
Ill'!
:;;;,
1.11
:00
Figure 1-17
~ CRI'
graphics device
and typical ootput.
=--"'\~
~r
-----
c: ..
~~-::
~r---
;:..a,;
....
-------
-.
--w
---
__
-
. c;,.r- ...__
4
......_...._........._
--~--..,.._.
--
--.- =-=-.:-:
-- -,...
...
- -- --
.:w-..--
- c::.c-
__
:--- - .t;
,__
....,..
a---......,...
. - __--..... _. -
.--.-...
C"'".._.....
--~-
..Cl.::. ---.5
----=.
;-_:.:
_....__,.,.
.......
::----...,._ - -:e.!:.
~:::."--
c:
--
- - --..
___
- _ . --.--- --- ----- .
..,.....
-~~-- -
~.
..........
c.::~ , z~:-
- ,.....::
--- .. --
.......-.-- - ,,..
"
..;"' ,_ .. t -
---
-~-.:
":.~
....,_~
_._
~-~
'
-~-
~.,_
~ -'\.-
=~
''::"~-":""~.-L'-
..- ~
!WI---.:.
--... -
- --- . n:--.s:r
- ... .... . .
.... .,_
--
...,_._,_
- - -~
- e; ----
i:"
~-
_.,_
~.:a-
- --- --
---
:"' , i: =-s.
:J:ii----
- - ~--
-....,
-- -,.,..._,.,..
--- --- :.-.;
..__...,.._
:.
~--
...
---:
. - -
....
~_.,__
~~~--
----
f'=oii_,___
-.:
.,_.
......
..-...,;; --~
llo
............
... -
...
.. ..
..
..
.,
"' I
ol
....
... 0
..
..
..
'
....
.
.'
'
...
... .... -
"
..
..
.. ...
....
.. -1-PI' ........
....
..
..
it
... .........
..
t 'I
..........,,,
....
.. ..... .
..
. .. ..
...
---
.,
I
fI
(' )
21
'
I f points are plotted close enough t:.ogether , they will awear to the eye to be
a solid line.
All the storage tli>e CRl' and rrost refresh CRI' gnph.ics devia:!S
devi~,
devices.
5atc
'l'eletypes, hi<jl-sp:'ed
line printers, and electrostatic dot matrix printers are classed as point'lhe uti 1 i ty of a device can
pl otting devices .
f~y
aro :
be CX)OSl..deted in tet::ms
! 1/20
i..ndl horizontally
a resolution of
:!
may have
0. 01 inch.
In the case of a
al
a CRl' beam.
or
It
depth to a picture.
description
or position
Of
C'Olli'SC ,
aro
the
the transfor-
mation of these gearetric entit ies can be accarplished mathenaticaJ.ly independent of any display technique or display software.
REFERENCES
1-1 Newman, ''~ t-1.. ,
am Sproull,
1971.
CHAPTER 2
2-1
ltrrROIU:TION
~1e
p.lter
and llJleS .
Me
rtUcs.
late, distort, or develop a perspective view of the object . All of these transformations can be ac:carplished using the mathematical techniques discussed in
thi!i and the next dlapter.
'2-2
ltP~scrrrATJ CX~
OF Ponrrs
These
(x y).
lS
used .
ly,
c1.
cl
ruions t:>r by
rotrlc.x:s like
[r]
r~J
in three di.Jrensions .
Alternate-
[ J in
bNC
A series of points, ~ of
25
Lines can
2-3
'111e
rules of matrix algebra define allaVclble ooe:rations on these rntrioes (cf Appen-
dix B) .
Nr = B.
In this case the solution is T ,. A- la, where A-1 is the inverse of the
matrims
A and T
'nle
of the matrix B.
~trical
2-4
(x y]
[:
:]
[(ax + cy)
os
(bx + dy})
[x*
y*1
(2-l)
'lbis mathematical rotation mans that the initial CXX>rcli.nates x and y are trans-
= (bx + dy)
We
are interested
CXX>rdinates .
=d =1
arrl c = b = 0 .
~,ses.
y)
l~ ~]
"'
[x
y]
= [x
y* )
consider d : 1 , b
=c
= O, i.e.,
(2-2)
(X
produo~
'!his
r :1q. 2-la.
[~ ~ J
y)
(ax
y*)
y) = (x
(2-3)
r-o,., consider
b c
=- o, i.e.,
f~ ~J
(x y]
= (ax
dy]
= [X*
y*]
(2-4)
2-lb .
en.Uw~rent
b - c - 0, d .. 1 and a
(x
-1.
'Lhen
[-~ ~] =
y]
(-x
Y1 =
[x*
If b = c
If b = c =
o,
(2-5)
y*]
= - 1.
Note that
reflection, stretching , and sc:al.ing of the ooordinates involve only the dia<JOM.l
tcnrG
[~ ~]
y)
= d = 1,
= [x
(bx
arxl c - 0 .
+ y) 1 =
[X*
'Ihus
(2- 6)
y*]
= 1,
to the y-c:xxu:d.t.nate , as
Of
the qcreral 2
(x y)
:J
[: :]
= [(ax+ cy)
(bx + dy)]
[:
or for the o rigin,
[0
IIP['P '1\"e
OJ
= [0
0 ) = [X*
= (x*
y*)
(2-1)
y*}
2 transfonmtion.
'ltn s is a liJTU t.ation whidl will be overc:nre by thP. use of haogenrous coordinates .
) .)
,.}
[~ ~]
p
I
>~
,, ,.
-.
I'
' ,.
,.
[~ ~]
T=
- --
T= r-10 -1OJ
~ ~
,,,.T=
" ,.
!-
I'
'~.
....
[~ ~]
h~
".
,
.
.T
[~ ~]
(\'\
I'
h\
',.
"' ".
~ "'
Figure 2-1
2-5
\. \
,,
I'
I.
\ , A
,,
~ [-~ ~]
TRANSFORI'V\TIOO
OF
Transfonnation of points .
STRAIGKT LINES
A straight line can be tlcfined by bov rosilion v.....ctors \olhi.d1 specify the
CXJOCcli.ndtes of its end (X>ints.
uq these b.."t> points can be
~
c:::hatY.Jed
actual q>eration of dro:JWing a line bet\-'{!(:11 two points will depend on the
Hen. we cx:m sider only the mdUtunalical operations on the
(2
u in a
~ional
3) rest=eelively.
CJ.re
(0
plarE is
11
aro
[~ ~]
(2-7)
....tuch
.,.,'C
~.Sing
~w
AT~
to 11
CJl.Ven by
[~ ~]
(J
1) A*
(2-8)
8'!' :
(2
(2-9)
3)
Similarly 1 B* is a
= 1.
LT ""fo 1] '"1 2] = r3 1] .. L*
l2
3 l3 1
rror:t be
(2- 10)
u1 1
"''here the mtp:ments of L* represent the transfoll""Ed position 'v'ect:ors A" and
B*.
tial axes are x,y and the transfonred axes axe x*, y *.
2-6
am
'Ihe ini-
MIIYOINT TAA~SF00"1f\TION
Figure 2-2 sho..'s that the 2 x 2 transfOllMtion rratrix tral'.sforms the
straight line y =
}' a
{3/4) X
o:::nsider
B.
t.~
Letting A
= [xl
Y1l, B = (x 2 y 2 ) 1 and T [:
{X)ints sir.ult:aneously
gives
[:~ ~~1 r:
:J
r:~: :~
(2-11)
A*
= (axl + en
B* {ax2 + c.y2
bxl + dyl)
bx2
= (xl
+ dy2) =
Y1*l
<x2*
Y2 * )
(2-U)
] [: :]
ay1 +
<TJ2
(2-13)
the
rniqx>~.nt
of A*B* is giwn by
ax1 + cyl
x =
+ ax2
cy2
bxl
+ dyl
+ dy2
t- bx2
r - ----...---2
=----..,.,----2
bx1 + bx2 + dyl + dy2
2
------=----...;;...
(2-14)
uli~t
of line 1\B is H1
'1hls transforms to
2] .
[1
2]
G~ J :
[7
(2-15)
4)
rep"'.lt.ed
for any
subset of the initial l i.ne, and it is clear that all points on the initial line
Lransform to points oo the second line .
to one correspondence bet..;een points on the original line and points on the
transfor:rred line.
2-7
redrawi.n9
nEM
PARAU.L LiNES
Y2- Yl
(2-16)
mt X2 - Xl
xl
[><2
Y1
Y2
[a b] =
c
rnx1 + cyl
yt]
Yi
[A"]
(2-17)
B1t
:::0
or
b+d
m 2-a+c
Y2- Yl
x2 - ><t
Y2- Yl
)(2 - )(1
b + dnl
~
a+ on
(2-18)
12
I(I
10
T:
[~ ~]
l
( 1/2 J/] lA
l
6
) .\ .
4 ...
2
- 4-
0
0
ll
0',\
~ H13
IU
12
'"
2-2
Figure 2- 3 Transformation
of intersect.ing lines .
Figure
Transformation
of straight llne:s.
2-8
INTERSECTING LINES
'1\-.lo dashed 111tersect.ing lines AS and EF are s.ha.m in Fig . 2-3.
'Ihe
~int
4/5 and y = 1/S. We no" rrult.iply the rratric:es oont.al.ning the end points of the two lines AS and EF by the transfonnation matrix
of intersection is at x
[:
~] .
'll\us ,
- 1
2
3
2
-2
-3
- 1
_!!
2
12
romrs
-1
-1]
[1
[ ~
3
2] -
1 -3
A'llD LINES
31
-2~ 1
3
This gives the solid lines A*B* and E*F* sho..m in Fig. 2-3.
'lhe transfamed
point of int:ersect.ion is
[~ ~)
[l
1)
'lhat is, the point of intersection of the initial pair of lines transfotli'G to
the point of intersection of the t.rclnSforned pair or lines .
Close examination
2-9
fbTATION
Consider the pl ane triangle ABC s.ha.m in Fig. 2-4a .
1 [01]'"'
4 1 -1 0
2 1
-1 4
-1 2
r-1
(2-19)
13
0 -1
Note that neither scal.in;1
lo
-1].
2-10 REFLECTION
~\!lereas
a pu.re
~onal
'IWo
=x
[EF
occurs by usinq [~
~]
(}'
!:>
s ,- ro
~6
J. .ref~on a::xr~ y =
oJ
....' e-
,(.
2-20)
6.
fr.::clfl _,0, .
..
(;
a-'"C
s-h~.
by
~.q
sca 1 ~ r.g
a l- 1
7
.e
-~J
--
-l
2]
~-...e r:...~.sfot~ar::oo cf
cf t."le ratri.Y..
If the
t'iltr-Y.
-4
t;.O
r2 0 .:.S ..:sed as
.0
te~
Zi!".
or.
mat
2j
o f a ~~"l'il~, a .. 2-t.i:'cs e.-: .arge: -er.t. occ;.n:s abo"~ the oric;.r. . If the r..ac;nitn1es nre ur~l, a d.lSt.OrtJ..on oo:.-.!..""5 . ~..t:S= eff~...s are sha--n i:-. fig . 2-'>.
Tria."]!~ 1-& if: t=c;J"Sfc:::;:-.-,d
at 2 Q'j ;
0 :2
33
{~ ~] which yields
.~
I
1\ t-
~
;'
(\
~ ~
'
'I
It
~~~
'"'
I)
- {
-'
">; "8
,_
~
--
\
\
,.
(x y] .
If a 90 rotation is follo.,'ed
verti~
of a triangle
0 1] "'
y] [
[-y
x)
-1 0
and then
(-y
en the other
X)
[-~ ~]
(- x
y)
given by
y] [
(X
-~ ~1
[-x y]
and
[-x
y) [
0 11
-1 0
(-y
-xl
is d:>t:aizled .
So far we
ha\."C
C:Vt.l'll
lS
All other points within the pl ane of the coordinate system are trans-
ferred.
pla~
Exanples
2-13
TRANS FO~\ATIOO
OF A ~IT
O::nsidcr a square-<Jrld
'lt~
SooAAE
~l:k
four position vectors o f a unit square with one CX>J.'Tl& at the origin of the
outer oorner -
:J
transformation [:
::
:
~e results
~ ~ 1[:
~ ~J
:J- ~
la: c
(2-21)
:::
b : d:
= (0 OJ. fUrther, ootioe that the coordinates of B* are a;JUil.l to the first
row in the genera l transformation matrix, and the coordinates of D* are t:q1..li!l
to the scoond row in the general transfo.rmation matrix.
01 and [0 1) respectively)
of the unit square are o riginally parallel and sinoe we have previous l y shotm
that parallel l ioos transfoDn into parallel lines, the transfor.med figure is
a parall elogram.
The effect of the t..enrs , a , b, c, and d in the 2 x 2 rrotrix can be identified Sep<mltely .
~ in they- and
,IP
shea.rin:J
35
..
l
tJ'
~-
-x
Before
After
as follc:MS :
(a
t-
~(c
+ a + c)
which yiel ds
(2-22)
initial square
aro
parallelogram~
is a function
figure~ is
SUTI
~by
(2-24)
2-14
AAB ITRARV
2 X 2 l'bTATI~
de~
r'ATRJX
~~ICAL IEJ.fm'S
36
))
= -(l)sin6
..
_..,.
roN,
the general 2 x 2
rotation rratrix is
I
- - _.._______...0....__ ~B X
0
)...
(2-25)
c:os9 sinA]
[:-sin p cos 6
[_~ ~]
In effect F.q . (2-25) is a mrbination of scaling and shearing ~ch leaves the
2-15
amitraey angle e.
Two-DJtelSI<lW... TRANSLATIOOS
AND
and llnes or the figures or shapes resulting from COJtbinations of points and
li.Jl,e,s .
Foll.ow.l..ng
Fouest (Pcf. 2-2) we rote that this difficulty can be overc:x:JTC by introducing
a thlrd corponent to the p>int vectors {x y] and [x* y *), naking them
[X
1) and [x*
matrix, say,
Y"
1) .
'Ihis is necessary since the nurber of ooh.rms in the !X)int nntrix nust equal
the llUiber of
ro.tS
1)
'Ihus,
0 ' = [x + n
y + n] "" (x y]
(2-26)
0 1
m nJ
where W"e note that the constants m, n cause a translation of x" and y relative
to x and y. tblever, a 3 x 2 rratrix is not square and thus does not have an
'Ihis difficulty can be
ovenx:t~1c
by utilizing a full
3 x 3 matrix, say,
0 0
0 1 0
m n
as the t.ransfonmtion matrix .
vectors i s not affected by the addition of the third col~..~~m to the transfo:tm:ttion matrix. Using this matrix in SJ. (2- 26) gives (x* y" 1] for the transfonred vector .
'lhe adCi +-..ion of the third elarent to the position vector a00 the third
y'* 1} .
that (X Y Hl [x
H ,. l.
If, t-o,..ever,
W"e
fomation matrix T is
rather than
r0
0
ll
matrix rrultiplication yields [x y
l )T = (X
H) , where H
1- 1.
'lhe general plane in 'Whidl the transforrred position vector rt::M lies is in
th;t:'e(~.immsional
what happens in
space .
ing ftun the general plane back onto the plane B = 1, using a pencil o f rays
thrcu.Jh the origin. 'Ihis effect is shewn in Fig. 2-8. Csing si.rnilar trumgles
\o.'e see that H/X = 1/x* and H/Y ,.. 1/y* .
With three ca1pooents it follo.-."S that:
X y
(2-27)
(x*
"*]
= [:r
H -H 1]
H,
sc nc rat
plan CHII
and
y =
(2- 28)
2], and (3
1]
of calculation we dloose [x y
For ease
2] .
y*J - rx yJ
*Note that here we have put the result of the tr&'\Sfotrnation oo the left-hand
side of the equation rather than on the right-hand side as was done previously:
i.e . , we write rratrix equations as B = AT rather than as 1'\ = B. Fl:an hereon
we w1.ll adopt this c:onwntion for ease in translat.i.ng results into cmputer
algori tlurB.
romrs
J\ND I....INES 39
= [x
(X Y Hl
in hatogeneous coordinateS.
that X
= x*,
= y,
1]
and H .,. l.
unity, the transfonrod hatogeneous coordinates are the sasro as the transforrred
In general, H 1- 1, and the transferr-ed ortli.nary coordi-
ordinary coordinates.
and
y* -
(2-29)
c d q
m n s
where space is new available to include other traJ"I.sfoxnations such as translation.
n-.e
scaling and shearing effects of the IMtri.x terns a, b, c , and d have bc-0
sho.m previously.
Y H}
= [x
11
0 1
Here X x, Y y , and li px
= Lx
(px
+ qy + 1))
(2-34)
'lhi.s transforma-
tion is sho.m in Fig. 2-9, where the line AB in the two-dimensional xy-plane
is projected to the line CD in the
t;le
,.'rite
X
X
x*-n=pX+qY+l
y
y* ; if
y
pY. + qY + l
3) and B, (4
'
.)
>"
2-
-'-7'~o- . -
'
. ..
II I
Figure 2-9
4
2
:x* l+- 4+l =J
1
y*=6
and
3/ 5
l) aJ".d [2/3
1/6
1) respectively .
= 1.0.
rn back onto
Cdl\
I
1
-m ---n ' s
1
l..s we have seen a , b , c, and d produce scaling, shearing, and rotation; m and
H) "" [x
1)
0
1
lo o
01 (x y
0
sJ
s]
(2-30)
= x,
Y :: y , and H = s .
41
'1his gives
X
~-9
'lhe effective transformation is [x y
the p:liSition vector.
1]
(x/s
2-16
Po iNTS
AT
INFINllY
of rrapping a set of (X)ints fl:un one coordinate system into a oorresponding set
in an alternate exx>rdinat:e system.
system will rrap into a finite range within the second coordinate system.
1\l.so,
lines which are parallel in one system will usually not be parallel in the ot:l1cr .
x+y
2:x+3y=O
matrix equation
[x
1)
[0
0)
1 -3
l-1
Ho..oever, for a matrix to have an inverse it must be square . '!1)e follc:Ming representation of the sane set of equations can be used to rreet this rcquirenent;
(X y 1) r 1
2 0 e [0 0 1]
(2-31)
1 -3 0
l-1
t-fl
,,/~
j ol
55
LS
~tiplying
0
1
.J
11C1 and
noting that
lrC1 = I,
the
[x
l
11 'S" (0
-1
ll
x+v=l
~
x+y=O
Proc::ee!ing as above leads to tt.e r.atrix EqUdtion
(x
1) ~ 1
01
(0
1)
1 1 0
..-1
fb.'C\.'C.r, C\te.:'l
an
lj
~rse,
11
[0
gLvcn by (cf
~.
2-3)
(2-32)
x)
1 1 oI
-1 0 o..
The :i.m:erse of the 3 x 3 rratrix in Ec;. (2- 32) is
r~-1
r~ ~ -~l
Ll
-1
1] ~ (0
x)
ro
-1
o. .
l1
~
-x 0]
-11 - (x
x[l
-1
01
(2- 33)
In ge."leral,
'Iho fuct that a vector with the harogeneous carponent 11 equal to zero OOe5
Sh.'Cn be1cw.
calli r.<:J that
3] .
Re-
Y) [4
in all
t.~e ways
See ~f . 2-3 .
Note t:Mt
lll
Tal;le 2- 1 as tH>, the ratio of yi/x' ren:rlrs at 3/11 as is rEqUired by the gove...>ning cqt2tion.
SIICO"!SSiW
paj rs Of [x
11
= (m
(I)
1) is g~ven by (X 1
H)
43
Table 2-l
Harogeneous Coordinates for the Point (4
H
x*
l/2
1/3
l/4
16
40
30
400
300
3)
l/10
1/100
[4
0) in hCiroqeneous ooordinates.
(1
0) represents
2-17 T\'K>-DweNstONAL
Previously
<Ne
fbTATION
the origin,
performing the required rotation, and then translating the result back to the
to
1)
1]
0
""'1'1\
-n
rc:ose
-sine
sine
cos a
01
~J
r1
(X
'i
H)
(2-34)
By
canyinJ
(X Y H) = [x y
For e:-carrple,
1) f cos6
sinO
0, (2- 35)
-sine
cosl3
+ n(si.ne)
-'"1ll (c:xl50 - 1)
3 ) and
lJ
it is desired to
~tion
by the matrix
0 1 0
-1 0 0
0 0 1j
causes a rotatiGn about t:.hc origin, rot the ooject axis .
~~
procedure
l.S
As sho.om
above , the
r1
-4 -3
then apply tr.e rotation mat.rix, and fil'lally translate the results of the rot.:r-
tian bac:X to t.'ic original center by rreans of the reverse translation rratrix.
'Ihc: entire q:Jera tic.n
[X
H]
[x
1)
L-4
-3
o1 rl 0 01
0 -1 0 0 0 1 0
0..,
1,;
l4 3
1J
(2- 36)
1J
[X
'11-.enl x
H] = [x y 1)
ol
-1
-1
(2- 37)
1J
c.
REFERENCES
2-1
f'ox1
L.
PresS 1 1.nndon 1 19 64
2- 2 Forrest, ;,.
P. .
~t N:>.
2-3
45
Displa~, ..
,.
,.
>"
}
\
\
CClS)' SlJl)
0 -silry oosy
\
\
.->"
'{.
""I
I
'
->
,.
oosa
0 -sl.nS
,..
"
sinS 0 cos
,.
-' -
\
\
\
..
.,.,.
OOSil
sim 0
.
-smn
coso 0
0
>"\
}'
\
\
\
\
...
,..J
..>..
...
...
'
c
CHAPTER 3
THREE DIMENSIONAL
TRANSFORl\fATIONS
AND PROJECTIONS
f~W to
nus
oolds
1.n
mmy cases,
it at ann s length, stands back fran .it, etc ., in order to obtain an under-
To
oo
lx y z
to
1)
or
IX Y z H).
[X Y Z H) (x y z l)T
X Y Z
(3-1 )
coordinates is
ab cp
(3-2)
defq
hi j r
tmns
The 4 x 4 t.ransfonnat.ion matrix in Eq. (3-2) can be partit.loned into four
sepsrate sectiCX'lS:
3
-------1 X 3 I 1 X1
'llle 3 x 3 ootrix produces a linear transfomation* in the tonn of scaling, shear-
tion vector with the 4 x 4 matrix arrl normali2ir3 the transfomed vector i.s
called a bilinear transfomation. nus gives a cutbinatioo of slwari71!,, weal
ScALI t-.6
overall scaling .
Consider
(x y z 1]
wch
a
0
0
0
0
e
0
0
0 0 = [ax ey j z 1] : [x* y*
0 0
j 0
0 1
2*
1]
(3-3)
elerent, i.e.,
(x y
11
1 0 0 0
= [x y
z s]
0 1 0 0
0 0 1 0
0 0 0 sj
= (x* y"*
z* 11 (~
l.! 11
s s s
1.
0 ll I
o1a
c.lOl
t
'
f9
S l I
20:1
,1 I l ).
o;oe
0 l DI
0 0 l 0
011
2001 OOC1
: ) 0 l
1'
fi 0 0 0
I 0 0 I I
1 o1 1 r
llClC
1 I 1 I I
A 0 0 0 1
8 00 1 :
c o ac J
,.
Figure '3-1
C . 1~
O.l
l
o.
I
I
-.n
-o.~
-c.n
--c.a~
o.~
0
1
l
:1'
O.f
I "'
c.
r. 1 0 II J
I 1 0 1 I
'
&.!.
0.15
l.~
I
l
l t
I t
0 l I II 1
J ' 1 l 1
0.1S
0.1~
0..
'~
1.1~
l,<l'j,
D 0 1 1 :
-c.,.
1.,
t' ,1!;
!9
0 0 0
!s
!s
0 0
3-3
0 1
T~E-DIMENSI<JW. SlAAJNG
The off-d.iagcxlal terms in the upper let 3 x 3 CXli{XOt'lent mat.rix of the gen-
1 b c 0 = (x + yd + hz
bx + y + iz
ex + fy + z
1)
d 1 f 0
hi 1 0
0 0 0 1
A siJtt:>l e t:hJ::ee-dirner1Siooal. shear on a unit cube is stxlwn in Fig. 3-lc.
3-4
T~EE-DI~I<JW. RoTATIONS
In the previous sections we saw that a 3 x 3
cx:up:lC'lent
matrix produced a
we
examine
ional rotation
the rotation of a unit cube in the same m:mner as discussed in Sec. 2-13.
e about
the
'lhis
x-axis
given by
T=
1
0
cose sine
o -sine
0
cos6
(3-6)
0
0
final result.
=~I
we have
T =
cos 0
0 cos6 sine o
o -sine cosS 0
0
cosa
. 2e
Sl.n
-sin~
sin
0
cos
-sin6
cos6sine
2
cos8sine -sine cos e
0
~J
cose
('3-9)
01
On the other hand, the reverse operation, i .e . , a rotatioo about the y-axis
e=
~1
0
sine
cos9
0
0
T = cos
0
sin
o -sin~ 0
1
0
0
cos 0
0
2
1
0
case
-sine
-oost sin6
case
sin
cose
sin&
2
sin6 -cos6sine cos e
yields
I
(3-10)
01
o
not the sc:ure. The fact that three-d.iJrensional rotations are oonoc:mrutative nust
be kept in mind when tJDre than one rotation is to be made.
'Ihe result of transformatioo. of the upper left object in Figure 3-3 consisting of
by Eq. (3-10) is perfumed , the solid figures shaHn in Fig. 3-3 graphlcal ly
dem:nstrate that different results are obtained by changing the order of rotation .
f'requently it is desirable to rotate an abJect about one of the cartesian
coordinate axes .
y-, and z-axes.
3-5
In
For a rigid-
0 -1
..
../
0
0
0 -1
../
)
)
'
-r---71
//
/ I
f. ...... /
J--~--j
//
z
, I//'--..'(
/
~ .......
I / /
' ....V.,..
/
'
Figure 3-3
0 -1 0
/
/
-x;
------~
I
.,.-" I
} - - - ~ ~-- ..) ,~
/
J&.-.-~--1-
___ _v /
.,.
/;/'
0/
l .l "
0 -l
1 -1
0 -2
1 -2
0 -1
2 1 -1 1
2 0 -2 1
2 1 -2 1
1
1
1
0
0 1
0 0
0 0
0 0
0 0
-1 0
0 1
r1 0 1 1 A*
111 1 B*
l 0 2 l C*
1 1 2 1
D*
2 0 1 1 E*
2 1 1 1 F*
2 0 2 1 G*
2 1 2 1 I*
sign.
1
0
0
0
0
1
0
0
0
0
-1
0
0
0
0
0
(3-11)
54
l'~CAL ~
The reflection of a uru.t cube through t.~ xy-p1anc is shc:7..m in Figure 3-4 .
For
-l 0 0 0
(3-12)
0 1 0 0
0 0 1 0
0 0 0 1
and for a roflcct.i<r. t:hroogh the xz-plane,
T= 1 0 0 0
0 -1 0
0 0 1
0
An
(3- 13)
0 1
1\ppendix
c.
oo
obta.ined by a oanbination o f
3-6
[X Y Z H) [x y z 1] r1 0 0 0
0 1 0 0
(3-14)
0 0 1 0
t mn 1
'
= I (x +
t)
(y
+ m) (z + n) 11
(3- 15)
It follo,.s that
x"' ~
x+ ~
H
(3- 16)
y* = 'i
= Y+m
H
z"' - !H = z + n
An a1gorithn for translations in three dimonsions appears in
3-7
l\ppe1ii.x
c.
discussed m
axis in
sec.
2-7.
t.hr~sional
space.
ject and the desired axis of rotatioo so that the rotation is made about an axis
passing l.hrouqh the origin of the ooordinate system.
th~im:!ns1onal
(X Y Z H)
= (x
y z 1]
0 0
r1o o o
0 1 0 0
-11\ -n
-t
(3-17)
0 0 1 0
t mn 1
where the eleSJents in the 4x4 rotation matrix R are in geroral given by
2
n1 +
(R)
(1 -
n1 ~(1
n1 ~ (l
'1 2l008 D
oosO) n 3sJ..ne
n1 ~(l -
n/)~
~n 3 (1
008) -
~n3 (1-
(3-18)
C060) + n 1 sintJ 0
(1 - n
2
)0C1Sll
3
o
l
"2~1n
.1.S
given in tho
next section.
Fqu.ations '3-17) and (3-18) can be nserl as a basis for c::arputer software
algoritbns .
3-8
oo.
Ps
u. This will
cx::nst..ruct.ed to be parpendic:ular to PQ. To determine the elerrents in the matrix R, we rrust relate the transformed coordinates of
P* to three variables: the coordinates of P, the rotatial angle () , and the
This dcridirect.ioo of the axis of rotatioo as specified by the unit. vector n.
perpendicular to
J.S
=cosy.
The angles a, B,
of 1:.~ ~t ~_or
wc':.Or
.. .. .. ,
..
0 = qlI
q2j +
c;.j. tlu.s
tr.it
sl
/q1
g1ven by
a.."ld
n.
~ts
%-di:'~..l.a'Ui
It folla..'S tr.at:
tesfE!Cti\lely.
0.1
"" n
COS'l
;'
ql
... q2
q3
q2
oos3 -
--:::::::::==::::::;==::=: = "2
/
2
0-1
0.2
.,. q3
q3
COS'(
t""d':.r!.X
form t.l-Us
I ql2
+ q2
tr.e.'l given by
n ..
!.."'1
--;:::::;=====:;- n3
15
q3
"2J.... + nl~
as n {"t "2 n3] .
"11
written
...,..
Z<
~....or
'
'
/
_ :;/
I
p"
-J
t)l'?-=:;:_-=
-:--- - 1
Figure 3- 5
, ..
.\
P . ~ .. IP nlcos~ IPI~
.P =
..
where is the angle bet....-een the tw:> vectors, as shcl.m in Fig. 3-5.
since
[x y z) and n
(n
form as
=~
YJ7
[x y z}
'1.
"2
"3
.....
n x P det n
t"
+k
X y
cross product is
+
-n3
-"2
'1.
"2
-"1
n x p = (x y z)
+ is again
...
1n
.....
x P
.. ,....
n
P sino) =
.~
P sin~
'lbe foll.o.oling three vector equalities are obtained fran Fig. 3-5:
0 + ci p
(3-19)
(3-20)
(3-21)
.......
4-
....
....
Fran Sl (3-21), oP = (P - Q} .
OS IOPicos9.
Thus
QS,
CS
(P -
..
Q)cose .
QP,
is given by
m 1bining
P.
= Q+ <P - Q) cose
sP*
'nle ch.rection of
s'P
is
P.
loP,sine
>=
IP - olsine
to the plane F'Ctl and is therefore
.. ..
u= nxP
...
..
1n x PI
...nxP.
IP i sin~
- -
n x P
SP -
P)sW
rut
loP!
zo
IP - aro
-.
p - Q Sl.n J
Str.~
thus
en x P}s1.ne
~ ~
Fl.9'..:.re 3-5
of rotation.
t:Sl.."lg
..
'lb! mag:nita'!e of Q
o..
p
As r~,
the e<;Uality
l..S
J.S
<P;;)n, r.q.
(3- 22)
....
:z: ..
(3-22) beocJres
{Pn)n(l - cose) +
~tion
this
Peose
...
is n.
(n X P)sine
we
point, the angle of rotatioo , a."ld the d.i..rectioo o f the axis o f rotation.
:.trite this result m rot.n.x form.
...
ro.~
l!smg the Ntrl.X ex-press~oo give."\ earlier for the dot pro:3uct (P n ) ard for
the cross product
x P), the equat.iC!'l for p beo::m...>S
~ (x y z) n
1 !~1 ~ n3J (l - COS7) (x y z ~ t lx y zl 0 n 3 -n 2 Sln (3- 23)
(n
-r.
2
. r.l
~
"2 -'1
P '"' (X )'
l)
r n1
r1 n 2 nl':l 0 Cl -
r:l:-"2 ~
"J "2"3
n1
COS J
r 1 0 0 0 C08
0 10 0
n2"3 0
2
n3 0
+ " "
~ -n 2 0
SUl
()- 24)
-n3 0
0 0 1 0
u ~
LO 0 0 l J
1'11P. three t.erTT'S within the braces give- the required rotat.ioo rratrix (R] .
ln 1
As
an::l n
1.0.
ax1s
t.~
z-<lX.ls.
'~hen
n = 0,
1
~ =
O,
R=
r COSH
59
sine 0 0
cos., 0 0
-sm
1 0
0 l
3-~
3-9 AFF1NE
GEa-t: 1RY
The idea of a vcct..or Lo describe a point. was .initially oonc:civcd frQI'" qoormtrical c:ooccpts.
Euclidean geonetry .
Euclidean
ga:t~Ctry
scrools
Si.nec:!
ing techniques based upon this gearetry have bec:are standard rrethods for graph.i-
cal ccmnunication .
1\n affine t.ransfor.rration is a canb.ination of linear transfornations folla..'ed
by translation .
ro .
1
the t.ransforrred torogcneous coordinate H is not unity and there is not a one to
one oo.rrespondence bet\.-een the affine transfol:'lfatioo and the 4 x 4 matrix opera-
tor.
coordl.nate H.
Alt:hot.Jgh perspective views are often used by artists and architocts because
they y1.eld rroro relaistic pictures, t.hey are seldan used in t..cchn1cal work becaU9C
pcrspcctt\"C
'"
1n
11
1'
r.,... ~
spa....tJ.
A perspective
space.
tive proJectiOO
.LS
Ccllled
an axooc:rr-etric projection.
3-10
AxoMMT'RIC PRoJECTIOOS
An axonanetric projectioo is produced by an affi!le transforrration which has
I"Mt:.herratically form an axonaootric projection, the 4 x 4 transfo.rmatioo matrix is used to pxcdu::e an affine transforrratioo on a set of p:>ints .
'n1e p:>mts are then projected onto a plane frun a center of projection at infinity. 'l1le canton axonarotric projecticns are classified in Table 3-l.
draftl.ng.
..
l.l'\
To
'nsble 3-1
Trilrotric
remrln orthogonal
~'hen
projected
Oiztetric
Two
Isaretric
J\Xl:lnc::lrotric projectioos
An axonaret.ric
0 0 01 ""
(X Y Z H) = {x y z 1) 1
(x y n 1)
(3-25)
0 1 0 0
0 0 0 OJ
0 0 n 1
'Ihcn,
[X* y* z 1)
(X y n 1)
T' =
61
l 0 0 0
0 l 0 0
0 0 1 0
0 0 n 1
follo.,'9d by a projectioo
ftu!l
now
.. 0 plane given
by the
transfm:matioo
T" = l 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
'l!le concatenation of T' and T" 1 i.e. , T" T' 1 will yield the transfoz:matjoo matrix
in the object.
= R.
the x
T'
1 0 0 0 and T" =
r1 o o o
0 0 0 0
0 l 0 0
0 0 1 0
0 0 0 0
L.O m 0 l
t 0 0 l
tia1s.
Aux.il.iary views
u.c;ed
recal 1 that caubined rotatioos folla.;ed by pr-ojection fran infinity f orm the
~tric
In particular,
projectioos.
WI:!
Eqs. (3-7) and (3-6) the matrix project which gives this is
(X Y Z HI [x y z l)
cos~
-sin~
sin'P 0 cos 0
0
cax:atenatioo yields
0
0
o oose sine o
0 -sinO cosO 0
consider
Fran
> ,
L" c
A".\"
A
B
c
D
E
F
0
0
0
0
1
1
1
l1
ll
Figure 3-6
(X Y Z H]
ll ,. .
ro
I
0 0 1 rl 0 0 0 =
0 0
01 1 0 0 0 0
0 0 0 1 a
1 0 1 0 -1 0 0
o 1 o 1 c
1 l 1 lo 0 0 1
0 1 0 1 o
0 0 1
1 0 0 1 E*
0 1 1
1 1 0 1 F'*
1 0 0 1 ~
1 0 1
1 0 1 I
111
= [x
~c
y z 1}
Projections .
oo]
(3-26)
~J
0
By use of this transformation matrix, the unit vector on the x-axis, (l 0 0 11 ,
0
transfo~
to
[X Y
z H)
= [COSQ sinsinS
-sin~cose 1)
and
x*
= cos,
y*
= slnsin6,
z -sincos9
+ y 2
OCM
= ks2~
As
+ (sinsin6) 2
x* = 0,
y* = cose ,
cos
z =
sin~
vectOr
&= cose
is
T'OII
'lb create a dilretric projectioo, the I!B<plibx:le of the b.Q transforrmd unit
2
2
oos2 + sin ~sin e
2
Usi.n.J the identities cos
sin2~
cos2e
2
=1
crosen,
and
D:J. (3-27),
x* = sin,
Now
we shorten
y*
.= -cos~sine
by setting
or
~~2~
+ {1
5~
'f'
. 2 ) . 2&
Sl.Il ~ SU\
""
1
'f
4
8sin e
2e + 1
9sin
=o
'l1lis equatioo has roots of sin2e 1/B and sin2 t _.. 1 . 0. \'hen sine
11/8
or e = 20 . 705, then sin ::: 1(1/8)/(1- l/8) or Q .: 22.208. 'l1le terms 1.0 tlle
transfornatioo matrix in F.q . (3-26) are thus determi.ned.
(Z Y Z H) = (x y z 1)
0.925820
0.133631 -Q.353553
0.935414
0 . 353553
0.377964 -0 . 327321
0.866025
!. 0 0 1
l 1 0 1
1 !2
1 1
1 01 1
0 0 0 1
0 l 0 1
<
0!2 1
0 0 1 1
I 5 .,..
>"
O.S25820 0.133631 -~.353553 0
0.9354H 0.353553 0
0
0.377S64 - 0. 327321 0.866025 0
1
0
0
0
I! )"
I, -
0!1
I0 -
...
0
I
,y-.--==--___.. '
-4
OS
D netr1c
-0 !
I <
OS
OS -
sin =
. 2,..
Slll .,.
. 2-
sm
1- sin2 ~
2 ;;
1
2sin
~--'-~i'--
::
1 - sin2A
2
It follows that sin e 1/3, or sine 11/3 and
2
sin
t- ..
35 .26439.
Then
rh = !
and
oos 2 ~
= 1 - sin ~ = ~ or ~ = 45
The angle lolhich the projected x-axis makes with the horizc:nt.al is given
by
t.ano
= sinsine
cos~
For sin6 =
/i73, sin2~
2
1/2, and cos . .. l/2, this angle is
Q
1
= tan- (-;) = 30
This result is well knc:J..m to those wtx> have prcdnced an isaretric projectioo on
a drawing toard.
(X Y Z H) (x y z 1)
0. 707107
0 .408248 -0.577353
0 . 816597
0.577345
0. 707107 -0 .408249
0 . 577353
Cblique projections such as cavalier and cabi."''et do not preserve ort:hcx:Jonality of the coordinate system.
Table 3-2 .
Since they are not frequently used in technical '-()rk they axe not
di.scussed f\lr"ther.
A si.JTple orthograiiUc projection onto a zero plane perpendl.cular to any
of the three ortrogonal axes .results when the corresponding co1llm in the 4 x 4
transfo.mation natrix contains all zeros.
~ =
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 l
~s
used .
(3-29)
66
Table 3-2
Cblique PrOject..ials
Oeser iptioo
Pro)ec+..l.O'l
cavalier
c..
c.
TI'ittion rratrioes discussed above [i.e. , Eq. (3- 26) with P 20 . 70481P ,
: = 22.20765
3-ll PERsPECTIVE
TRANs~rta-ts
ro.~S
of the
tion.
transformat.l.on
foll~-ed
"vie.r.ri.n9"
plane. A perspective projectioo onto the z = 0 plane is given by tho transf o rrration
(X Y
H] = [x y
1]
1 0 0 0
= (x y 0
(rz +
1))
(3-29)
0 1 0 0
0 0 0 r
0 0 0 1
'Ibe ordinary transfol'li'Od coordinates arc
t.l)en
x*=H=rz+l
Y"
'lhc C]"...oretrical
eff~
( 3-30)
= yH = rz
___.Y~-,-.,...
+ l
67
of Fig. 3-8 .
WJ.t:h
r 1/k.
In Fig. 3-8
origin.
By using the
similar t.ri-
{z + k)
or
xe
z +1
1<
rrrumer gives
r OJCCIII'n
Figure 3-8 Perspective projectial
of a point.
(
'F'
z .. 1
(3-31)
C'crllcr ul
'Ibese are tho transform.."<! cxxmiinates produced by the rrat.rix operation with
r l/k.
=-k.
z ..
0 plane
In a perspective transfotmatial
the transfonrod space is rot Euclidean, since orthoqalaliLy of lhc a>-.cs is not
preserved.
above is cbt:ained .
Equations (3-30) and (3-31) sho.ol that when z
= 0,
then x
= x,
andy* --' y.
rc.~vcr. when
the horro-
affine t.ransformst.i.als are first. used to establish a ooordi.natc system with the
z- aJU.S al<nJ the desired line of sl.ght; then the pcrspccbve transforrrutioo i.s
applied and a projectiw transformation is used to project the total set of
p:>wt.s alto the viewing plane z 0 of the current coordlllAte syst.ern.
In prac-
fb..-eve.r 1 this
Q1e
0 plane
lx y z (rz + 1)]
0 1 0 0
0 0 1 r
00 0 1
rx * Y* 2 * 1)
X
y
Z
1]
rz+lrz+lrz+l
unch.ancJed.
(3- 33)
a'\
system ro
0 0 1] ls again
ro
the Z-axi.s l
0 1 0] 1
'('0;1
'"') is projected
rv::J;~
1/ r ) .
%I
co
,..
Assuni.ng
located on the sarre axis as the vanishing p:>int at an equal distance on the
'lhi.s is
s.~n
m Fig.
3-9.
t ,
Cen 1cr
t )f
p QJC:CIon
Figure 3-9
P.roJectiat of a line
parallel to the z-axis.
fooration
~I'IOOS
(X Y Z H)
(x y z 11
1\ND POOJfel'IQIS
- [x y z (qy + l)J
10 0 0
69
(3-34)
O l Oq
0 0 1 0
0 0 .0 l
with ordinary coord.in.ates
(x y z* 11
= [qy+1qy+lqy+l
x
Y
z
11
(3-35)
rx Y Z H) = [x y z 1]
1 0 0p
0 1 0 0
0 0 1 0
(3-36)
0 0 0 1
(X
+ 1))
Z (px
rx*
y* z 1) -- Ipx+lpx+lpx+l
x
Y
z 11
(3-37)
'1lle
transfoonatioos given in E>qs. (r32), (3-34), and (r36) are called single-point
or parallel perspccti ve transforrraticns .
Fig. 3-10a.
C\t)e
tion.
X ""
torted vi&t of the depth of the object i f the vanishing point is noved too far
away fran the center of the picture. This is what causes the "unnatural view
in Fig. 3- loa .
Lf b;o terms in the 4 x 1 colum nBtrix are nonzero, then a two-point or
angular perspective is obtain~ .
[X Y z 1) = (x y z 1]
1 0 0 p
[x y z (px + qy + 1)]
(3-38)
~+1
(3-39)
0 1 0 q
0 0 1 0
0 0 0 1
with ordl.naty coordinates
[x*
y* z* 11 "" [px +
~+
1 px +
px +
+ 11
t lo \1 PI on ) 111.1\
>"
)'
.o
.11 }
10
G"
-ToVP1 on
AB l< l \
IIJ. 10
(
(j
E
ll
A"
Po5it.iat
Vectors
.....
~
tl.VI? and
Projecticn
,..
E"F"
Folo.iuon
Vectors o!
o f o ng- Tr.lnsfOYt:D- 'rransforrred
1na.l Clile t ion Mat.."'U! Cube
F
A
c
D
E
F
G
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0 1
1 1
1 1
01
0 1
1 1
1 1
0 1
1
0
0
0
0
1
0
0
0
0
0
0
0.1 "" 0 0 0 1
0.1
0 0 0 1
0
0 1 0 1.1
l
0 1 0 1.1
1001.1
1 0 0 1.1
1 1 0 1. 2
1 l 0 1. 2
0
0
0
0
0.91
0.91
0.83
0.83
c
o
t
p
c
r
0
0
0.91
0.91
0
0
0.83
0.83
0
0
0
0
0
l ..
1 s
1 c1 o
l e-
0 l f"'
0 1 c
0 1 t
).
c.o
A
--
G".l"
A.
'-
I .I
Pcrspec-
Positlon
Vectors
of orig1na1 CUbe
0
8 0
c 0
D 0
E 1
F 1
11.
0
0
1
1
0
0
0
1
1
0
0
1
t1ve Md
Projoctlat
Tr.vuofor'IT'dt.iat TransfoDMtion ,.latrJ.X
!'latrix
1 1
1 0
1 0
1 -o.5
1
1
1 1 1 1
1 1 0 l
0
1
0
4>.5
Pos.1.tion \'ectors
lbtm1lized Pos1.tion
o f Tr&ns!or:rood
CIJbe
0 1 0 0 0. 1 = -o.s -o.s
-o. 5 -{). 5
0 0 0 1 0 0.1
-o. s 0.5
1 0 0 0 0 0
-0. 5 0. 5
0 l 0001
o.s -o.s
o.5 -o.s
0. 5 0.5
0.5 0. 5
0
A =
0
0
0
0
0
0
0
1.1 C"
1.1 D"
1.1 E*
1.1 f"'
1.2 c
1.2
-o.s
-0.5
0
-o.s .-o.s
0
-0.455 0.455 0
-o.4S5 0.455 0
0.455 -0.455 0
0.455 -0.455 0
0.417 0. 417 0
0.417 0.417 0
1 A
1.
c-
1 E"'
1~
1 G1 r
with r~ to the front face as s.~n in Fig. 3-l lb, a suitable t\olo-point
'tt'.is is du: to the fac t that the obJect
I!: three te.rrS in the 4 x 1 coh..-:n fl"atriY. are nonzero, then a t:hree-pomt
z 11
(X y
= (x
yz
11r1 0 0 p, ~ [x y z
(px
+ qy + rz + 1)
(3-40)
0 1 0 q
ol
rJ
~0 0 0 1~
w~th
o:rd.ina.r:'J a:x>rdinates
the y-axis at [0 1/q 0 1), and one at the z- axis at (O 0 1/r 1).
(3-41)
sl'~n l.TI
Fl.g . 3-12 .
A three-point
the x-axis at x = 10, on the y-axis a t y 10 , and on the z-a.x.is at z "' - 10.
0:
0
c 0
D 0
1
F 1
9
0
0
1
1
0
0
PoSJ.t.ia'l Vector s o f
Transf oLHed
vectors ot
Vectors
of Ori9inal C\.lbo
A
~tm'll ized
PosJ.t:.1 on
Po5itioo
Trans formauon :-auix
0 1 1
1 1 0
!. 1 0
0 1 0
0 1
11
0 0.1
Trnnsfocrcd
0.1
0 0 -0.1
0 0 1
Cl:be
0 0 0 1 A "' 0
0
o o o 0. 9 a 0 0
Cl.lbe
o 1 o 1 c
o 1 o 1.1 o
l 0 0 1. 1 E
1001
F"'
o 1.1 c
1 1 1 1
1 1
1 1 0 1
l 1 0 1. 2 P
Dr-----.'
0 1 A
0
0
0
l
0.91 0
0
0.91 0
0
0
1
0
0. 91 0. 91 0
0. 83 0 .83 0
u,.
l
o
~
G
1
c ~----G"
a1
,., "'
,, "
>-10
T u VP2 on ~-.u.~
.H 11. IC'
A .- --+--~-
c-
Tc. \ Pion)nn
Tn \ Pl on , ,"
IU
8"
)"
o- --c-I "'-." -- -
lll I
1
1
1
l
1
1
1
.,
3-12
p:>ints oo the horizon line (eye level) at which parallel lines converge.
3-14a shows heM the vanishing p:>ints are forned.
Figure
This
l.S
illustrated w
plane have vanishing points which can fall above or below the horizon eye level.
'ltlese are often called trace points and are sluwn in Fig. 3-14c .
\\hen viewing a CRl' display the positi.oo of the viCWJX>int or eye is normdly
fixed .
tive view, it is comon to ITW'Iipulate the position ard orientation of the OO)ect
displayed on the CRT.
In this view
all reoed.i.ng ~!.anes con'll'er9e to one vanishing point oo the horizontal eye-level
line, and all perpendiculars are drawn as true vertl.cdls.
cube
Papel
VP
- - - - - - - - - -Hor11on
1- yc lc\C I
St.liHIO po1nl
Figure 3-13
H r r
\P
\P
-- -
(
,.
\p
'
<::-::>
-- - --- ~
-- --
Hot ron
\ P
--
TP .
, _.-
---
n
u
--- -- -- ------
--~---------
--
- - - -..:::--..,.. \P
-:::- -
--------
\-E will roN rotate the urut cube about the y-ax.is and translate l.t to the
point [0 m n].
~;.'ill
-sre
cos~;
o -sine o
sine
cos6
1 0 0 01
0 1 0 0
,.cose 0 0
0 0 0 1
Is:~
1 0
L0
mO n + 1
0 0
0 0 0 1
0
cosO
Since projection 01to the plane z = 0 was desinld, the third oolum of t..'Lis
NOtice that
t\Oo
'Illis
l.S
given by
-suw
..
~
0 0 0 11 fros6 0 0
0 0 1 1
1 0
0
0 1 1 1
Sl.n 0 0
0 1 0 1
1 0 0 1
1 0 1 1
1 1 l 1
1 1 0 lj
mO
k
0
!!.+1
cosO + !!. + 1
k
k
sin'"
1+m0
coso + !!. + l
1 + m 0
!!.+1
k
S.ln;.
cos
~+
1J
+1
k
0 -sinG + n
cose +sine
0 -sine + oosO + n + 1
k:
mo -sr-e + J<0
1 + m0
oose
e-
cose
oose + sinS 1 +
For
-sre f
+
K'
..
~+1
+ l
ooordl.nates is
ro
-2
o2
0.86 -2 0 2 . 5
0 . 86 -1 0 2.5
0
-1 0 2
o.s -2 o 1.14
1. 36 - 2 0 1. 64
l.36 -1 0 1.64
0 . 5 -1 0 1.14
'
!ben, since
[!
H !B
[X"' '*
1] I
ll
0
0. 344
0.344
0
-1.0
-0.8
-0.4
-0.5
0 .44
-1.75
0. 83 -1.22
0. 83 -{).61
0.44 -{).88
'Ire transfotned cube is shown in Fiq. 3-15 .
the parallel sides of the cube.
...
nc:1n'
vie..-ed fran a position k on the z-axis by first performing rotatioo.s about two
y
oose
,..
o - sine -sine
k
1
sine 0 oose
0
cose
k
!!+1
k
Vfl l
VP1
_.-~I
....--
//
_, /" " I I
-'/
I
/(
I
I
I
I
e ..
60
m -2
n 1
k. 1
Figure 3- 15
Perspective transfonnatioo .
different axes.
then ~ degrees about the x-axis before applying the perspect i ve transfooretim .
.,...,
0
~
lan.l
o-....c 0
0
0
..,..
.,..
Ulll
.... .....
0
0
3-13
all.I!
.,..
0 000 I
[
1
DOC! I
-1
....~ .. w
1 0 0 0 <X>J'?
oI 00
rrnr
~-
0 r~
c ~._..-
11"1
..
I ~Ulll C.lrl'i
f!!:!'"l
PoiNTS AT INFINITY
To sho,..t rrore clearly
\~t
These
o o o o.s
0 1 0 0
0 0 1
o.
o -o. s6
0.86
0.5
0.86
0. 5
=co
-2 0 2
oo,
o o -o.86
I
o.s
'lbe point at y ..
oo
transforms
ic of harOgenCOUS ooordinatcs , we again consider the transfometim of a l.1ne parallel to the z-axis onto
the x*z*-plane.
t-~TIID~TICAL EI~
78
(X Y Z H)= (x y
1] rl 0 0 0 =
[X
(f + 1))
1]
1~
0 1 0 0
0 0 l
!..
0 0 0 1
(x+
This operation
(\o.~th
at (0 0 k).
~hen
y- z* 11 =
c; +
1>
~+
1)
(~ + l)
Notice the symret.ry of the vanishing point and the center o f projection.
An algorithm which will genexate a general perspective vie..~ is given in
l\ppendix
3-14
c.
ca11:al
problem.
,...
l..5
va 1 id for
~s
FUrther, as
gr>Jlet"al
4 x 4 nutrix.
Thus
(x
y z l)T '
T' =
T' u
(X Y Z H)
(3-42)
~re
(3-28}
0 0 0 1
OJnc:atenatioo of the 0.0 matrices yields
T = T,.T'
Til T 0 T
14
12
(3-43)
Til TU 0 T
14
::: (X 'i 0 1]
(.3-44)
0 1)
(3-45)
Note that x* and y" are the coordinates in the perspective projeet.ioo onto the
z 0 plane.
the x
= 0 or y
: 0 planes .
{3-46a)
(3-46b)
T x + T y + T z + T44
34
24
14
(3-46c)
24
=0
(3-47a)
In this case
\ole
have two
graphics are available , then F.q . (3-47) may be wn.tten for both proJectims.
ru.s y1clds
~~1
(T~
~4x1)y + (~1
~4x*1)z
(~1
~4~y + (~2
~l4y*1)~
(~2
- rr!4y*l) = 0
1-?11 -
~4x*2)x
~~1
~4X*2)y
- or;4x*2}z +
(~1
~4x2)
= 0
(~2
~4y*2)X
(~22
'S~.,2)y
+ (T;2 -
+ <-r!2 -
~4y*2)
a 0
~4x*l)x
(~1
~4y*2)Z
~4x*l) = 0
wher& tt.o superscripts l and 2 illdicate the first and second perspective proJectiOO view'S.
~ and ~ need
form as
(3-48)
~.ere
[A] ""
~ll
- rri4X*l
~1
~4X* ~2
-t-12 -
T~4xl T~l
1
~4Y* ~2
~u - ~4y* ~22
~4y* ~2
~4x*1
~4y.l
~4x
~4y*
y Z )
(X) T :
[X
(B] T =
l~4x 1
~l ~4y*l
~2 ~4x 2
~l ~4Y*2
~2]
Equatloo (3-48) represents four equations :in t.00 three unknown space o:x>.rdinates
x, y, z.
The problen is over speci.fied and thus can be solved cnly in sane mean
E:x..arrp1e 3-2:
pcJWerful
'lliREE-DIMENSICNAL
Asslll'C that the rreasured position of a point in one perspective projectioo is (0.3763 -0 . 8258 0 1] and in a second perspective projection is
[0.6548 0 0.2886 1].
~re
(f\) T (A) is square and of the co.r:rect d.irrensian for (B) . In particular
I>!J=[(AJT[AJJ-l[AJT[s]. Note that i f no solutioo result.s, then the iJrposed
conditl.oos 'lre redl.l"ldant and no uni.que solutloo which qives a "least" error
concli tion f"..xJ.Sts.
arout
'Ihe point of projection is at z .,. 1, and the result is projected onto the z
plane.
'l1le second perspective projectioo is the result of a 30 rotat.ioo about
o.s
o o -0. 867
and
il
are t!'l.ls
~ ~ o.867 o -o.s
and
0 0
0. 867 0 0 0.5
0
-2 0 2
0
0.25
0 0. 433 0.867
0.433 0 0.75 -0.5
0
0 0
1
[A]
0. 826252
-0 . 715969
0. 867
-0 . 5
0.67885
1
0.4129
-0.317712 0.7604
0. 182784 -0 . 8943
'
and
solution yieldc:
(3-47)
\~
several points which awear in the perspective projcctioo are J<.no,.,n in object
be rewritten as
- T34zx* - T44x* = 0
(3-49a)
(3-49b)
T24yx~
Apply-
ing these equations to six noncoplanar kruwn locat..ions in d:>Ject space and in
transfo.x:natian.
U \11"\l<:Jn.m.s.
rration is required.
gra{tl.s, neilher the locatioo nor the orientation of the carrera is required.
In
-x1xl * yl 0 -yl~--
x1
xl -x1Y1* 0
x2
yl -ylyl*
zl 0 -zlxl* 1 0
0
-zly1*
21
* Tu
y
1
(3- 50)
Tl2
x3 0
0
x3
)(4
)(4
)(~
xs -><sYs"
-x5x5* Ys 0
0
-ys~
zs
-z5x5*
Ys -ysys* 0
zs - zsYs"
x6 -x6y6* 0
y6 -y6y6*
26
o x5
T34
0 1 y * T41
5
-z6x6*
)(6
T42
-z6y6
y6
T44
Xl
If the transfornatioo
lS
nornalized,
t.~
Exanple 3-3:
us Jratr ix equatioo
lS
I is 11'0\ied
to
solved.
AS a specific ex.anple, cx::nsider the unit cube with the six Jcno..m corner
pomts
1.n
IPl =
ro 0 01
0 0 1
lo 1 1
10 1 0
l 0 0
1 0 l.J
(P*]
-1
o.J44
0.344
o
0.44
0. 83
-o.8
-0.4
-o.5
-1.75
-1.22
0 0 0
1 0 0
Tu - 0
0 1 0
T12
0 0
0 0
0 0
0 0
0 0
0 1
Tl4
0 0 0
0 0 0
0 1 0
T2l
0 0 0
0 0 0
0 l
0. 4
0 0
0 0
0 0 0
0.5
0 0 0
0 -0. 344 1
0 1 -0.4
1
0 0
T24
T31
-o.s
T32
0 0 .44
T34
0 1
1 0 -o. 44 0 0 0
0 0 0
0 0
0 1 -1.75
T41
1 0 -o. 83 0 0 0
0 -o . 83
0 . 83
T42
0 1 1.22 0 0 0
0 1 1.22
0 1 -1. 22
T44
1.75
SOlut.ia'l yields
[T) =
0. 867
0
-o.s
0
1
0
0. 5
0
0.867
0
-2
3-15
STEREOGRAPHIC ~CTJOO
Q1ce
can be used to actually display the abject. Tec::hniques such as shading, coloring , etc. , are frcquP_ntly device-Oependent and are .beyald the scope of this
book. Others, such as hicklen-l..ine reaoval and cliArlng can be acmtplished in
either software or ha.rdnare. Arother useful display technique is the use of
stereo pairs to create the illusi.oo of depth.
Graphical output
of cnqineering struct:ures such as bridges and towers lend therreel ves nicely to
ste.r:eographic projcctloo .
studies , the chcrni.cal structure of organic nolecules, and solid crystal oonfiguratio,s can be irrproved by the use of st:aJ::eographic projection .
Jn a stereoytafhic projectioo, a separate perspective view JTUSt be created
for each eye.
'
object.
If desiied, a
stereo~
can be designed and attached directly to the cntputer controlled output device.
For a hunan with average eyesight, the strongest stereo effect occurs at
a d.ist.ance of about 50 en in fralt of the eyes.
Ph..). /}
I
It
ll.
Plane
or
P rOJCC: I ion
Figure 3-16
stereo~ -
Figure 3-17
stereograpuc perspectives.
5. 0
Cll,
-1
(5/50) = 5 . 71 .
tr.e
If
~ viewer has a focal length of k units, then the value of d .1s fixed by tl~
single view o f the obj ect, a -+d/2 = +k/20 horizontal translatioo is ~rforrred
before creating the left-eye perpsective view and a
-<1/2
= - k/20
oorizontal
LS
oonvenient to center
the object with respect to the z-ax:LS and then rotate i t about tile y- axis in
three- point perspective . One final pl;'E!Ca.utioo is advisable . ~tatioo rmy cause
sate of the points to be behind the p:>int of observatioo, z c k. 'lllcse over
tbe shoulder points cause a distortioo of perspective views.
To prevent this a
final transl ation in the negative z-cl.irectia1 can be rradc to ensure that all
p:>ints on the object lie on o r behind the x*y*-plane, e . g ., -z* !._ 0.
re.~
'Ibese
Right eye
0 0
0 0
-~
20
-20
'Ihis creates two separate pers pective vie-'S , one for the left eye and o ne f or
the ori gin, and the right-eye v i ew is to the left, as 50CMn in Fig . 3-18.
Le fl
_
..
----
c ~ c: \le~
,..
--~
c~~.L~----- o - - - - - --cil
F
l.tl l C:}( v
Figure 3-18
'Ihc last ~rat.ia'l is to sep.-Lrate the two pcrspcctivc vie..rs by the p:rqer
di~
aloog the x-axis in order to place each view directly in front of the
proper e:;ye.
As
stnm m
F~g.
3-18 , (X*)R
l.S
the average
val~
between the
largest and S'T\l.Jlest value of x*R and (x")L is the averag-: value be~ the
~-val~s
The value of D
of each perspective
VJ.C:.l.
for.
nght-eyc view and - L for the left-eye view places the stereo pair in
t.">)c
prqx>r positioo.
hll'\an observer,
"~u,c'.i i~
1!6
for cxanple, i f
the final points for the right-eye view fall bet:..-een 2 !. ><P, < 4, arxl the final
pomt.s for the left-eye view fall
ootwcen -4
xt_ ~ -2 ,
to plot these two views on a standard sheet of paper, using a 10-unit scale
bet;...-een
-s
l"n'lSurcd
x* $.. 5.
bet\.~
= 2 . 5.
Q'le
hunan eyes
or two iterations
tiooed and rotatG1 to form the desired view and parspective is given in
Afp>-Niix C.
I t uses the left and right ste:reo rratri.x pair presented above to
Vigure 3-19
create the t:\10 perspectives and a final translation matrix to generate the
required eye separatioo distance.
An
is sho.m
1.n
rig.
3-19.
The
1 0 0
1 0 1
111
0 1 1
0 1 2
0 0 2
-1 0 2
-1 0 0
-1 1 0
0 1 0
Prior to cal ling the S'l'ERID subprogram, this daUl was first translated by usi.ng
Sli:lprogrcm
n =
-o.s.
J[YJ'RII.~
(Appendix
c,
a<3<1in
with 1
m = 0 and
= 0,
'lhis resulted in
~-as
a pplied to prcxluce Fig . 3- 19 .in order to fit the output to a particular storuge
t ube cro'.
REFERENCES
3- 1
3- 3
88
~11\TICAL EIJ.l.!EM'S
FtlR COMPl1I'ER
GRAPHICS
:-~clugan
Univers~ty
J-6
3-7
Gc~t.ry,"
Proc: .
roy.
\1'01.
15, 2, pp.
CHAPTER 4
PLANE CURVES
A m1pass,
stra~ght
wide vanety of
ships curves , splinBB , tmplates, cm:l nany other rrechanical devices , as 'h'el.l
as r.odels , col or dta.rt.s , and perspective grids , rnay be used to assist in the
oonst:.rucLion of a c:urve.
A great
generation and display will also be needed \</hen using oatpUter graphics.
sare
of the ideas that have proven useful for generating plana, o.o-<11mensional
curves
ill'e
2.
3.
~s
1.n
a cooplter.
be easily ptcduoed.
4.
\\hen
C'lli"w"eS
1.nterpllation schsre
5.
\ooile."l it is
desirable to o::ntiru*"llY alter t:he shape of the curves to reet certa.L.n des1.gn
cr.1.ter.ta.
we
ro.~
repre~ti.ng
tiNO-di.rre.n-
sio.na!. curves.
4-2
tb~PAAAVETRIC URvES
form
y f (x)
(4-l)
Il' this fonn there is only one y-value for each x-value.
explicit fotl':' cannot represent closed or CJ.l.tiple-valucrl curves . 'lhis limitat.la'l can be overCXXll!' by usin<; an inplicit eJ<preSsion of the fonn
f (x,y) = o
{4-2)
.-..
'n'lus,
the choice of the coordinate systen can affect the ease of USl.nCJ the curves and
calculating their properties .
l.S
cne of interp:>lation.
'lhis requires
SOI'e ~ee.
~ actual
shape
p::>ints dept!nds
lplt'l
the order
o! th:: p::>lyroniaJ and the Ntheratical t:oundary cxmd1t1.ons "'hlch are applied.
unknown "true" ~ues, then a curve is required which indicates tht: correct.
trend of the datu.
L"l general tlU.s curve l'l'c'lY pass t:hrou:jh ally a few data
FOint:s an:!, in fact , may not pass t:hrough .lilY of the data FO.i.nt.s.
'Ihis
PU\t.:F. OlRVES 91
fran
<:1
exper~tal
\\hen the data points inherently conbin unc::ertainb,..s, the rrethod of least
squaros a.Ff>r<UJT'dtion is a cx:mronly used curve fitting (or c:llJ:'W fairing)
technique. 'this technique prod\IO:lS a curve fit of pr~ fonn y c f' (x)
~ch
estimated values.
{:tlysical
'!he
~n
pn;scrib...~
fonn
sel
the presc:riOOd
'1
the fonn y =
C\..II'V\!
-+
C'r +
.lS
"''ritten as
=0
(4-3)
If the curve is defined rc.J.ativc to a lOC2l coordinate system through which the
By c.Wfi.Jung
bcb.leen
l:w:)
to
to
one choice is to
specify the position of the 0..0 end points, the slope of the. curve
segrrEnt
at
each end point, and nn i.nt.e.rn:;odiate point t..hrough wtuch the curve ITUSL pass .
If, instoad , \,~ specify b
=0
1.0.
curve is given by
x
+/
+ 2t1x + 2ey + f = 0
(4-4)
1:'-0
em
po1.nts and
e.1.thcr the slop.. at the bcqi.nning or the sJ.or;c at the end of the curve: ~~t .
1\oot.her chou:e is to specify the t...o end IX>ints and a third internal rx:>int
through \o.hich the
A ~ght
~ the
equatioo
is
dx+ey+f .. O
(4-5)
or
y
-(~)X
~=
11'0(
+ b
(4-6)
3
a + bx + cc 2 + dx - y ... 0
(4-7)
Specifying the t:'-0 end rx>ints and the slopes at these two p.:>ints fixes the
end rx>int of a curve has a verti.cal slope relative to the chosen ooordinate
system.
FUrther, when points on an axisdependent nonparanetric curve are calculated with equal i.ncrem::nts .in x, the
positioo of the rx:>ints will not be distrib.rt:ed evenly
curve .
of the
This can affect the quality and accuracy of the gra{irlcal outplt..
'1hese
gra~ .
(4-8)
y .. g(t)
The
ro.1
matrix given
by
P(t) = [f(t) g(t) J
(4-9)
If required, the nonparasretric fmm can be obtained f:tun the pararretric form by
eliminating t:.re paraooter fxan Fq. (4-8) to obtain one equatioo in terms of x
and y.
In a<k:tit1on to sinple curves, the paramet.rlc form is suitable for
PlANE OJRIJES 93
given by
P' (t) =
Y-~
( ) L - -_ __
rx y' 1 ::r
(4-10)
10
_.
respect: to the
parar~eter .
=0
I /
';.
occurs~
Since an
one
= COS;J
y = sw.J
--
I I I"' // / """
: ~/
infinite slope
I I
(4-11)
~-b!n
'lbe slope of
./
_..--
--
10
10 t--...._
c:atp:>nent
"'
Figure 4-1
I0
Circle r.::prese.ntatia'\5
It is
par~t.r:ic
curve falls
between 0 ~ t ~ 1.0. Due to its axis-independent nature, a parametric curve is
easily transforned into a curve of the sarre shape but wi. th various orientatioos.
'!his is aooatpli.shed by using the tratrix multiplication techniques discussed in
the previous chapters to perform rotatioo, translatioo, sca1ing, and perspective
projection.
A ooopa.rison of the parametric and nonparametric form of a circu.l.a.r arc is
sllOn'n
in Fig. 4-1.
<XIItpute.
2
(l - t )
2t
+ t
(1 + t
rd l
Where t tanS/2 .
2)
x is known.
\>~hen
the value of
ward:
= A:
For the para.rrotric representaboo it is first nece~ to solve for the p!U"a-
Specifically for
x cose
y =sine
Thus,
e = cos-lx =
ros- 1(0. 5) = 60
y = sin(60) = 0.866
Alternately, far Eq. (4-13)
X
2
1- t
- .;;.........-""
- 1 + t2
y -
2t
1 +
1 - X l/2
<t + x>
= /'1 =
0. 57735
and thus
y =
~~ =
4 = 0 . 866
4-4
tbPARAiflRIC
REPREsENTATIOO
~'Je ro-;
ustrates hc:Jw the intersection of a plane and right circular oone defines the
various conic sections, i.e., the CliCle, paralxlla, ellipse and hyp!'rtx>la.
The general definitial of a cadc section can be given as:
..
PLANE OJRJES 95
,
/
d
( 11
Figure 4-2
A
de
Cooic Sections
such that its distance fran a fixed p;:>int (cal led the focus)
divided by its distance fran a fixed line (cal 1 ed the directrix)
~
a constant
sec:::oro-
degree curve
ax2 + bxy +
C'i + dx + ey + f
: 0
'rtle cross product term bxy in this equatjoo oootrols the orientation of the
resulting
CCIIUC
If the reference
axis system is selected such that one of the a.~ is an axis of symretcy of the
curve, then b 0 . Since we can always rotate the curve such that. the axis of
S}ITI"'retcy is one of the axes of the reference systan, we need ooly consirler the
equation
a x 2 + c y 2 + d ' x ' + e ' y ' + f ' = 0
2
(4-15)
+ csin2a.
ect:JS
f' = f
and
cot(2a ) .. a - c
b
(4-16)
If the coefficients a', c ', d' , e ', and f' are known far the original
= 2 (c '
- a' )cos~in,)
(4-17)
2
c = a I s1n
o ... c 1 cos2o
d :: d 'coso. + e ' siro
e :o e'coso. - d 'sino
-.
f - ...
Equatl.On (4-14) em then bo used to generate the requued curve.
'Ihe character of
..
Narrely,
a parabola if b
th~
- 4ac
c:urve is
=0
(x ' - h)
(y' - k)
~ r2
(4-18)
h = ~
2a'
~
k = 2a'
r ~O
4a' 2
(4-19)
4p (y ' - k)
h:: - d'
2
e'
p=4
= 2f '
- d'2
2e'
e 'JO
r
If
PIA'IE ClJRVES 97
the roles of x ' and y' are interchanged, the x'-axis will oo the axis of
S}'ll"l'l'et.ry.
occurs when neither a' nor c' in Eq. (4-15) is zero and both a '
the sane S.lgn,
An ellipse
- -'
and c I 'nu.ve
..
(l
> 6
(4-20)
(l
-d'
= 28'
k""
(l2
-e '
= ~
e2. ~
c
c;ao
g = -f'
\~
g =
o,
a point results.
I Q2 -
B2 < 1
A hyperbola is generated by Eq. (4-15) when neither a' oor c' is zero and
(x ' - h) 2
cl
(y ' - k) 2
- - 82
~1
(4-2la)
or
(y' - k}
(l2
(x' - h) 2 - l
B2
(4-2lb)
d' 2
= - f' + 4a
e'
+ 4c Cf?-O
the signs of a ' and c' in ccnstrast to an ellipse , \oo'here the orientatioo is
tx>la is given by
c ...
4-5
fb.wARAt-ETR IC CIRCUlAR
AA.cs
Hany of the early techniques for curve definition were based on the use of
even through the point distri b.Jtion was not tnifonn. The shape of ships and
airplanes were adequately defined in this manner. One advantage of this ~
was the relative ease in ca.lculat.inq the intersectioo of boO curves, each defined
by nonpt\I'atretric, algebrAic cquatioos.
'lb generate a
circle through these points , let a ' = c ' = 1 and write 6::). (4-15) as
where
\..e
+ dx + ey + f = 0
have drop{led the prines for coownienoe.
x
2+d+o+f""'O
8+2d+2e+f=O
l3+3d+2e+f=O
Solving these three equations for the three unknowns gives d -5 , e -1,
and f 4.
Thus, the equation for the ciro1l ar arc through the throe given
points is
X
+ y 2 - Sx - y + 4
= 0;
:S_
e/2a - 1/2.
~2a
= I!0/2
= 5/2
and y k
r
~ -
dx -
5- 2x
<2Y -
1)
= l/2.
However ,
oote that this infinite slope docs not occur within the arc ~ent oo~
[11] and [3 2].
When
a1e
~sctry
poUlts, rather
Exarrple 4-2:
Let the
o.o
end points be [1
quire a radius of r = 5.
11 an1 [3 2) as before.
In addition
we re-
25 ;;
+ e 2 - 4af
2
4a
'Ihe solut1on to the
a}:x)ve
eqwUons
l.S
oo
used.
By trial
and error, it can be sh:::Jwn that an approximate solution to the above set of
equations is
d - -8. 4
e = 5.7
f
o. 7
for a = c = l.O
Thus, the center of the cucular arc which r:rects the .irrposed oonditJ.ons oocurs
at x = 4.2 and y - -2.85. 'lhe arc no 1onqer passes through the int:.ermed.iate
LX>int (2 2].
on the other ha.rd, it may be necessary to oontrol the slope of the c..L.rcular arc at the initial and/or final powts. 'lhls can be done by choosing an
E:xanple 4-3:
1u~
NG
.11'll~lendelltly
at: X 1, Y 1
at x; 1,
at x
'lhese
~~
dx y. 1
= 3, ~;
"" 1
ocnditicns lead to
2+d+e+f=O
4 +d+e:::O
6 +d . 0
arc is thus
x
+l
- 6x + 2y + 2 = 01
= 1.828;
~x
.S.. 3
If the final point an a circular arc truSt be spectiied, then only cne end
a fillet between two straight lines, one might specify the initial point, the
Exanple 4-4:
2+d+e+fO
13 + 3d + 2e + f "" 0
6+d:::r0
'1hen d -6 , e 1, and f 3, with h 3 , k ~ l/2, and r -- 5/2.
'lhis so-
and an iterative so1ution nay be requi.rea to find a final {Xlint ~ch allONS
An alternate approadl
specify the radius wch will pnxluce acceptable slopes at the two end points
'lbese
~les
output.
C\.1IV{? ,l.S
C\l.t'W
<XJlllUter t.itl'e.
<::ha.niJes based
c:Dlsider again the problem of pa.ssinq a circular are through three pomts.
If the points are far renoved fJ:Cil\ the origin of the coordinate systEm, l<m]e
values of the coefficients can occur. To avoid this, translate the origin or
the original coordinate system to the first point and define a new ooordi.nate
syst:en x'y' as shoNn in Fig. 4-3.
= (0 0]
f'
= 0.
at P and P , are
1
2
Xi2 + Yi2
+ d'Xi + e'yi
=0
d'
e' ;
Yi )
Y2 (Xj_ + Yi ) - Yi (Xi +
<~i xiy~)
Xi(~
+ Yi ) - x]_ <Xi +
lxiY1 -
Yix2)
Yi )
nate system, is
x' _
c--
d'
:za' -
Yi<~
l
+ yl' ) - Yi(x'
2
<XiY2 - '91)
+ Yi)
xc = x'c + x..u
>I
Yc .. yc' +Yo
\<.'hen f.Oints of intersection, offsets
The explicit
In t:erms
of the ooefficicnts of the general secondorder p:llyrouial equation, the first foon
is
y' = -
e' !
Translated coordinate
x ' .. _ d '
,42 -
4 (y '
+ e ' y')
ltD('
ru.qucs.
As an exanplo of the generation of a na1paranetric conic sectioo, an al-
gorit.~
c.
'Ihe ba.sic oonoept behind the algorit:lJn is that near the x....axis equal
'111us, between y
12 and x
=0
and y
= .t
r 12 equal increments
with the square root of negative nurrbers , the absolute val ue of the square root
ar~t
is used .
An exanple
se<;Jrel1ts
It gen-
4-6
~vcr,
a panacea, since both have advantaqes and disadvantages and both find uc.cful
applications in CXX'!t'Uter graphics.
(4-22)
y : : : rs.ine
(4-23)
In sec. t1-3 ~
a\
display device , the calculation was inefficient because the trigonaretric functions rrust be repeatEdly calculatod.
4-7
'Ihis
constant.
Xn+l
yn+l
= rcos(O
= rsin(9
+ d6)
(4-24)
+ d9)
(t1-25)
using the double-angle f orrrulas allows Eqs . (11-24 ) and (4- 25) to be rewritten as
(4-26)
c4-2n
then we have
k)slrlde
(4-28)
(4-29)
><n+l - h +
yn+l = k
(~
- h)cosde - (y0
c.
since dO is constant, the values sinde and cosd8 rx:ec1 to be calculated only
once.
nus
4-8
,.~
n~
of points pro-
Vlded a tp:)d representation of the circle w1len <XX'U'lCCt.ed by short straight vector
\<r'ith a circle, the distributi.a\ of that fixed nurber of points 1.S obvicus equal-angle increments. Jb..~ve.r, for an ellipse, i f equal angle increm:mts
are ns'' to calculate the display points, an unacceptable rosul t will be obta:ineC
'lhis ls particularly true for el 1ipses with high eccentricities (E: = 1) , as stn.1r
m Fig. 4-6.
'lhl.s is
because ncar the ends of the ellipse the curvature is too large to be representee
by a f(!.N points.
.. ,
"nere
For a suffi-
Ha.--eve.r, the
Figure 4-6
periJreter length near the ends , "''here the curvature is l.arqe, and larger
pe.ri-
'Ihen
X = acos6
(4-30)
y = bsin6
(4-31)
e, say,
increments of 2n/ (n - 1) ,
dx - -asin6d6
dy
=bcosed6
(4-33)
and
and
fe~~~er
(Xlll\ts.
In fact
the ratio of the peri.Jreter l.ncrerre'lt size at the ends to that a lon<J the sides
is approx:irrotely b/a.
crements
meter
e,
I'
Hence
x'
y'
= xsini
+ yoosi
(4-34)
(4-35)
or
._I
(4-36)
(4- 37)
'
y'n+l = yc + x'sini
+ yn' cosi
n
(4-39)
n+l
Figure 4-7
Ellipse
y'sini
n
X'
X 1 00Si -
For the recursial fOD'I'lllas, note that the ellipse algoritlTn in Appendix C uses
Snith
I
(~f.
4-6) has sb:1h'Jl that this alqorithm can be made still nore effi-
cient such that ally four additi.a\s and four nultiplications are required within
the inner loop.
Snith has also sb:7h'Jl that this technique yields the inscriOOd
efficient representation of the el] ipse , such as the CX81Tple shown in Fig. 4-8 .
4-9
PAR#ETRJc
REPResooAnON OF A PARABCX.A
In rectangular
l = 4ax
A parat~Ct.ric
(4-40)
= tan2e
(4-41)
y = 2/itAniJ
(4-42)
'
P~
CURVES 107
Figure 4-8
"''here 0 ~
e ~ r/2 .
ola, Smith (Ref. 4-6) points out that it does not yield a figure with ma.xlrruml
inscribed area and thus is not the rrost efficient rcpresentatioo.
An alternate
a62
2ae
5"'-eeps OUt the entire parabola.
Y
~'here 0 ,S_
e s_
(4-43)
(4-44)
max
=/~
a
(4-45)
emax
(4-46)
ed m t:re fl.I'St quadrant, the rest of the parabola Wich appears in the fourth
ocu~
Figure 4-9
~ant
Para):x)la
An
e is
used.
= an+
~ 1 ~ aen2 + 2a9nd~
+ a(de)
~ray
be written as
~1
..
+ y0 da + a(d9)
(4-47)
(4-48)
Yn+l .. Yn + 2ad9
s~ifl.c
a."\ ~le
a parabolic arc is to
oo drawn
bet~
For ex.a:rple , i f
= (0'"Y.
- -2R'):
P X) t
+ 2 (RX - PX ) t + PX
Here the paraxreter is t, and the t:'NO end points of the paral:x:>la are P
arx:l Q (~ ~~.
end ta.'1getlts.
= (Px PYJ
11\c \-)
The pomt R
o=
4-10
a= A HYPERBOLA
we want to generate a
hypertx>la which is origin-centered, with the axis of symretcy being the positive
x-axis.
is
where 0
x "' tasece
(4-49)
y fbtane
(4- 50)
s e ~ n/2
hypet'OOla.
area .
- cos660Sde - si.neSillde
and
,,
't R ( R~ Ryl
1\
I
I
'
I
I
\
'
'I
I
'\ \
\
',
II
'
'b+-1 !asec
(e + d e)
= ..- bOOseab/_cose
- btaneswe
l
I
;. - ~cl
and
~n+l c ~ btan (5 + d 6)
Yn+l
'l'he algonthm HYPERBl
btan" + btarrl6
t
l - tan6tand"
b(y + btand>-)
r--~"'---::::-:---....,--
(4-52)
- b - yntand6
1.n
.,.."1 th
= acosh6
(4-53)
y = bsinh&
'Ibe
(4-54)
(o 6 - c - fl)/2.
l\s
e varies
(e
'll1e double-
'
= a(cosh6coshd6
+ sinh'-sinhd6)
or
~l = x0 coshd + ~ y0 sinhdt1
(4-55)
~ x0 sinhdfl + y0 coshd6
(4-56)
yn+l =
was the case for the paralx>la, the trax.iJtun value of e = enax nust be set in
order to limit the extent of the hyperoola. I f we coosidcr the branch of the
hyperoola in the first and fourth quadrants and wish to plot the portion of the
hyperbola for a .S. x ~ a + c, then
1\s
=cosh-l f-+c)
max
a
(4-57)
dtl
sll\hdB = e
-dr
- e
awroach
was adopted.
uere
we cx:nsider the sane problem; i.e., detexmine the location of ~ center and the
However, here
"e divorce the problem of drawing the appropriate circle fran deteiJI\i.ning
~t
it is.
in the x,y,-cx:xm::hl'lilt~ sysl811,
1
2
3
'l1le general , na1pararretric equatl(Xl for the circle
(4-58)
+ (y - k) 2 ... r 2
in the xy-plane, direct substitution into
(x - h)
,,
Figure 4-12
'
..
\
~
l
I'
l
0
\.
'
Lett:in:J
(x' -h ' )
+ (y ' -k ' ) 2 r2
h ' h - m and
(4-59)
k' = k - n
h ' + k' 2 - r 2
0 for
~,
h 1 , k 1 , an:l r
Notice,
~,
that becaus
the origin is at the first point, the fi.rst e:}Uat.ion can always be S\.btracted
fran the sec::ond and thl.rd equaUoos such that the nonl..inear t:etms are el.u:u..n.'lted.
= x! 2
~ - 2,3
+ y! 2
(4-60)
These are ttNo linear cquatJ.oos in the tw:> l.ll'lknc1wns h' and k ' \ohlich
directly.
2
2
h' + k' .
be solved
'llle radius r can Ulen be det&mi.ned fran the first equation r 2
CdR
e1
= tan
-1 yl*
,_
e2 =
and
-1 y3*
tan
x3
(4-61)
can be used to generate the points which describe the circular arc fran P to P
1
through P
2
Exarrplcs 4- 5:
Trans-
2h' + 4k ' = 5
-6h
+ 8k
!!0.
25
= 126. 87
'Ihis provides the angular input for the arc drawing S\lbroutine.
arc.
'llle algorithn
The
Nevertheless, it
1.S
possible to
to minimize the inteqral aloog the arc length o the square of the cw:vature.
K""
(4-62)
.,here the
pr~
= Jilds
(4-63)
solved by
~eh.l~
(Ref. 4-8).
was
~'hich
al.crq the arc length of the square of the cu.r:vat.ure, then the
s~n
drawn~
in Fig. 4-lSa.
~.
I '
\OHJ;;ItOil
r I
"
these points
a Ltner
be~
k.,_,
t-~un
replacin<] the linear variattoo with a series of disocxltinoous steps, each with
constant curvature, as indicated in
F~g .
4-lSb.
1\ large
circular arcs, will produce a closer fit to the ideal. curvature. The required
nunber of circular arcs depends upon the separation distanoe between the dat..a
};X)ints, the dlange in curvature over the curve segrrent, and the required ~
of the graphical output. Detai 1s of this technique for generating snooth curves
by circular arc interpolat-ion are given in the cited reference. The output. of
the itcraoon process gives the value of racHus and center };X)int for each circular arc, as well as the specified x-values where the curvature c:hangcs. '1hen
sd:>routines for generating parametric c.ircular arcs can be used to produce the
actual pieoewise curve.
REFEROCES
4-1 07\TASAAB, "Fornela General Descripcicn, " Reg. No. 917-E, 51\1\B 1\KTI.EOOV.G,
58188 , Li.nkopi.rq, ~ . 1965.
4-2
Manual," NAVSIU.PS
center,
Washingtor
Gottfried, B. s ., PrC?gramning with Basic, Schallll' s Outl.ine series, McGrawHill Book COrpany, Ne" York, 1975.
4-4
Gr~cs,
4-6
l-fchl\1'1\, E., "CUrve and SUrface Fitting based on Variational Criteriae for
IKE HAYDEN
CHAPTER 5
SPACE CURVES
I~
'
5-1 Itfi"RROLCT ION
ll\::lst objects encountered in the real world are
l~ver,
t:.h...~ia\al
in nature.
three~ialal
or sectional d.nwings.
objects by
I'J:!allS
of t:wo-diJrensiona.l
Vl.L'".TS
CUIVO
The
dcscriptioo to three-
OF
SPACE (aVES
mnparaztw:trically or pararretrically.
oo
reprosc.>nted either
'
SPJ\CE
117
x=x
y f(x)
= 9 (X)
g(x,y,z)
=0
{5-2)
y - z2 = 0
g(x,y,z) - zx- y2 ~ 0
f(x,y,z)
{So-3)
l.l'l
L,_
z
x =
z3
(5-4)
= z2
2!.
ll.
i4X oy
det
~~
X y
c.~
= f (y) ,
surface equations.
= g (y) or y - f (x) , z
.lS
expressed as
x(t)
(5-5)
y ;: y(l)
z = z(t)
_ t ~ t 2 Roconsidaring
Eq. (5-1) we see that x itself can be considered a paraneter, X,. t, and the
sarrc curve is then expressed in param:!tnc fotm by
x=t
(5-6)
y = f ( t)
z g (t)
Further, i f we reconsider the oonparat"Ctn.c l.rrplicit representation given in
FJ::i.
curve arc
we can let z
t:.,;
)( - t3
=t2
y
z
~useful ~ic
(5-7)
= t
a1
For
a tennis or
~) - bcos3 {0 +
i> )
y =
i->
if) I
IJ (asin (6
+ bsin3 {6 +
z csin(2E)
( 5-8)
" 1 + dsl.n(2fl ) - 1
.c .
.. l.,
I
'
I
=1 -
dsin(2e )
=1
= 0,
and d
a1
s~
+ d(!)
c
- d(!)
of radius 1 . 5.
x = acost
y ~ asint
z
for a and b
'Ihe
ao .
(5-9)
= bt
'Ihis curve lies oo the surface of a right c irThe effect of the equatioo z
= bt
is to nove the
points of the curve uruforml.y in the z-di.rect.lal. After each 211 interval in
the pararreter t , the variables x and y return to their initial values, but z
increa.s es or decreases by 2n b l , depending upon the sign of b .
z i.-; callro the pitch of the helix.
'lhis change in
data p:>ints .
This
invol ves specifying boundary conditioos for the space curve in order to determine the coefficients for a given polynomial curve form and establ ishing a
soot.hness criterion.
r-'.any considerations enter into the decision of ho.l
curve.
to represent a space
the ava.1lablc interface ~ user and cx:rtpUte.r, and the display device used
for
a1
5-3
CusiC SPLINES
The mat:hcrratical spline derives fran its {ilys~cal counterpart - ~ l ofts-
rran's spline.
A physical
the lead "-eights the spline can be rMde to pass t.hrou.;;h the sp.."<Cified data
EI
M(X) = R(x}
r is the J:l'al'Cl'lt of
o f curvature R(x) may be replaced by 1/ y", where the pr.irre denotes differentia-
Thus, we have
y" (x) =
Assuning that
Ule
loti';>
Letting M(x) = A +
ax
twice shows that the physical spline is descriOOd by cubic polyncmials between
supports.
In general the mathenatical spline
Piecewise splines of lo..r degree polynanials are usually rrore useful for forming
The use of lo..r~e<Jree polyranials reduces
the caputatJ ona 1 requirements and reduces mm-erj cal instabl.l i ties that arise
with higher order curves.
CXJflTIDO
curve.
polync:rnials cannot span an arb~tracy series of points, adj aoent polynomial segJl'el)ts
are nooded .
cal spline, a camon technique is to use a series of cubic splines with each
boo points .
since it is the l~t degree space curve which allo..rs a ~int of infl ection and
paraneter t ,
1.n
terms of a
qiven by
P(t) =
. 1
L
a.e;
. 1
l.=
l.
(5-10)
\."here P(t)
= {x(t)
y(t) z(t) J.
z ( t) \oohlch
of the posit.icn vector . The coeffi-
cients B
l.
x ( t)
, y ( t) , ard
se<J'l'IC."lt .
(5-10) may be wr1.tten as
s 3t 2
P(t) = Bl + B2t +
+ s 4t
(5-11)
a given pair of points throu<;h \ohlch a curve ~'lt passes be the vectors
P , P.. (see Fig. 5-la) . COrresponding tangent vectors at these given points
1
are indicated by
the derivatives with respect to the parazreter t . WithU1 the cubic segncnt the pararreter t varies betw-een t:'"'=> end-point values ,_ and
let:
Pi, Pi,
~.
we can assign
= 0.
The required boundary corrlitions for each cubic segrre.nt o::nsist of the b.'O
(5-U)
P(t ) = P2
2
~~
dt t=O
P'
~lt=t =pi
2
Four relationships follow fran ~ . (5- ll) and (5-U):
P(O)
dP
dt t=O
= Bl
~
L:
(5-D)
P
1
(i-l)ti-zB.
l.t=O
i=2
=B
= P'
2
1
(5-14)
(5-15)
dP
~
= L
dt ,t=t
i=l
2B.
l)tl.-
(l. -
l.
SOlVl.ng tor
s3
and
s4
(5-16)
t=t
yields
B3
and
3(P - P )
2
1
2
2P'
P'
- t2 - ~
(5-17 )
SPI\CE OJRVES
U l
(5-18)
along with 8l
= Pl
=~
.Ln
the results.
SlllCe
each of the end-point vectors and end tangent vectors has three mp:Jncnts , the
pararretric equation for a cubic space
~
C\ttVO
depends
up::lO
~'Ct.Or
12
component s
S~e<pent.
Substituting F.qs. (5-1 3) , (5-14) , (5-17) , and (5-18) into l:q. (5-ll)
yields the equation for a cubic spline segment:
P (t )
)(P2 - Pl)
Pl + Pi t + (
2
2Pi
-
P2
t.._
t2
t)t +
2 (Pl-P2 )
-l
~ts
)
t2
PK(t) and PK +
P'
1 I
(5-19)
~2
(t) , 1 ~ K _ n - 2 ,
wrerc
n is the nll!l'ber of data pomts throlgh \oohlch the curve J'IU.1St pass (sec Fig. 5-lb).
+ pIt.
)(PK+l - PK)
[
2PK
PK+l]
2
[ 2 (Pl<- "K+l)
PK I'K+lJ
3
- t
+
+ '""!
2 t
(5-20)
t2
t..
-~
and
PKllt) - r Kl ~ I'K+l"
.HI'Y2- Pl<ll
.. 1
''~1
t
PK2J
2
t
t. -
[ 2 (1"1<1- Pt<+21
and 0
Pi:l
2
tl
r ;.2] 3 (5-21)
2
ll
and P
vectors P , P , and P
2
3
1
Pi and P) To ensure second-order continuity for a cubic spline, we inposc the
conditioo for <XI'lStant curvature at the internal joint between the 0..0 spans .
'Ibis in'plics that the second derivative, i.e. , P" (t) , be cantinoous across the
joint.
Fran Eq. {5-10)
we have
4
P" (t ) ..
(5-22)
( i - 1) (i - 2)
i =l
At the
~re t = ~
+ 2B3
P" 2B
~t.lng
6~ [
pl
t3
2
2 +~ 2
t2
f.lll.tiplying by
t:fi +
~t
2(t3 +
~
-~
~ -
2Pi
pi] [
t; 2
t2
3
~ (P2
- Pl)]
(5-23)
t3 - tl
~)Pi
3 = ~3t3 [ t~(P3
- P2) +
(5-24)
...,h lch can be solved for Pi, the unk:rloNn tangent vector at the internal joint.
Again
cub.tc spline
~ts
and t , occur in
3
g~eralized
to yield n - 1
alizcs to
t.,-. 2r; ' t ,. l ' '1 -1 "Kl ' ly.lr;. l
(5-25)
(5-26)
..
I~
l''
rt~l(Pn
.
pnll .. t~ F'n-1 - l'n-2]
n-1 n ~
t) t
voctors .
\-lhen the t\oJO and tangent vector s Pi and P~ are specified, then the
vectors P , 1 ~ i ~ n, al on; with Pi and P~, are specified. Then Elq. (5- 26)
1
is 11SE!d to calculate lhe i nt..enrediate tangent vectors Pi, Pj, . . . , P~-1'
Tlus calculation is rrost conveniently aco::c1plisr.ed by natrix inversion
(cf
sec.
5- 5) .
cients g.tven by the 9f!f1eral ized focn of Eqs . (5-13), (5-14), (5-17), and (5-18) ,
B = P'
(5-28)
SPJICE CURI1ES 12 3
, .~
PK-+l
- 'i<.. l-
~+1
----::-P~
2r;
r,
(5- 29)
P'
K
2
(5-30)
lK+l
)----- ).
is gen-
SC<}"'\!nt
0 ~ t ~ tmax.
,'\
,._
(':
1
t , must be chosen. 'I'his do1ce
0
,,n ,..n
'n
.,.,. '
P. P.' ,,
I I
S<m.SC
/
y
of
To
and 8
c:OOosing
This
Swpler nethcds
cal purp:>ses.
One approach is to set the rrax.im.Jm parazret.er valms equal to the chord
lengths
be~
rnax
values and , hence, different curves through the given data fX>ints.
As the
5eC}tents
5-4
t.aJ19ent
p...i ,. ~s .
~IZED PARA."TERS
In spite of the approxunate sr.oothness of the resulting curve, normali7.ed
paraJreter
defining a
u'?ed, 0
~ t
s. 1
'
(5-31)
P3
l 4 1 0 0
;(P - P
> - P'
r.
n- 2
n-2J
'i.'le four ccxllf1cients for each paranetric cubic equation, givcn by F.qs .
(5-27) and (5-30) , can be expressed in z:utrix form
B4 .,
a3
2 -2
-3
1 r-PK
3 -2 -1
0 0 1
01 PR
BlJ
OJ
1 ~ K ~ n - l
(5-32)
PK+l
B2
QS
_PK+lJ
\',"ith the nonr.llizcd fo.arulation the tridia<;Utal matrix in Eq . (5-31) need only
'
be i.wtj...--ted
tire.
fi.'ld use
..
For
J..S
m:lde equal
to 1.ts
a_Y'@
local chord.
(see Chapter 6)
Although
par~l.c
nanipulating curves, there are also disa&rdl1tages \.hlch limit their usefulness .
Parametnc cub1.cs never reduce exactly to a c:u:cular arc , and so true circles
can only be approximated.
Also,
t.~y
5-5
13ruJlARY CcfiDJTJrJ~S
h~
Eq. (5-26)
l.S
n coll.lmS results.
tx:Jnta.ulS
n - 2 roo-'S.
forrn
rm IP' 1 -
1a1
(5-33)
- is an n M
2 x n matrix
B is an n - 2 x 1 rr.rt.r.ix
at
of F.q. (5-33) is
M(2,1) M(2,2)
P'(I<,l)
r:ic3,2> 11(3, Jl
P ' (1<,2}
R(l\,2)
(5- 34)
U(t\, 3)
ing boundary c:xnlitions lit each end of the total piecewise cubic curve as
sho.m be}.o..o.
(Pi , . . . ,
1 are given by
{5-15)
(B}
P~ >
(5-36)
[P' ) = [l1)-l[B]
cnce the
Vany chc)l.m5 exist for specJ..fyinq the end boundary CCI"lditions for a plcce-
data points are kno.rm or 1.. P"~Ysical cn'lStra.ints require accurate ooot.rol of
the curve shape at the ends .
ing the two end tangent vectors P' and P ' of the total picccoiliso spline. '11tis
1
n
boundary condition is called tile clarrp?d end corrlibon .in Ref . 5-2, and the
encastered spline in Pef . S-3.
tro cubic
1
M(2, 1)
~:(2 , 2)
M(3, 2) M(3 , 3)
(5-37)
BU<,l)
p (l(,2)
BIK,1l
P'(J<,))
B(l<, 31
M(N - 1,
r: -
11
11(N- 1,
Nl
P' (}(,N - ll
B(K,r; - 1)
P ' (K,N)
B(l<,N)
Eina."l'S FOR
126
t-11\'lli:o~TIChL
'Ihis
P ' (J<,l)
.LS
GRAPHICS
= B(K,l)
as is required.
nus
also t.ndi.aqonal.
ro.xiily be solV('d for the unl<noorn tangent vectors P ' (K, 2) P ' (J<,N - 1) .
Since
of recurs1on fornul..as.
appoars in llppCndbc c.
Other CJi cxn:htialS will increase the nlrl'ber of I'O'Izero terms lJ\ the first
and ln'lt ro.15 of the M-matrix. Fbr ex<L"Tple , o::nsider the mathematical c:nd oon2
2
ditLoo that d P/dt - 0.
1bis oondition
.LS
P' +
...
I
P'
- p )
(P
= 1_2
(S-30)
If th('> s<tnv: end cx;r,diti.c:n is used for the last span (K N - l) , with t t
then with the help of f:):Js. {5-29) and (5-30) one obtains
2P '
n-1
'
+ 4P ' = ~(P - P
n-1
(5-39)
It follows that the 11002m'0 terms in the first row of the square (11)-mat.rix are
= 4.0.
M(l,l)
~.
Notice that
otmr C!l1d concli.tions of practical use are the cyclic end oondition and
the antlcyclJ.c end candl.tion . A cyclic spl ine can be used to prodUce a closed
curvo or a portion of a C\J.t"Ve which repeats at intervals . It is based on the
'l\oA':>
(5-40)
(5-4 1 )
Pi (O)
n n
1..c., the s lope .:tnd curvature at the beginning and end of tJle curve are eqtkll.
Recallmq Eqs. (5-16) ard (5-28) to (5-JO) the condition expressed by
Eq.
(~40)
yields
2
P'- P '
1
r -1
3 (P - P
n-1
2P'
P' ]
n-1 _ -E. t
t2
t0
ln n
+3
2(P
- P )
P'
P'
n-1
n + n-1 + ..12 t cs- 42)
t
t2
t2 n
n
n
J r)(l' -
I'n-1 I __
2P'n-1 _
tn
I'']
n
tn
I'']
~ ~
t"
-n
(5-43)
SPACE CURVES
127
These ~ equatioos can be cxxtbined to yield a single equation "'hlch when com-
Note that
sl.q)e and curvature oondi tioos inposed at t:\..'0 of the n JX>ints are no longer in-
dependent.
and sub-
This results in
~]
(5-44)
li n
1\
t2
n )Pl
-1
P2f-2 + p~-1
2(1
+ ~)
t-i(2 , 1)
~-
n tn
t2
(5-45)
(5- 35) as
-t2n
P ' (1<, 1)
t-1(2,2} M(2, 3)
P ' (K, 2)
8(1<,2)
t-1(3, 2) f.1(3, 3}
P' (K,3)
B(K,))
B(l<, l)
t-t(N - l,N - 1)
P ' (K, N - 1)
(5-46)
B(K, N - 1)
r'OII
(n - 1) x 1 rratrioes as required
and
t
2(1 + t;>Pi + Pit;-- Pn-l = 3(P2 t
P1 )~-+
l(Pn-l - Pn)t;;
(5-47)
Equation (5-47) s!nols that the only effect of irtt=osing the anticyclic end
oonditioos is to change the one in the M(l,t~ - 1) position of the f.t-matrix for
the cyclic spline boundary oonditioos (cf Eq. 5-46) to a minus one, as 'n"Cll
produc.ing parallel end spans with end tangent vectors which are equal in magni-
Table 5-l.
'ilili1<> .._ l
U.J Q:J'IIilti oo
1.
~~t.
~ (1,11
~~ :urod
.Mil,ll - l
Ir.a t..ural
n:<JU!Z'I d 2P; dt 2 -
J. ()'r;L ~u.1n:
ell /at. e-o C!l / dL tt
n
.ro
2p
2
~
2
/ dt ~ ~ ~
/ dt
K1
'
rl-l
;o.l
MU-cyclic
B(K,NI
Cl."'f1 (onc4Sbl.Z'Odl
0
2.
B(K,ll
M(N,NI
=l
B(l<,l) I 0(J<,l)
BIK1 1>) ... U(K,NI
l (l/t
1
n
nA(K,N) - 61Pn- P 1
2
M!N,N - 1 )
H(1,2 ) ~ 0.5 K<N,m 4
B(K,l)
M( l,l )
'4(1
,2 ,
~(1 ,1{-1)
(1/~)
-liPn-1 - r n 1 11/tn l
= l
je-tn
(3/2)!P - P
IZidl!f i.nad
t..-..c'l-1
M(l,1 )
~e
M(l,2 )
r-1
~( l,!i-1 )
t:...~,
.. 2 c1 t / t >
2
- tr!tz
s cK,l l 3 <P 2 - P
t-)(P
n-
; -1
<t,!t2 >
1 - p ) (1/ t. )
and
2
d 2v/ dt
~-
t-o
kl
ii
::2
dt
BIK,~) :
undctinod
t~
Kr.-l
Cubic splines will have CXJntinuous first and secc.rld derivatives w.1.th any of
these end ccrditions.
r;;utaticn t.in'O required to invert the (t-lj-matrix can be excessive when cyclic
spline or anticyclic splines are generated .
1'hcse results
AppE:ndix C.
J.n
bcqi..nrung.
dates powts .
throlXJh
'
SPliCE
aJRVES
129
lr-----------------------------~-----------
l't I
~--~--~--~--~--------~--~--~--~--~
Figure 5-2a
l l r---------------~--~--------------~----~--------~
. ...
'
_,
..,
e L---~----~----L----L--~~--~~--~----._--~----~
\1
-'l
2
-u
Figure 5-2b
'
catplrison of cyclic and antiC}'Clic end corrlitioos .
F~gure
s-20 sb:lws bole closed curves, a curve with cyclic end coocli.tions
through the U data (X)ints, the first and last (X)utt being identical at x = 0 ,
y 0, and a curve, also closed, with an anticyclic end condition at x y 0 .
Notice that the di.rectioo of the initial end tangent vector is vertically up.tard,
while the cli.rectial of the final end tangent vector is vertically da.mward.
f'iqure 5-2c OCI!p9.res a relaxed end boundary cx:n:litioo to a cyclic end or::nli-
tioo.
curve.
Uoweve.r, the di.rection of the initial end tangent vector on the curve
with cyclic end conditions is the same as the direction o f the final end t::angent
vector.
E:xarrple 5-1:
'
alBIC SPLINES
;(~
t3
= ~x3
~)2
+ (y3 - y2)2
ero
= 1(1)2
= ~3
and t :
3
+ {2)2
= IS
- 1)2 + (0)2 2
2 is
1 0.5
Pi
0 2
vS (P2 - P1)
2
3/5(5(P - P ) + 4(P - P l)
3
2
2
1
Solvi.nq for the derivatives by invert.inq the 3 x 3 square mtrix and rultiplyi.nq yields
P2
Pj
Thus,
SPICE CURVES
131
Pi 0.2112CP2 - P ) + 0.264l(P - P )
3
1
2
0.2112[1 2] + 0.2641(2 0)
- (0.7394 0.4224]
Pj; -0.1056CP - P ) + 0.618(P - P )
1
2
3
2
-0 .1056(1 2] + 0.618(2 OJ
= [1 .1305 -0. 2111)
Recalling EkJs. (5-11) and (5-27) to (5-30) allo,.,s calculatioo of the ci.Dic
spline segmmts.
P(t) = B + B t + a t 2 + a t 3
1
2
3
4
and
B
82 ;
pi -
(0 0)
(0.3013 1.1308)
2Pi
IS" -
Pi
7s
= ro
01
[0.0293 -0.0472)
Oxx>sing
t/~
11. p2 (1 2)
82
= P'2 =
[0.7394 0.4224}
3(P2 - P2 )
2P '
P'
2
83.
- ~a (0.19535 -0. 31685)
4
2
P'
P'
2(P2 - P3 )
84+ ~ + .2.; [-0.03253 0. 05283]
8
4
4
~
choosing
(5-24) 1 (5-38) I and (5-39) can be easily solved by sl:bstitutioo to yield the
~~ resw~.
An algont:hrl for gene.rat.lJ"-9 cubic spl.L"te fl.ts for n kno..n data p:>i.nt.s
l.S
c.
~ fl.caticns to the" a!:x:M!
r ec"v-.ique "'t-.!.ch
nt:reral Sl"...arch and the use of Gaussian quadrature mtcgration . Details are
descnbcd m the c.1t.ed reference. 'lhe t:ni.q-E feat ure of this n:thod l.S d-.at the
end c::ondltions are autaMtically selected based ~..{a' a rJ..nimiz.auon c:n.tencn.
It hAs been ased
1.n
l.S
~o.hlch scr.et.b~s
.l.S
OscJlla-
I
W' .... :'CJ
- J lie:
- I
-2 ~--~~--~----~----~----~----~----~----~----~--~
2
Figure 5-2c Cc:r.pariscn of
open c.n::ves .
'
11
SPJlCE CURVES
133
alonq the curve, and the lhin1 dd 1vativc is only pieoewisc constant.
Dis-
a.l.on<J
the curve.
If the
-------
I']
A Jrathemati-
5-6
PllNDit-.G
PAFWn.IC
Figure 5-3
J.
defined by the first three points, and the last three points of the
segnett is
~lie
segnent.
consi der four oonsecuti-w points in space specified by the {X)Sitial vectors
P , P , P , and P '1\o,Q overlapping parabolas P(r) and Q(s) between these
5
3 4
6
points are sho.m in Fiq . 5-4. Each parabola qces through three points and each
ur-ooordina~
and P
system
u = P(r)
= or(d
- r)
(5-48)
INhere as shown in F.ig. 5-4 r is rreasured alonq the crord length P P and u is
3 5
neasured perpendlcul.ar to r in the plane defined by P31 P 1 and P The chord
4
5
length between P and P is d. A parabola can be oorpletely specified by two
3
5
end p;:>ints P , P51 and a th.i.rd p;:>.int P on the curve. 'Ibe value of the CXJnStant
4
3
a is chosen such that the parabola P (r) passes t.h.rough P .
4
In a similar rranner I the parabola O(s) is defined so as
The equatia'\ is
to pass thrO\.Xjh
v = Q(s) = 6s (e - s)
(5-49)
4 6
plaoo defined by P , P , and P , and 8 is d'osen such that the parabola passes
5
6
4
throU'Jh P5 'Ihe crord length between P 4 and P 6 is e .
'Ihe par.urctcr t is now chosen as the distance measured alonq the chord
and P A curve CCt>, which is a blend of the blo overlapping
5
4
po.ralxllas, is c::onstructed bet:l.'een P ~ P by use of an interpolalioo schete.
length bct:l.-.;en P
where t
(5-50)
be~
'
bct'w'Oen P
4
Thus, the ur-plane can be defined by the ve;:tor cht prodoct
and P
5
(P
4 -
(5-51)
J) (P
5 - P 3) 0
m,
J
and E>;J.
= P3
+ x(P
- P )
3
(5-52)
(P - (P + x CP - P ))} (P -P ) ""0(5-53)
4
3
3
5
3
5
tem yields
"I
\)'
_, ... ,
. .t-./
x=
';
--;.-;- \
~
<Ps -
'6
P3>
(5-54
PI
d2
,I
Figure 5-4
Parabolic blendin:J.
P(r) = P
r
+
d(P - P ) + ar(d - r) (P - J )
5
3
3
4
(5- 55)
4
3
It remains to deteonine a arrl the pararretric equation f or r
~rdinate system
P(xd)
is
(5- 56)
( t)
Since in the
or
Q -
1
d .x(l - x)
(5-57)
'l1le required relatiooship for r = r(t) can be obtained fran the C}ealctry
shown in Fi g . 5- 5.
It follows that
r = J<d +
tcose
(5-58)
Ps - PJ
cosO= (P - P )( t d )
5
4
0
(5-59)
For the paratola Q(s) , similar equations can be derived using Fig . 5-Sb.
For
(5-60)
and
(5-61)
Once the points are specified, the procedure is to calculate .x using
Eq . (5- 54) and then
a using Eq . (5-57).
l.
uous curve which is also oontinu:rus in first derivative at the internal data
points.
rewritten as
C(t) = P(t) + (~)(Q(t)- P(t))
(5-62)
+ (- l ) (Q - P)
to
At point P4 on the ble.'lding curve, t = 0 and P Q.
ck::
dP
<at>
p4
- <at>
p4
(5-63)
'lbus
P
4
(~t)
p_
(~)
at: p
Ot
a r r(t l
I
C ( t) is
'
\l
!4
~s
::.;1 -
c..._
~ Ohl
- - f>6
terpolatioo
r)
~c
b f>
H:Jw-
FJ ;u.re 5- 5
Ge:m:!tric relatu:nships
r ft.) and s ( t ) .
~g
can te
uSE(}
in reqion.s of high
cur<~ature.
it
was necessary to
...as ~ted.
t.etween points P and P passing through P A fourth point can then be acXied
3
2
1
and the cubic blerdi.nc; seg:tent beb.-een p:>ints P and P detexmined as shoom
above.
Su::oessive points may be added, one by one, and these determine the
cx:nunuous C"Jbic blendJ.nq cu..~ segmmts t.~t make up tr.e interior part of
tlv>
cun~e.
{:011\t
or p:>mts can be
When an artist, stylist, or designer sketches, he or she uses short, over.lappir.g strokes to produce the cootou:r desired .
SP~
Ct..'RVES 137
a OCill'Uter, then the vectors definin<] the points can be qwc..-. ly displayed in a
variety of ways . In sare applicaticns it rray be desirable to sketch a shape
by using parabolic blend.ing and then use the resultinq junclia'l (X)ints as data
Exanple 5- 2:
PAAAOOl.IC
Bu:NDn~
Assure that the positioo vectol:'S P [0,0), P4 (1,1), P (3,2) , rud P6 (4,3)
3
5
are J<nown.
and P
The procedure is
parabolic b l e..,din}.
1.
a. calculate x
b.
calculate (lor
c.
2.
3+ 2
- - - 0 . 3846
13
c~+j><3i+2jl
(9
4)
Ek}.
(5-58)
t
first calculate
\ole
fc2>
= 0 325
+ (1)
- IS
cose=
=
IS l.i3
/5 10
o. 9923
IS li3
and
r = xd + taos~ ~ 0.3846113 +
8t
1.3867 + 0. 9923t
/SID
fbr
t/t
yields
usmg
= 1/3
For t/t
p 4) (P6 - p 4)
X=
:::;
IT = 0 . 6154
(P6 - P4)
B
t
0.325
= ~
e = II3
(PS - P4 ). (P6 - P4 )
t e
0 . 9923
oos6
= tcose = 0 . 9923t
o. 745,
and s
o. 7392 , &J.
(5-61) yields
s
=P4 + e(P
6 -
Q(s)
-=
and for t/t
r1. 121
= 1.479,
Equation (5-62) rray now be used to b l em the bNo parabolas to yield the
desired curve between P4 and P 5 :
C(t) .. (1-
) P(r)
for t/t0
<-=->oCs)
1/3,
ceo. 745)
= ~P(2 .126) +
j.oco.7392)
= 2/3,
C(l.4907) = j-P(2 . 8659)
+ ~0(1. 479)
= [2 . 352 1.6398)
'Ihe results are
c.
SP~
5-7
Be:ziER
ct1RVES 139
Cl.Rves
for
ional-curve generation
1n
certain
~ks
'!his is due to
curves~
..J
Results of parabolic
blend.i.ng for Exanple
S-2.
technique specifies a curve o f unique order, which d::les not vary fran spline
to spline.
ing norc spl ines which are all sti 11 of cli>ic order.
An alternate method o f curve description has been described by Bezier
all~'S
as an artist , stylist or desi9J1&, varying curve shape and order by the use of
easily controlled input pnrarreters until the output rmtchcs the desired shap?.
A Bczior curve is associated with the "vertices" of a polygon which uniquely define the curve shape .
actually lie an the curve; however , the other vertioes define the derivatives,
order, and shape of the curve.
follo.~
the polyga1
shape, changing the vertices of this pol}'9011 gives the user a III..ICh greater
intuitive feel.i.ng for input/output relationships.
increase the order of any curve segnent is to specify another interior vertex.
This qreaUy increases flexibility and owr:co1es many of the difficulties of
the cubic fli>line fitting and parabolic blending techniques .
FUrtherrrore, local
span will
will retain
~ne
rest of the
o.lr'W
P.
---
r.0
,.
p
C'lll:'VeS .
unaffected .
'The mathematical
basl.S
nanial
l.S
. (t)
n,~
where
,n
1i)
= (~)ti(l
~
- t)n-i
(5- 64)
n!
i! (n-1}!
(5- 65)
with n being the degroo of the p;>lyocrnial and i the particular vertex in the
ordexed set (fra11 0 to n)
n + 1 vertices.
(5-66 )
At the start-
3n,O(O) ""
l\t the end point
nl (1) (1 - O)n-O
n!
(5-67)
of a curve se<;rent,
J
n-n
(5-68)
Equatioos (5-67) and (5-68) along with Eq. (5-66) sl'x::7N that P (0) = P and
0
P(1) = Pn; .1..e., the vertices P and Pn lie on the actual curve seg;rent at the
0
starting point and the e."ld point respa:tively.
Another characteristic of the interpolatioo fln::tioo is tl-.at max:iirun
values occur at t
=.
i/n .
-4
9
SPACE CURVES
2
4
J3,2(3) - 9
141
1',
segrrent, sa:,.,
t-=
o, l/3,
P,
for the
2/3, 1.
Then
--
3!
JJ,l(t) .. 11(2) I t (1 -
= Jt(l
- t 2)
= Jt2 (1
- t)
and
31
"u
'
/fP,.
/ I
P,
4
2
l
P(J) ,. 27PO + 91?1 + 91?2 + 27P3
I
')A I
P;;- ~
""~.../I
......... J
PI
cubics.
Table 5-2
Results for Bezier Curve
n=J
J n,i
l/3
2/3
8/27
1/21
JJ,O 1
4/9
2/9
J3,1- Jt(l - tl
2/9
4/9
J3,2 = Jt2(1 -
l/27
8/27
J3,3 .. 1
as shc1...n arove.
tives .
t)
A user can quickl) learn to predict the shape of a curve which will be
142
l~C\L
is given by
It
pr(O) ..
The
L: (-l)r-l.(:)P
.
1. 1.
n.
(n - r) 1 i=O
(5-70)
n!
- (o - r) I
L:
i=O
(5-71)
(5-72)
(5-73)
'lhls illustrates that the first derivative of the Bezier curve at the initial
and fi.nal points is tangent to the initial and final pol}'90n segtrents, i.e.,
the end s lopes are fixed by the directiat of the line jo:i.n.ing the two end
vertl.ces.
P"(l)
= n(n-
)
l ){P - 2P
n
n-1 + Pn- 2
These results illustrate that the second derivative of the Bezier curve at the
initial and final points depends en the nearest two polygon segmnts or on the
nearest three polf9C11 vertices .
or start.ing point are detenni.ned by the end or start.ing point and its r neighboring poly<p1 vertices.
Continuity carlitions beb.'teen adjacent Bezier curves can thus be sirrply
specified.
If
o r where 9 is a scaler .
01 - 0o =
~) CPn
- Pn-1>
0o "" P0
(5-75)
is equal to the starting slope of the next segrent when the three
points 0 , P , P
are col.i.near . FOr the particular case of two adjacent
1
n n-1
cubic Bezicr curves (cf Fig. 5-9) , n = m = 3. If both diroctioo and JTa911itude
of the JOint tangents are to be equal, Eg. (5-75) yields
0 1 - 0 o = P 3 - P2 = ~ - P3
SPJICE
Figure S-9
First-order cxmt.inuity in
~ier
143
cubic segrents.
Thus
0 1 + p2 - 2P3
'!hat is, P is the midpoint of P o . Note that continuity of slope c:nly requires
2 1
3
that P lie on P o1 sare..nere bet\.-een P and 0
3
2
2
1
For the sane P and Q curves above, seoond derivative continuity is given
by
curve, i.e., .it.crease the nl.llber of p:>lygon vertices to rraintain higher order
derivative continuity.
curve into smaller setiJieJ'lts ard m:rintaining lower orders, say C\Dic, within the
~t .
nus
~ts to
get bet-
ter control of the curve shape is one of the major advantages of the Bezier
rrethod .
BEZIER aJRVE
Exanple 5-3 :
P(t) ..
L
P.J . (t)
i=O ~ n , ~
n i
n-i
.n
n!
where J 0 , 1. (t) = (.)t
(1t)
and
\ 1) . , (n _ i)!
1
1
1.
have 4 vertices . Hence
n
6
(i) = i! (3 - i)!
and
J ,
ct>
0
0
= (l)t ct
3
2
J3 , l(t) = 3t(l - t)
2
J3,2(t) - Jt (1- t)
t>
= (1- t> 3
Here n 3, since
we
Thus
Table S-3
)
1',
P,
.L
pl
JJ,O
0
0. 15
0. 35
0. 5
0. 65
o. 85
1
0~----~----~------~----~
I
figure 5-10
P(O)
J3,1
0
0.614
0. 325
0.275 0. 444
0. 125 0. 375
0. 043 0. 239
0.0034 0. 0574
0
0
1
J3,2
J3, 3
0
0
0. 0574 0. 0034
0.239 0. 043
0. 375 0.125
0.444 0.275
0. 325 0. 614
0
1
= P0 = (1
1}
'Incse p:>ints are plotted aloog with the defining p:>lygon in Fig. 5-10.
5-8
8-SPLit~ CLRVES
From a m2.tl'.ematical point of view, a
ver+ioes of a defining
p:~lyyat
C\lnE
tion schcfrc to establish tre relutionship bcO..'eCJ'l the curve arrl the p:>1ygon .
This
schal~ 1.S
~ight..ing
functioo.
As
SPK.'E CURVES
noted in the
prev1.0US
145
'lle;e
cw:ve.
For exnrrplr>, n
cubic curve nust be defined by a polygon with four verttces and three spans.
A polygoo with six vertices will always produce a fift:h-dcqree curve.
'Iha only
'Wa to .reduce the order of the curve is to reduce the n\.'Ulber of vertices, and
cnwerse.ly the only way t:o increase the order of the cur:vc is to ux:reasc the
m.1tbe.r of vertices.
'Ihe second limiting characteristic is due to t..he global nature o( the
Bernstein basis .
\<o~ght.ing
function J
. (t)
n, 1
given by Eq . (5-64) is nonzero for all pararreter values over an entire span of
the curve. Sinoe any point on a Beder curve is a resul.L o! ~<~eighLing th!= values of all defin.ing vertia-s, a change in one vertex is felt 1:hrougl'xlut the
entire span. Practically, this elim.inates the ability to produo:! a local chango
within a span.
Fer e.xaJTPle, siJ1c:e the end slcp:s of a Bezier curve are established by the
aoo
middle vertex of a five -point pol}'900 witOOut changing the di1ection of the
end s l opes .
.LS aff~
The
nonglobal behavior of a-spline curves is doo to the fact that each vertex P. is
l.
of a curve only over a range of parMeter values where 1.ts associated basis
function is nonzero .
\<o'e
again let P(t) be the positioo vectors alon<J the curve, as a fmction
of the parall'cter t , a curve gererated by the use of the B-spline basis is given
by
n
P(t) =
L P.N. k(t)
i-o l. l.,
(5-77)
146
l~ICAL
EII:'0ll'S FOR
en~
GRAPIUCS
FOr the ith oornalizcd B-spline basis curve or order k, the w.ighting func-
1,1
1 i f x. !:. t _ x.+l
{t) =
J0
othexwise
N . k(t)
1'
xi+k-1 - xi
(5-78)
xi+k - xi+l
'lhe
l.
pa~ter
var1.es fran 0 to t
xi.
cate the range of the paraneter t used to generate a a-spline curve with
'
'~ f'OI
vention and use a knot vector to specify the paraneter variation for the
cut""'.l'e.
Fbr cx.a."tple, the vector (0 l 2 3 4) indicates that the par.uroter t varies fran
0 to 4.
(bot>
zero-lenqth
It is convenient to
use evenly spaced knots with unit separation between roncoincident knots.
gi VI!S integer values for the
a:J"IPC)nents
'lhls
In addition to the
I f the order k
equals the nunber of polygon vertices, and there are no multiple vcrt1ces, then
As the
'~
=2
vertices, the p.u-aneter t varies fran 0 t..o n - k + 2 over the entuc curve.
SPJ>a: CURVES
value of t
nwc
14 7
3.
A second-order
lS
tices are rMde to coincide so that a rrultiple kn:lt occurs between the two end
xi+l }.
or by changing tOO nurber and/or p:>sition of nc:nrepeat.i.ng vertices in the defining polygoo.
Figure 5-11 sho.Ys three &-spline curves of different order, each de..fined
by the sarre four polyc;pl vertices given by
0 0
3 9
6 3
9 6
creates three straight lines bet\.Jeen the four vertices, the fourth-order curve
corresponds to the Be'.der curve for the p:>lygat set, al'X1 the t:hi.Id-order curve
produces a looser curve bet-..-een the two end points.
curves have the sane end slopes, determined by the slope of the first al'X1 last
! t r---~--------------------~--------~------------~
'
'
I"
'
Figure S- 11
'
B-spline curves .
.----~--~----~----------~---------------~--------~
5/S
'
'
fL---._--~--~----~--~--~--~----~--~--~
F'l.gUre 5-12
'
"
SPliCE CURVES
149
Figure 5-U shows the effect of rrultiple vertices in the defini.ng polyyoo.
For each of the four curves shown, the order of the curve is equal to the n\.r.be.r
'lb! lower curve m fig. 5-12 is identlc-al
to the lo..er curve in Fig. 5-ll, a fourth-order curve defined by four polyqa1
vertices.
vertex at [3,9) .
at (3,9).
l.n
001
3 9
3 9
3 9
3 9
6 3
6
e . g., four nultiple vertices at [3 91.
can be pulled clo$er to a speci fjc vertex positjoo by use of nultiplc vertices
while rraint:aining the sa~re end slopes for each curve.
decreasing the order pulls the curve closer to all polygoo vertices.
In Fig. 5-13 the defining vertex lS
l l r---~----~--~r----r----~--~----~----r---~----,
'
e L---~----~--~----~--_.----~--~----~--~--~
Figure 5-13
'
II
150
ro o
2 5
I4
8
6 3
6 3
8 6
l1o
'!1lat is,
\>'e
polyr;p1 . Hen! the curve is al t.ered by chanqi..ng the order of each curve, ~
ing the defining p:>lygon constant. The first curve is of order seven , equal
to the m.:'li:er of vertices in the polygon . The second curve is of order five .
'lhls curve shape is closer to the polygon shape, expccially O('ilr the double
vertex.
I
I
Each curve is a
fi.fth~rder
curve, defined by a
'llle only difference bebolee.n
r~cu.
l:lnZt
""...........:lr.
.....t )"~
r.ulll:.lle ~
Fiqure 5-14
'
ll
SP/tCE CURVES
151
each curve 1.s that the fifth vertex is rroved to a new posiUoo, as shewn in
the figure.
part of each
curve is 1.11'\Chanqed.
'1lle &-spline curve technique all.oNs a orne spline to be generated witll three
Ex.anple 5-4:
&-SPLINE CURVE
tLc;ed
in the previous
is [O 0 1 2 3 3) , where we denote
><o = o,
~ =
0,
X:z"'
1, ,
><s
~
3.
N. k values
l.,
needed are
(t - O)NO
N0 , 2(t}
(t)
1
~- xo
c:
N2 , 2(t)
N3 , 2 (t)
X:z-~
c:
t)Nl,l(t}
X:z-~
(x
(t - O)Nl l (t)
N , (t)
1 2
(X:z3
- t}N , (t)
2 1
x3 -
X:z
(x - t)N
(t)
(t - l)N2 ,l (t)
4
3 1
+
x3 - x1
x4 - x3
x4- ~
5 - t>N4 , 1 (t)
(x
(t - 2)NJ , l (t)
><s -
x4
plete results.
P(t)
~TICAL E:I.EME:Nl'S
152
1 ~ ~------------------------------------------------~
'
I S
t L---~--------~------------------_.
F~gure
'
____~___.____J
I
'
I L---~----_.----~----~--~----~----~----~--~-----J
I
?
ll
4
'
Fl.gure 5-16
SPACE O.I'JM:S
153
Table 5-4
'oJeight.i.ng f\mctions for a second-Order B-Spl.tne
0.5
1.0
1.5
2.5
N0,2
0. 5
Nl,2
0.5
0.5
N2,2
0. 5
0.5
N3,2
0.5
l. , )
For t
= 0,
Similarly
P(0.5) P (0 . 5)
0
P(l) = P (0) +
0
P(1 . 5) = P (0) +
0
and P(3)
= p3 ,
polygon vertices.
Now, i f the order of the
four defining polygon vertices, a Bezier curve will be obtained since lhe order
l'lCW
3 - 4 + 2 ... 1) is [0 0 0 0 1 1 1 1).
by Eq. (5-78)
are
(t -
O)NO 3 (t)
0 - 0
t>
Nl, 4 <
N
(t)
2 14
N3 ,4 (t)
(1 - t)N , (t)
1 3
l-
(1 - t)N2 , 3 (t)
(t- O)Nl , J(t)
---.rr----;:o~- +
1- 0
( t - 0)N , (t)
2 3
1 - 0
(t - O)N) , ) (t)
1- 6
l. ,
(l - t)N) , J (t)
+
+
1-0
(1 - t)N
(t)
4 3
1 - 1
evaluations,
0- 0
N , (t)
1 3
~
13 (t )
II
N3,3(t)
:a
(t - 0)N , ( t )
1 2
6- 6
(1 - t)N , (t)
2 2
+
1- 0
1- 0
1- 1
~.
~.
(t - O)NO,l (t)
N0 , 2(t ) "'
(t - 0)N ,l (t)
1
0- 0
(t - 0)N
N2, 2{t)
uJ
I
2
0 - 0
''
(0 - t)Nl,l (t)
(1 - t)N)
l- 0
o.
0 -
{0 - t)N , ( t)
2 1
+
0 - 0
l (t)
( t - O)NJ, l (t )
N3 , 2(t) =
values given by
0 - 0
Nl,2(t) "'
(t)
1 - 0
(1 - t)N , (t)
4 1
+
1- 1
(1 - t)N , ( t )
(t - l)N ,l (t)
4
5 1
+
N4, 2(t) =
1- 1
1- 1
N5 , 2(t)
t)N , Ct )
6 1
1- 1
(1-
(t - l)NS , l (t)
1- 1
example in sec. 5- 7.
and N3 ,l 1 . 0.
For t 0 .5, NO , l N1 , 1 N2 , l N4 ,l N5 ,l
Thus , N0 , 2 = N1 , 2 = N4 , 2 = N5 , 2 = 0 , and
N2,2(0.5); 0 + (O . Sl(l) ~ 0 . 5
N3 ,2 (0 . 5)
tt~rk.ing backward
= (O.Sl(l)
it follows that N , 3
0
+ 0
= N4 , 3 =
Nl,3 = 0 + (0 . 5i(0 . 5)
(0 . 5) (0. 5)
N2 , 3 =
1
N3,3
= (0 . 5 )1(0 . 5)
N0,4
=0.5
0 , and
= 0 . 25
+ (0. 5) (0 . 5) - 0. 50
l
+ 0 = 0 . 25
Likewise
0 + (0 . 5)10 . 25)
= 0.125
&
case,
N6 ,l ~ 0,
SPN::I:. C'tJR\.1&S
155
3,4
(0 . 5)i0.25) + 0
= 0.125
t = 0.5 is
or
= [2 . 75
2.5)
ee~:ier
= 2. 75
= 2. 5, \oohlch
curve results.
Algoritl'lm9 which will generate the required B-spl.ire rusis knot vectors
and the corres{X>nding B-spllne curves are given m Appendix
c.
REFERENCES
5- 1
w.
& Sons,
5-2 South, N.E. , and Kelly, J.P. , "An.llytic SUrface l'ethods," Ford Z.lotor
Catpany N/C Dewloprcnt. ll'rit, Prodl.d: Engineering Office, DeoerTber 1965.
5- 3 Nut.boume, A. W., "A Cubic Spline Package Part. 2 - 'nle Mathematics,"
Cc:xrput . Aided Des., vol. 5, no. l, January 1973.
5-4
Adams, J . Alan , "A Ccnparison of l-:ethods for CUbic Spline CUrve Fitting,"
Carput . Aided Des., wl. 6 , pp. 1-9, 1974.
5-S
t-~,
A rrct:.hOO of c::a1stnlcting
srrooth curves , " SJ\TW\ (Sb:le & Allied Trades Research Association - SATRA
House, lb:::k.ingham
~d ,
soc.,
ll.trro.s . Tech.,
Blending,"
5-10
.JlC
S-11
~iml.
London t 1972
~zier,
P..,
e:xanpte of an Existing
Paris, 1970.
P.F.,
a~
soc.
The
5-13
SChoc.nbcrg,
r.
F\lnctions, "
D!l..~
4, August 1971.
"()1
l-arch 1973.
t.~
COrputer-A.ided Design
CHAPTER 6
SURFACE DESCRIPTION
AND GENERATION
craft, s':ups, nachlne parts, glass..rcue, and clothing are obvious exant>les. ~
b:cldi.tiO'\al way of r<..-prescntir.g a surface is to use multiple orthogonal projections .
Ul
this
nt~Ter
has been denpnstrated by Bezier (Ref. 6-1), Sabin (Ref. 6-2) , Peters (Ref. 6-3),
and others .
Various techniques of anal.ytically and nurerically representlng a threedin'ensicnll surface are discussed below.
a SlJ!'Ple spherical surface .
To
158
6-2
SMRJCAL SuRFACES
SCire
To this
a . 'Ihl.s is
1
The resulting curve lS a parallel of latitu:3e. 'Ihe equa-
t.ioo for the parallel of latibrle is oot..ained by solving the two surface equ.a-
ticns silrultaneously.
~ + y 2 + z2 1.0
(6-1)
Thus,
zw
)
'
r : e0 which
by
or
cx
- by=O
1
1
(6- 2)
..a I
-.
'\
\
-I
,~ I )
~I I
~"
, "'
l'nallcl ol latuudc
Figure 6-1
'!he resulting intcrsectioo of the plane and tOO sphere yields a para l lel o f
longitude .
am
e. ,
the resulting curve, l..
2
il<_!>
cl
+ 1] +
i ::
1.0
-+
where ~
= (cosesin$)e
2
l.Il
(oos~ >e
(6-3)
'11\is
e and
vari.llhles
1\
~.
(6-4)
cos6~
y = sil16si.nQ
z
~;4 ~
v ~ 11/2 .
am
= cos'
9 ~ 'Jl/ 2
Further analysis of
Fig. 6-2 shows that the shape of a b::lundary curve can be descrHvxl by specifylJ
For a
()
II
as
..
as : -(SJ.n'ISi,n<f ) el +
-+
(COS6sin)e2
Figure 6-2
(6-5)
Spherical surface
patch.
$as ..
.. +
.
- {siM)e
(sl.noos)e
2
3
(cosecos)~
(6-6)
At comer A,
(1 =
O,
Tr/2, and
as
..
ai = -c3
At oomer C,
as
1 ....
'aif .. -If~
as
3i =
as;ae
is
1/12, and
~l//2)2 +
"
1 +
e2- 12 c3
the IMgnitude of ilS/il4> is
{1//2)2
1.0
'Ib! l.angent vtctors at all four comers are shown in Fiq. 6- 2 and are given in
Table 6-1.
Table 6-1
Tangent Vectors for the Spherical
surface of Fiq. 6-2
Point
as;ae
as;ae
e2
-e3
1 ....
1 ..
12 2
...
CIS/CI
....
-e
li 2
1...
1 ..
-e --e
12 1 12 3
1+
-;
-e- -e
12
-12l
-el
12
....
1
~ 3
-e3
Iasr~l
The cross derivatives, or twist vectors , at the oomers are also useful
these are
(6-7)
Ia2s;aea.- o
a2s
aea~
Note at oomer A,
.C2eoos2 +
and at
c:os2Poos2~ .. COSQ
(6-8)
vectors and their rr.agni. t' !des for the comers of the spherical and surface patch
are sho.m in Table 6-2.
161
Table 6-2
Point
I /lB(ClS/
<as;ae>
1/12 e 2
1/l'i
-1/12 e 1
l/~
~>I
SUt'face normals can also be u91 to indicate the shape and orientation
of a surface patch .
as
as
N=aexa "'
e1
e2
-sin6sin9
cos9sin4
ocx~
sin6cos~
+
0, N ~ ,
...
(6-9)
e3
0
-sin
~
values.
A unit s urface
N/INI .
(6-10)
and
(6-11)
'lllus,
(6- U)
where
lnl = 1.0
(6-13)
dot procb::t.
;;s ~
as ( C-uinl.llin01e (001i:t~le J ( ((X)Gf.C015;)e
.. .. (5.Ul'c.oa.tle
.. - (sin~le 1 0 (6-14)
~
2
3
1
2
1
Si.nce the dot product of these tangents vectors egual.s zero , the b.o tangent
vectors are perpendicular to one another.
'll\us, lines of
constant
(par-
for surfaces, e.g. , tangent vectors, twist vectors and surface normals,
"-'E!
now
6-3
PLANE
~FACES
Sate of
the boundan.es.
As sha..m by El:] .
w
1
pa.ra!l'eters be u and w.
parcllOOters.
Let these ~
(6- 15)
y g(u,w)
'Ille funct.i.als in Fqs . ( 6- 15) are chosen such that the four bouOOacy cuzves are
u=c
2
c 1 .5.. w
c2
w~
w .. c
c1
c2
c2
(6-16)
in Fig . 6-3.
The functiCI'ls
"''hich represent the actual surface are t:OOse which map this square in the
u..~
are
oXd + ~ XA..
dx auu
~
dy=fuou~
These equations can be written in matrix form as
[dxl = ax ax du1
au~
I'
(6-17)
ldyJ = ~ ~ awj
Equatioo (6-17) relates a differential change in the trN'-plane to the corres{Xltldinc; different al change in the xy-plane.
PlANE SlJRF7ICE
E-::xmtple 6-1 :
x=Ju+w
y - 2u + 3w +
\.5oo'
=0
1.0
= 1 0 .!. w ~ 1.0
w = 0 0 -< u < 1.0
w = 1 0 < u < 1.0
u
ya3x
u = 1
y = 4x-10
w 0 y,..
'lhey are
<t>x
w=l y=x+2
'l11e derivati\1\:.:t which appear in the F.q . (6-17) are a~au
ay;au 2
+ w, and 1y/f!w
= 3
+ u.
= 3,
~~aw
Co.
1,
It fol.lc::Ms that
~ ";)au 2 + w
dx
au
al0119 u = constant.
in Fig . 6-4a .
w=
g(x,y)
u -L
X
(6-18)
,2-
w:y
u- 4
- 1 <w< 4
1 <w < 4
w=1 1 -< u
w- 4
". ( '
C]-----+--------------+---
-<
l.i.u.i.. 4
ies of surfaces.
c,
.c,
~--~-----------------~
Before~
c.,
'lllere
it avoids infinite slope values with respect to sare arbitrary axis system, it
all~'S
iooal. harogeneous
i.e., a surface
l.S
~se
fashial;
No
necessary.
Here t is a paraneter.
As we have seen
in the previous
Figure 6-4
functioo
P(u,w)
A
= (x(u,w)
Plane surfaces.
y(u,w) z(u,w)J
P('\ ,w) represents a curve along u = ' \ constant, and P(u,wi) represents a
curve along w
w1
cono;tant.
pararrctcrs, e.g .,
data.
0 is the vtX:tor defining the surface coost.ructed from the input data P .
four corner points of the surface are given in the u ,w-plane by P(O,O), P(O,l),
P(l,O), and P(l , l), the corners of the unit square. tte wish to construct a
bivariate functioo or bilinear surface Q(u,\.,t) where (u,wc(0,1)) allows us to
(1 -
=(
u) u J rP(O , O) P(O,l)]
LP(l , O) P{l,1)
[1 w
wl
(6-19)
(u = w = 0.5) is sirply
(P(O,O) + P(O,l)
QCO . 5, 0. 5)
PCl,Ol + P(l,l))
general, a bilinear surface and t-'le (Xlsi tion vectors of t!-.e ccmer points
of the surface are three dJ..""eJ'\Siona.l. 'Ihis is perl'>.aps easier to sec i f "-"e write
Ec;. (6- 19) in a rrore o:xtpaet IT'dtrix forr: . In particular ,
tn
L~
PI(! II - - -- - --,l"illl
Ql
PtU 1Sll:!5t
p ( I 01
Pl0.01
.. ..
a.,
,_ .
QtfJ.O)
. ..
Figure 6-Sa
""L '
-~~01.11
Qr flJ
..,
r (1
Fig. 6- Sb tr.e
as~
In
dix
5-6
c.
loFTED 00
R1u.o
SuRFACES
shipbu..l.d....r.9 ..n::lw;tries.
bor.Jndary
c-.JI:VeS
tained by
.i.r. Chapter S.
t.~
11\
the
a."l}'
A ruled or :ofted
t"-'0
unit square
surf~
of
is then ob-
The intcrpol.atioo ~ is
(6-20)
1'<1 II
I
O.S / )
\\COnSI:lOI
10
I'll 01
u-
con~tant O.S
'
II
lj
If
z
I
I
I
Pcu.IJ
Q f)l.tnc
Plu.lll
l>fO.(ll
I0
p(l I l)
((1-u) (1-w) Cl-u)w u(l-w) w) 0 0 0
0 1 0
l 0 1
01l
Figure 6-Sb 'lhree-dirrensional
bilinear surface.
and P(l , \,.) are knc1Hn.
O.St
Figure 6-6
P(O,l)
P(l,O)
-
Ql~
lofted Surface.
0(0,0)
= P(O,O),
etc.
(6-21)
Ex:anple 6-2:
'I\.'0 curves
sec.
U>f1w SURFJ\CE
5-3) .
Ne wish to find the equation for the lofted surface bebo.U!ll these two
l.xlundarlcs. 'l1'le cubic spline 5Cg~Ml'lt.s are assu-ned to have cl.arrped ends.
1\.ssi.M:! for
P(u,O)
p1 -- (0
p2 .. [0
P'1- [0
P'2- (0
and
0
l
1
1
0]
O!
1)
1)
P(u,ll
pl. [1 0
p2 = [1 l
P'1- [0 l
P' (0 1
2
0]
1]
1]
-1]
ocu,w) . lw 0 0] (0 l l)t
'Zhi.s is the surface
fr-7
Ltt-lfAR
Qxx.Js S~FACE
If the four bounda...-.y curves P(u, O) , P(u , l), P(O ,w), ar.d P(l,w) are I<J1a.m,
then it
rni~t
S\:1\
r..qs .
(6- 20)
If t:lus
1.5
dale, then
(6- 23)
- P(O,O)(l - u) {l- w) - P(O ,l)(l - u)w - P(l , O)u(l- w)- P(l , l)uw
An exarrple of such a surface is ~ in Fig. 6-7. It can be readily stn.n
that at the oorner,
Q(O , O) = P(O,O)
etc.
\\hlch .inplies that the interpolation is oorrect at the oorners and bo\.t\daries.
'Ihis linear blend of the four boll'ldacy curves is +Xe s.inplest Coons surface.
A rrore general COOns surface is discussed in Sec. 6-17 and Jef. 6-4.
notation,
at.
In vector
LP<l,w)
IPo,o> PU,uJ
-w]
w
or nore <XJLpactly as
Q(u,w) [1- u u 1] -P(O,O) -P(O,l)
P(O ,w) 1 - w
-P(l,O) -P(l,l) P(l,w)
w
0
1
P(u,O) P(u,l)
'ltle functioos (1 - u), u, (l - w), and w are rolled blending fmct.ions because
t:Ney blend the boundacy curves to produce the internal shape of the surface .
Exarrple 6-3:
Let the four boundary "curves" be the d.iagc:nals of four of the sides of
'''e wish
[0 . 5 0. 5 1)
~ (6-24)
yields
01 0.5
-1 -1 lJ
0 . 5 0. 5 0
0.5
l
An algorithn
which will
~ate
6-8
It
ing functions .
IJJ
''
s-3)
BJ.
(5-ll))
P(t) ~ B + 8 t + B t 2 + B t 3
(6- 25)
1
2
3
4
Figure 6-7 Linear Cbon' s surface .
"'here P ( t) is a vector-valwd fmct.ion
having x-, y-, ~tpcue.nts. For cawenience we limit the range of the paranenter to 0 ~ t ~ 1; i.e., we use a nox:rna1 ized pararretric cubic. For the
bo\J'ldary curves of a surface, t "" u for one pair of curves and t w for the
other pair.
We
no,..t
the points oo the unit square beb.~ the bolo paranetric Cl.bics describing the
edge curves , i.e ., bebo."een P(O) and P(l) . '!here are four \l1'lltnam coefficients
i.n BJ. (6-25) , and thus we nquire four i.ndepenoont equations . Pecalli.ng that
the derivative of the pararretric cd:>ic is
P' (t)
= 82
+ 283t + 3B4 t 2
(6- 26)
and letting t 0 or 1 i.n B:Js . (6- 25) a.nd (6- 26) yields
P(O)
(6-27a)
= ~
: 8 + 8 + 8 + 8
4
1
2
3
P ' (0) = B
2
P' (1) = 8 + 2B + 38
P(l)
(6- 27b)
(6- 27c)
(6-27d)
P(O)
P(l)
p. (0)
P' (1)
rs4
0 0 0 1
(6-28)
1 1 1 1 83
0 0 1 0 82
3 2 1 0 (J31
or
p.,. MB
Solving~ .
(6-29)
2 -2
-3
(6-30}
(6-31)
3 -2 -1
0 0 1 0
1 0 0 0
'lhis agrees with F.q. (5-22) .
arranging yields
= (t3
t 1)
2 -2
(6- 32)
(6- 33)
-3 3 -2 -1
0 0 1 0
1 0 0 0
'Ihe F i ( t) ' s CM be oonsidered as scalar blending fU'lct.ioos for the pararretric
ctbic.
'lhey blend the quantities P(O), P(1), P'(O), and P ' (l)
a cx:nti.nuous
C\l.t'W.
to !onn
~ther
~as
aua
\F\li
p (0,11
P(l,O)
P(l,l)
r 1CwJ
PO,l(l,O) ~O,l(l,l)
1
P 'Cl,O) P1 ' 0 (l,ll r 1 1 c1,01 P1' 1 Cl,l)
(6-36)
f";> (wl
Cw)
r 4 (w)
(6-37)
is the
~r
NT is the t.ransposc of N.
r 1 , F2 , r 3, F4 , four Cl.bic
bo\a'ldary
curves , four oorner points , eighL tanCJent vectors at the oorncrs, and four twist
wctors at the oorners .
'nle 4 x 4 P-rnatrlx may be considered as a boundary oondition rr..).trl.x.
It
cxntains only infonratioo aboul oome.r points, oorner tangent vectors , and
oomer twist ~ctors. For a given surface patch all thP elennnts in the P-
CoTJ"Pr
p;:
s}n..os
w-tangent
ooonlinates : vectors
_ _ _ _ _ _ _.,. _ _ _ _ _
u-t.angcnt
vectors
Twist
vectors
o,
P(l
,~r1)
= P(u,O).
A carp t ete deri vatim of the oonstraints inposed on the blending functialS
~f.
6-4
The
sh~
P-rratrix, i.e., by tho l.ocatioo of the oorner PJSitioo vectors and the fT\agl\itWe and direction of the correr tanqent and bast vectors . Figure 6-lOa
stn.os the effect of c:hanging thr> magnit\XP but not the dirccticn, of the oorner tangent vectors along the (O ,w) ari<J Cl, w) boundaries.
the effect of chanqinq the direct.J.on , bul not tl'lr> JTagnitude , of these sare
comer tangent vectors.
174
Ho..-e'lleJ", several
nust be specified
an order
zw
ha'v'e
Figure 6-9
Table 6-1
Bounda!y Corxli.tion Inposee Constraints on
=0
or w = 0
= 1 or w = 1
Fl
F2
F3
F4
F' *
1
F'
F'3
F'
t>
P0 .1(0.11
\ a rt <lllllfl ul IIIIIScnl
ma,n uudc
~<Cllol
dared tun
...-......
pO.I(O.Ol
[)
Ze ro
I\\'"' a t C
Figure 6-10
0 1
t:.angent vector P ' (0 ,1) points ;rway f.ran the inte.rior of the boundary curve
as shom in Fig . 6-ll . Also note that increnenting the y-cx:xrp::l')ent of the
ex>mer tangent vector P0 ' 1 (0 , 0) causes the (0 ,w) boondary CUlVe to bend q:> ,
0 1
"hereas incresnent.i.J'lg the y-cx:rrponent of the corner tangent vector P ' (0,l)
an equal anount has the opposite effect at the (0 ,1) corner.
pected behavior occurs when inc:rerenting twist vectors .
'!be sare
ll"teX-
twist vectors cause qJpOSi te surface beOOs at the (0 , 1) and (1 ,0) ex>rners
cmpared with the effect at the (0 , 0) and (1, 1} oorners .
the
~ts
Thus, manipulating
6-9 THE
F-PATOi
176
l~J\!HE.l>oo-ICAL
pO.Iw o
pO lw 1
In partic-
a lnattal cunc
6-10
BEZIER SuRFACES
'lhe previous sections have dis-
description .
culty .
to surfaces (Ref. 6- 8) .
'lhc surface equation for a Bezier surface patch can be written in the
CUI"VeS
described
given by
3
P(u,w) = [(1 - u ) 3(1 - u) 2u 3(1 - u)u2 u 3)18)
(l -
w) 3
3(1 - w)
3(1 - w)w2
w3
8= ~( 1,1 )
The {X)int 8 ,
de.f.ines
2 1
the slope vector fran the first to the
The p:u.nts
8 1,3'
8 2,4' 83,4 ' 84,3' 8 4 , 2' and 8 3,1 are defined in a similar manner.
'lbe tx>ints
s 3 , 2 interior to
2 3
3 3
the defining X>lygonal surface are used
~, , 8 , , B , , and
---
"
( 1 - .....
Cl'l
'Ihese X>l.Ilts
-- Unundar )
serve to define a
Llc ~li!O
Sur (;aH
ur(act
ntt
Figure 6-12
To generate a para-
4 x 4 Bezier surface
~ture .
rretric curve on the Bezier surface shown in Fig. 6-U, let the pararretric curve
be defined by 0 ~ u ~ 1. 0 and w =
'i.,
where 0 <
'i. ~ l. 0.
can be generated, the elerrents in the s-tensor given by Eq. (5-53) DUSt. be
known.
For w =
S,
(6-40)
3(1 - w)~
3(1 - wlif
w3
w=C
produces four position vectors P , P , P , and P for the Bezier polyyon which
4
1
2
3
defines a Bezier C'UI"Ve with a pararretric value of w ""
The point P lies
1
on the surface bo\D'ldary OW, and the p:>int P lies on the surface bourdary 1w.
4
The points P and P are slq:e des1gn points which lie o ff the curve.
2
3
'nlen, the rMtrix prodoct
'i..
P(u,c )
1
3
[(1- u ) 3 3(1- u) 2u 3(1 - u)u2 u ) P
1
p2
p3
p4
(6-41)
giws the e>cpressioo for a point oo tbe surface along the curve w .,.
eadl value
U1
c1 .
For
F.q. (6-41) gives the oorresponding position 1.>ector for the point
on the surface.
The bol.lldary C\.IJ:'-~ for a Bezier surfaoo can be defined in an analogous
For
(6-42)
3(1 - w)wl
w3
or alternately,
(6- 43)
z.
~
1.0 1 w = 1. 0 is
(6-46)
412
8
41 3
84 ,
'Ibe equations for the other two boUI".dal:y curves can be written directly 1 with
a couplex surface.
=1. 0
w 0 is given by
=0
w2J
(6-47)
is
(6-48)
--
a,,
P(u,w) = ((1- u)
2
4u(l- u) 3 6u (1- u) 2 4u3 (1- u) u4 ][Bl f (l- w) 2
t~l
(6-47)
w)w
curve, since a change in the central design point does not effect the slope at
either end of the bouroacy cu.rve. 'lllus, t.l)e surface shape can be changed without disturbing the slope design points, which may then be independently spe<:J.fied to satisfy continuity requi..rerents with adjacent surfaces.
'1lle Bezier surface discussed above can be represented in the fonn of a
cartesian product surface. In particular the surface .l.S gl.Ven by
Q(u,w)
{6- 48)
(6- 49)
f.!iwi (1 - w)m-j
(6-50)
n,J
and m and n are one less than the mll'ber of pol}'9011 vertices in the w-
aoo
hand curve is first drawn with a pencil in the xy-plane to give y f(x) .
'1lle result-
ing Bezier curve is then drawn by the CXZtpUter controlled drafting rrach.ine.
pol~t
If
nus rrethod is used to define the four bomdaJ:y curves for a surface .frane-
\o."Ork.
design
~rk
points.
or into a c:arputer ccntrolled cutting rnach.iJ1e to pronodel !ron a block of polystyrene foam.
any point to produce a pair of cxmtinlDus C\.I["\1!!5 of the sarre order as the previoos single curve. 'Ibis system is described in Raf. 6-5 and discussed in detail
in Raf. 6-9 .
Serre of the difficulties associated with Eq. (6-48) as with the eezier
curw are concerned wi. th local control. This is because the Jl'O\Ie'!'ent of one
point on the polygonal generating surface will affect the entire Bezier surface .
work.
'lhe use of a B-spline basis, i.e . , by using B-spline curves as bl.endin<} fmc-
Eq. (6-48), using eezier curves as the blending f\.D"'Ctions, is given in AWendix
c.
Perllaps the
Q(u,w) =
rn
L: L
i=O j=O
,]
~.
],
(6-51)
N.
l., 1
(u)
N. k(u)
1.,
0 otheiwise
xi+k-1 - xi
xi+k - xHl
and the xi are the elem:mts of the k knot vector discussed in Soc. S-8 .
(6-52)
Further,
~ , 1 (w)
lo~ise
=
(w -
],
yj-+L-1 - yj
yj+L - yj+l
ale
(6-53)
sec.
5 8, and m
srown
s.
A. Coons, ~-1. J.
6-12
scalar funct:.ioo B
'lbe
r,1. (u) .
introduce a
<je.l"lel"al
The r subscr ipt indicates that the general blen:l.i.ng functioo is TNeig.hted
by a single-valued function representing a bourx1ary derivative of o.rder r .
tors, r
==-
2.
vec-
sr,i . Here
we assi.Ure that u = u
1 is inplied:
e . q .,
BO ,l (w) is the ble.ndi.ng function weighting the curve P(u,l).
s0 , 0 Cu)
ls the b l ending
f~oo
Forrest (~f . 6-10) has pointed out several properties of these blending func-
tions.
f
~ Oij lS the
.(j) =6 ..
0, 1
lJ
182
s0 , 0 CO)
.. 1 and
s0 , 0 (1)
o.
s0 , 0 Cu)
but
s0 , 1 (1) 1, (1 - w)
and w by s , (w) with
0 1
s0 , 0 (w)
s0 , 0 (0)
s0 , 0 (l)
-= 0
Equatioo (6-19) m:ty then be written as
= l and
Q(u,w)
L s0
i-o
. (u)P(i,w) +
, l.
E a0
j~O
j (w}P(u,j) -
o,
0 1 Cu)~O,l(w)P(l,l)
E E
i=O j=O
'
~ s ,
0 .~
COOns
Otu,v)
~<~here
the blendi.ng furx:tioos , i.e., the Bij ' s, cbey the relatioo.s
p
6 (B
r ,1. (u) 1
= Br , l. (Uj)
= 6
pr . 6l..j
\.F\1,
)
Thus
80 , 0 co>
s1 , 1 CO)
catparisoo of F.qs. (6-55) and (6-56) with E):}s . (6-34) , (6-35) and r ecalling
D:j . (6- 33) shows that
3
(8 , Cu) & , 1 Cu) f\J,O(u) B , tu)J,. (u
00
0
11
u 1)
3 -2 -1
1 0 0 0
and
3 w2 w l)
(w
2 -2 1 1
-)
0
) -2 -1
0
1 0 0 0
(6-57a)
we see that
~.
(6-36)
OCU,v ) ..
L E
11
pr 'OU ,w)ll
lui
r,.
1-<l ,.0
By substitutioo
L ~
TO ~
11
J""' (6-58)
0 o,l(i, j) PO,l(i,j)
. ') -- pl , l(l.,
. J' )
0 1 , 1(1.,)
ard aloog the boundary curves
O(i,w) = P(i,w)
Q(u,j) P(u,j)
0o, l(u, j)
0
=1
1,0(.1. W) -_ Pl'O(.l. W)
1
1
boundaries to first order i.e. , bicubic patches may be joined with first order
CXI"'t.inuity acruss the boundaries.
Forrest (Ref . 6-ll) has sho.om that it is p:lSS.ible to generalize U1e Coons
surface descriptioo su::h that higher order bollndary cx:n:litians can be satisfied.
order
llt
and to
pr, O(i,~) ,
with 0
funct.ioos by
1
Q(u,wl
1o.()
.l
~~
,:::()
~ r ~m1 ,
ar , .1.. Cu)
r
and B
0 ct,w)llr
. (w) .
s,J
1
,1
(U)
~ s ~nj ,
"1
Lo
~ ..
0 1
P ' Cu,jlf 11 , M-
,'
01
.,
E 1: riO()
L 1:
Pr'
CP()
110() }II()
6-59)
(1.,)1&,. 1 cuHI8 M
,
,1
for 0 ~ p ~ m1
(6-60)
for 0 ~ p ~ nj
It should
be noted that rrost inplenentaticns do not utilize this fonn, but rather ooe of
PO , s(u, j)
(6-59)
fi'i
L L
pr , s(i,j)Br i (u)
iO r=O
then the last two t:ems of Eq. (6-59) cancel
'
o<u,w> =
rn.1
r 0
L:
L:
p , <l,w> a . <u>
i=O r=O
r,l.
p r,O(.l.,W ) =
(6-61)
Siroilarly J.f
n.
L ~
l.S
Q(u,w) =
n.
j ::{) s::::O
J. (w)
(6-62)
If both the condi.ti01S represented by Eqs. (6-61) and (6-62) are iJTposed,
then the surface equation is
1
Q( u w) =
rni n.
L
.L
L
~ pr' s(i-j)Br i (u)Bs
ieO JO r-0 s;O
j(w)
(6-63)
F.quation
(6-63) or the lofted surfaces represented by Eqs. (6-61) and (6-62) are
Yhen m
n. = 1 and the 8 . . 's are given by Eq. (6- 57) , Eq. (6-63) repre1
)
l. , J
sents A bic\bic patch, i.e.,
1
Q(u,w)
L: E L: L:
form.
only en oomer infoanation - positicn , tangent, and twist vectors , alalg with
the cubic blending functions to determine the interior shape of the patch .
The
rrore qeneral.
Notice thllt in Eq . (6-56) and its special cases, 5\.ITI'IUtion occurs for
i
This
in'plies that the interior of the surface patch is govemee entirely by the boundary CUl"V'Cs, oomer points , oomer tangent and twist wc:tors , and the blending
functi.cn.
lf, however,
"'~ 5\.IITl
thr>...n all curves P(u ,w) and P(u,wj) between the boundary curves, and in fact any
1
interior curves and bound!uy ccnditioos to assist in controlling the inter ~or
In this case the surface is ~ represented by
0 u,w)
.,
"
)~
1-o M
,.c.
(u1,VIt r '"'
IJ
l:
I" ,c (u,wjiO
)'<! ...0
.J
'wl -
.,
l.. L ) ~ [
o_.,
"-<! .:;()
IMI
,,r,,l<l " )
I
r' &
t
li
."'1
(6-64)
6r,i (~) 6
pr
p
nj.
and the corner points, CO!i1er tangent, and twist vectors at A, B, C, and 0 are
interior blended surface where the interior curves P(u ,O. S) and P(O.S,w) are
also consideruc:.
'!he generalized lofted surface and the cartesian product surface can be
obtained in a manner ana.l.ogous to
They are
given by
H
Q(u,w)
m1.
= L0 L:0
Q(u,'W) =
>.=
r-
n.
L ~
r 0
p ' (u. ,w) 8
~
PlO.II
. (u) (6-65)
r,~
-._.;...
P..:Iu.:.::I)_ -!:!PII. II
('
0 5
P ' (u,-w)B
j=O s=O
(6-66)
j (w)
'
and
P(u.OI
(6-67)
introduction to scrre of the current rrethods for curve and surface descriptioo.s .
l>\any other techniques have been
~s
suggested
of
SIXX)eSS.
Figure 6-14
\pln
specific
Px001errs
graphical dl.splay, etc . , are the types of requ.irerrents that will arise.
Sere
liau-ature.
The reader of this book sOOuld be able to build upon the founda-
RFERENCES
6-1
1'.\Meri~,
r.u.sson et Cie,
soc.
'1he British
soc.
6-3
II
II
trial and Applied Mathematics 1973 National l'leet.ing, HMpton, va., 18-21
June 1973.
6-4
6-6
o. ,
Edited
1971.
6-7
6-9
Armit , A. P. ,
"~ti.patch ;mel
APPENDIX A
COMPUTER GRAPHICS
SOFTWARE
IP
lit
I~I
Ill
parts are the sq{X>rt CXJTpUter and the graphics device itself.
harct~e.
taken.
In general, the st.q?part catpUter is the system on \olhich the data base
However , in
systcns.
CXXJp..lter
'Ihe gra[i\ics device is the hara..mre which actually produces the picture.
'llle
mathematical basis for this system is the topic of the main part of the book.
noiTI\ll "drawing functions" and the hardware associated with a particulnr graphics
device.
~ce to
A-1 U:wuJtR
tMPHICS PRIMITIVES
systan
In partic-
Q{}'
high-speed printer , electrostatic dot matrix printer, or the pen oo a pen and
ink plotter, ~-
We Wl.ll briefly
IIRIT
Fran
~PI.lATIDl
::
be developed
secticn.
'lbe boO graphic primitives associ-
!VI~
MlA &'~
.-1-.I
C,_.,UCS
tEVTCfS
is sel -explanatory.
190 MM'HENATICAL
etc.
For sare gra~cs dev:Loes , particular nodes ZMY not be appropriate and for
others additional
nojes
also be regul.red .
are required.
...mere
ease a
particular exanple
~uld
I~
II
UX:a1 track.in9
node can be used to act.l.vate hardware, whlch allows a visible cursor at a CRI'
~cs
All .interactive
coputer systems and higher level languages have adequate faci 1 i ties for accepting alphamJroric character input, and hence character in?Jt is not considered
as a grafhic primitive .
oc
~
oo respectively.
specific nean.inq, as indicated above in parenthes.is to the right of each individual f\lJlCtion .
cntpound graphic elcrrents which are of nnre intel:'est to the general user.
A-2 CdwreR
GRAPHIC
Eumrrs
i.e., they generally involve rrore than ooe of the graphic primitives. 'lhe
grapti.c elercnnts are of nore fundatrental interest to the user than the ~c
primitives.
In fact , tOO
user
h}a.in, as with the graphic primitives, the graphic elerents can be placed in
three categories : drawing functions, term.ina.1 or picture control f\..B"'ct.ials, a.OO
interactive device control func:tials.
'1lle classification rrethod discussed in Sec. 1-6, as ~Nell as traditional
A user
will .....ant to be able to nove the cursor about without drawing, to draw a lule,
and to plot a point.
o r relative coordinates.
1-bve Absolute
1-blle Relative
Point Absolute
Point Relative
Draw Absolute
Draw Relative
In addition the user will want to b! able to print textual nnterial at a speci-
il
ll
I~
II
the current
!X)Sit ion
of the cursor.
z.m
1.
2.
3.
4.
r-bve to the coordinates sped ficrl - MJJE (coer. I coer . 1 <ooor. >)
5.
l.
2.
3.
4.
5.
6.
7.
<coor . >)
2.
3.
2.
3.
4.
6.
'1\lrn cursor on -
7.
Print characters
8.
M.DE 2
CN)FF
'The four relative coord..mate el.c:!rel\ts have the sare algoritl'ITsl except that the
tlu.rcl oc::mnarrl sets relative nrxk ~mE 5) . Tho above algorit:tm; set each required
in
additi<na.l cattplc.xity.
might be
1.
2.
3.
4.
~bve
5.
~OVE
'lhi.s schere requires that a small storage b.lffer \o.hich oootains infonnaHon
representing the "state of the device" at the end of the previous graph1c OJIIm:md
exist.
~.
Further, analysis
ca:~
Terminal or picture CCI'ltrol g:raphic elerents are associated w1.th initia 1iz-
ing the graphic device, erasing the screen for storage tube CRr graphics devices,
start.ing and ending frarres for refresh CRr graphic devices, and buffering the
data stream and on CXl01'TIClOO sendiJ'lg it to the graphics device .
graphic elerrents
Initialize the
~vice
Begin Fraire
~Buffer
serves to set the default ccnditioos and zero the outpUt buffer; the Begin Fra!re
COII'and serves to erase the screen for storage tube CRl' grapuc devices , to
indicate a new plot for pen and ink devices, am to rotify a refresh grapuc
devioe that the picture is curplete and a new frmre nust be started. 'lbc 0\Ilp
Buffer CXX'I'ITland serves to send the stored data stream to the graPrics device and
2.
3.
set
4.
5.
6.
7.
l.
Ill
As
~~
I~
As discussed
Again ec:cnanies in
the data strean can be obtained by using sq:histicated chedti.ng procedures for
the various nodes, etc .
1here are three spaces that are of interest-user sp.x:c, canonical space,
am device spaoe.
the graphics device nust be <Oiressed, e.g., raster points or units for CRI'
devices, inches or oentirreters for plotters, etc.
Fig. A-2.
By using a
obtained.
is
----
0 1'---
I ' - ----:-
n User space
6 211
i.e., the
addr~ssable
ical
assl..llled for
arrong graphics
-----
dressable area .
0'---- - -
b Canonc al ip.acc
(\. )') r
1024
rhi~
--
780
o ~ Yv ~ o.a.
definitely.
area is asS\.J'!9i to be 0 ~
Xv ~ a ,
where
one.
Q1e
Figure A-2
Grat:hlc spaces
'lb.i.s is , of oourse,
APPENDIX B
MATRIX OPERATIONS
I!
II
II
A few sirrple rules fran natrix algebra are given here for convenience.
8-1
governed by these
T~Itn.OGY
'Ihe array of nll'lbers \o."hich make up a natrix are called its elements .
'Ihese
13 ~4
~~2~3~4
l"CM
oolum.
Thus, a 34 is the element in the thixd reM and fourth oolum. A natrix
of m l"CMS and n oohrm.s is cne of order m x n . In the square nstrix abo\.~ ,
'\! ~ 2 ,
~ ,
and a
i<lcr.titJ.! rnat.t~:..X
is one in \lohich every ela:ent is zero, with the exceptioo of the diatplal
elerents , l.o.hich are all U'l.ity. An exanple of a 3 x 3 identity rutri.Jc is :
1 0 0
A zero matJ-i.z is one in which every e 1errent is zero.
An
0 l 0
0 0 1
'l'No matrices are
qual only when each e1eroont in one is equal to the corresp :n:l-
B-2
b.Q
defined.
sa~re
1 2 3
1 4 7
4 5 6 + 2 5 8
As an e.xanple :
2 6 10
6 10 14
7 8 9
3 6 9
10 14 18
1 2 3
4 5 6 7 8 9
1 4 7
2 5 8
0 - 2 -4
and
B-3
3 6 9
2
4
0 -2
2 0
t'u..TI PL ICATION
t-latrix n'lll.tiplication is the nost useful matrix cp"ra tioo for cnrputer
graphics .
n2 x
"'2
equal the value o f n '111at is , the nllt'ber of co11.11V\S in the first natrix must
2
equal the nl.ll'b:!.r of rows in the second matrix.
'lhe rules for matrix nultiplicatioo are best described by the follCMi.ng
exanp1e.
3 x 3 , then the matrix prodoct (A] (B) is defined by the following op?ratial .
u u u
. 21
"'ll
~1
bll
~)
.,1
on 6 )]
n u
010
2J
43
~~~
'1.
f1. x ~
x 11'2 rratrix.
"'1 3- r1 21
4 2 L) 4j
1 1
4 +
6 8+ 8
1 +
G.
6 4
l3 2.,.
u, =
l+ 9 2 +
2 +
12 12 + 16J
+ 6 6 + 8
ttt = ~,
10 16 1
4 6
18 28
L 9 14_
'Ihat is,
1.n
ciative law
-10 141
produces
a:.
Also,
t.~
asso-
applies .
l.S
denoted by
AI .
'lbe det.e.rrni.nant
lf
M=
r all
en ~3
a21 a22 ~3
l a31 a32 a33J
~1 a12 ~3
4
21 ~2
23
of
3 9 4
6 1
81
12 5 3
'lhe result is
-17
1'11\TRIX
B-5
OPEAATia~
199
t10St catp.lt.er languages have fmct.ions or subrouunes "ni.ch will perform U1e
repetitive calculations necessary t:o evaluate the clCJI'Nlts of the inver$(. o f '
given matrix.
In algebra, where single variabl es are ccnsidered , if ax:. Y 1 then x "' a- 1J',
...nere
1/a.
In 1ratn.x al<)Cbr::ll,
aro
if (A)(X) = (Y] 1
noosingul.ar.
l:bNever, if the
determinant of the square matrix is nonzero and an inverse exists , then that
inverse is unique.
'Ihe inportant property o f a matrix uwerse that is used 1n thi s book is
that, for any square matrix [A), the equal.J.ty (A] (A]-l
= {I)
is valid, where
1 2 3
1 3 3
2 4
6 -2 -3
1 0 0
-1 1 0 0 1 0
-1 0
0 0 1
1
If this p.roduct is represented by 1\1 (B] = fil, then (Bl is equal to (AJ-
APPENDIX C
DATA BASE
MA IPULATION
ALGORITHMS
II
II
l.1l
la."'9".1a9es . The algont:h:':'.s are rot intended to be tlY.. rrost efflcient posslhle.
'!h..~ are mtended to be in.st:.n.r=tive. Eac.'ll of the transfomation a:go:ithlts
asst.meS that the data base is presented in ord:.nary coordinates. 'llle algorithm
then develops the necessary hcn:x;eneous coordinate representat:.J.cn, performs the
transfot:m:iticnl and returns to ordinary cxx:>rdinates.
2DTRANS
100 SUB" 2DTRAl5" : P, X( ) , Y() ,M, fJ
' 2-D
110
' P:Ntl-:BER Of X,Y- PAIRS
120
' X( ):ARRAY CONTAINit\G X-ax:JRDitU.'TES
130
Y() : ARRAY CONTAlNir\G Y-COORDir~TES
l 40
150
160
170
180
190
200
210
220
U=ZER(P , 3)
MAT V:ZER(P , 3)
FOR 1:1 TO P
LET U(l , 1}:X(I)
LET U(l , 2):Y(I)
LET U(l , 3)=1
NE:.XT I
~~T
230
240
250
260
270
280
290
300
310
320
330
TRANSLATION
MAT T:ZER(3 , 3)
LET T(1 , 1):T(2 ,2}:T(3. 3)=1
LET T(3 , 1):M
LET T(3 , 2):N
~1AT
V:UT
FOR I=1 TO P
LET X(I):V{l , 1)
LET Y(l):V(I , 2)
NEXT 1
SUBEND
RDIMFt:SION
~v
FI LL WI1li ZC.Ros
SET UF H(l.l(Xjfljf:OOS
POSITION VECTORS
I
The
algorittm based on Sees . 2-11 and 2-15 provides both l ocal and overall scaling.
'lbus , distortion of a shape can be aa:aupl..ished.
It util izcs
l"otogetle()US
nates.
2DSCf..LE
100 SUB"2DSCALE": P, X() , Y() , A, O,S
110
' P:MJHBER OF X, Y-PAIRS
120
130
1 ~0
150
160
170
180
190
2CO
210
220
230
240
250
26G
270
280
NEXT I
HAT T:ZER(3, 3)
WI~
ZEROS
POSITICtJ VECTORS
'RED!ME!\Siot~
coordi-
If
II
II
I!
202 l'tl\niEMM'ICAL
290
300
310
320
330
ELEMEl1I'S
FOR
a:l-lPlJTER
GRAPHICS
II.AT O=S*T
FOR 1:1 TO P
~f X(I):Q(l , 1)/0(1 . 3)
Ltl (I):Q( I, 2)/Q(I,3)
NEXT I
]llO SUBEND
Ai..GOOJ~
to as mirror itrage.
2DREFLT
100
110
120
130
1 ~0
150
160
170
180
190
200
210
SUB"2DREFLT": P, X() , () ,N
' 2- D REFlCTION
' P:Ntt-!BER CF X,- PAIRS
1
X():ARRAY CONTAINING X-COORDINATES
' Y():ARRAY CONTAINING -COORDINATES
' N=REFLECTION CODE 1=X-AXIS , 2:Y- AXIS
Om S( 100 ,3) ,Q(100,3)
'1 00 POSITION VECTORS
1 REDIHENSION S&Q FilL Wrni ZEROS
HAT S:ZER( P, 3)
HAT Q:ZER(P,3)
1SET UP l0100ENEOUS
FOR I : 1 TO P
LET S(I, 1)=X(I)
' POSITION VECTORS
LET S( I,2):Y(I)
LET S(I,3):1
220
~'EXT
230
2ll0
250
260
300
310
320
330
1(2,2):-1
GO TO 300
LET T(2 , 2):T(3, 3)=1
LET 1( 1,1) : - 1
MAT O=S*T
FOR I:1 TOP
LET X(I):Q( I , 1)
LET Y( l):Q(I , 2)
]110
NEXT I
270
280
290
LET
350 SUBEND
~11H'1
arout
2DROT
100 SUB"2DROT" :P, X() ,Y() ,T1,H,N
'2-D ROTATION
110
' P:NUMBER OF X,Y-PAlRS
120
' X( ):ARRAY CONTAINING X-COOP.DINATFS
130
'Y():ARRAY CONTAINING Y-COORDINATES
140
'T1:ROTATl0N ANGLE IN Dn11EES
150
' H:X TRANSLATION FACTOR
160
' N:Y TRANSLATION fACTOR
170
DIM S( 100 , 3) ,0(100,3)
I 100 POSITION VEX:TORS
HAT S:ZER(P, 3)
180
'REDIMENSION S&O FILL
190
HAT Q:ZER(P , 3)
'WITH ZEROS
200
FOR I=1 TO P
'SET UP H~OGfliEOUS
210
LET S( I, 1):X(I)
I POSITIOt; VECTORS
220
LET S(l , 2):Y(l)
230
LET S(l, 3):1
2110
NEXT I
250
LET T2:T1/57. 2957795
'CONVERT TO RADIANS
260
HAT T:ZER (3, 3)
'REDD1ENSION T FILL Wlnf ZEROS
270
LET T(l, 1):T(2,2): COS(T2)
'SET TRANSFORMATION MATRIX
280
LET T(1,2):SIN(T2)
290
LET T(2, 1 ) : ~IN(T2)
300
LET T(3, 1):-M (COS{T2)-1 )+NSIN(T2)
310
LET T(3 ,2):-MSIN( T2)-N( COS(T2) -1 )
320
LET T(3, 3):1
330
HAT Q:ST
' CALC. TRANSFORMED POINTS
340
FOR 1:1 TO P
CALC . PttYSICAL COC>R.
350
LET X(l):Q(I, 1)
360
LET Y(l) :Q(I, 2)
370
NEXT I
380 SUBEND
3DSCALE
NEXT I
280
290
300
I~
204 t-IA'mEMI\TICAL
310
320
330
340
350
360
370
380
tiEXT I
390 st.'BEND
C-6
ABour
TI x-Ax is
coordinates.
3DXROT
100 SUB" 3DXR0'!": P, X( ) , Y() , Z() , Tl
110
120
130
140
150
160
17C
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
C-7
' P:~WM81:.R
OF X, Y. Z- TRIPLETS
' 3-D
ROTATION ABOUT
X- AXIS
SUBE.~D
Aaoor
n v-Axis
It utilizes taJcxJeneons
3DYPOT
370 SUBENO
C-8
ABouT
n Z-Axl s
The algorittln given below as a BASIC language sut:program p.rovides far three-
UEXT I
250
260
270
280
I~
II
'
290
3CO
310
320
330
3~0
350
360
37C SUBEND
C-9
ooordi.nate plat'.es
~,
3DREFLT
' 3~0
1110
150
110
120
130
160
170
180
190
20C
210
220
230
240
250
260
270
280
FOR 1:1 TO p
LET U(l , 1 ) :X( I}
SET UP fD'.OOEl~S
1 POSITION VECTORS
~~T V:Z~R(P , ~)
flEXT 1
~.AT T:ZER( 4 , L)
If N:2 THEN 310
If N=3 THEN 3~0
290
~i
T{3 ,3):-l
300
GO TO 360
310
320
330
340
350
LET
310
38C
390
~00
~ 11
~20
LET
360
REFLECTIOtiS
T (~ . 4):T{3 , 3):T(2 , 2) :!
SUBEND
c-10
l anguage
~rogram .
It mlkes usc
of~
'3-D
coordinates.
TRANSUTJQN
120
130
140
150
160
170
180
190
200
DIM U( 1 00 , 4) , V(100 , ~)
MAT U:ZER(P , 4)
MAT V: ZER(P , 4)
2 10
220
230
240
250
260
FOR 1= 1 TO P
LET U(l , l):X(I)
'SET UP HCI'lOOfllf..OUS
'POSITIOt~ VECTORS
270
280
290
300
310
320
330
3110
350
360
FOR I: 1 TO P
LET X(I):V(I , 1)
LE~
Y(l):V{l , 2)
LET Z(l):V(l , 3)
NEXT I
370
380
390 SUBEND
C-11
Ainrr Pt~v
ARBI'TAARY Axis IN
SPACE
An algori t:hn which will produce a
3X;ENROT
100
11 0
120
130
1110
150
It is
II
I
II
16G
170
1BlJ
19~
2r
21~
nr
2Y
2~0
~5r
P~T
FOr I= 1 ro P
LET UCl 1 l):Y.(I)
LF: UCI , 2):Y(I)
20
nr
2er
?jC
30"
;,r
~2G
3')f'
3140
"'SG
3~0
37r
3e('l
;r;,o
llQt
~tr
1,2f'
~~G
~uo
I< 50
J~ f.O
V:ZEF.(r l 4)
~-r
U(I , 7 ):Z(I)
LE1
Ull,~J:l
t-."EYT 1
I'J 7 T:ZEP( I. , u)
LI='T T2:T11!:7 .29':,7795
Lf.T
l.E7
lEI'
LE1'
Lf.T
LET
LI='T
LET l(l):V(l , 2)
LET
Z(I):~(I,!)
t.'EY.T 1
suwm
o~nal
axes is
g1~ l:x:lo.~
e.s a BASIC
S'~Og't'al"'.
PFGJ
lif. ..UE:"HCJ" : P, Y.(), Y( J , Z{) 1 t1
' I'FOJE.CTIOtl
11C
r-=r:uveEP or x, YI z- TRIPL'!S
12C
' Y( ):AP~AY CGtm,H\HC Y-COORDINATES
1~"
' Y( ):APPAY CCI;TAININC Y- COJFCINATES
lt:C
' l( ):APf<AY CCNTI.lNir.C z-cOOFDINATE.S
1SC
~. : CCir..E ~l...11H .R r:;IJICATI':C PEFPEl:CICIJLAR liYIS:
lG~
' 1=Y-AY1S, 2=Y- AYIS , "'=Z-AXIS
17C
DIP U( 1CC , ll) , V( 100 , q J
' 100 POCITICI: VECTCPS
1
1H
t'.Al U:ZE.P{r , 4)
PECI,.,~;SI0.' U~\' FILL \.ITH ZEFOS
i~
t'~T 'J=ZE~(P,4)
2r'
FCF I= 1 Th P
L: UC: , l):X(J)
1..7" uc , l' J='f CI J
21~
nr
2~0
' SET UP
~~E.'~ctiS
2~r
LE7
2Sr
Pt'E>'T I
?'f
111\l T:ll~(IJ,t)
Uf! , ~):l
~EDl"~PlSICti
la.'lqllage
270
280
290
300
310
320
330
3110
350
360
370
380
390
QOO
410
1120
' PUT
DIAOOt~AL
TERt1:0
in Eq. (3-26) and ass\11\ing projection ooto the z = 0 plane is giwn belo.~ as a
Dlt1E1RIC
100 SUB"Dlt-IETRIC": P, X(), Y() ,Z()
' Dlt-IF1'RIC Pnc)JFCTION
110
' P:NUMBER Of X, Y,Z-TRIPLETS
120
' X():ARRAY ~iAINI~G X-COORDINATES
130
' Y():ARRAY CONTAINING Y-COORDllJATES
140
' Z():ARRAY CONTAINING Z-COOPD~ATES
150
DIH U( 100 ,4) ,V(100,4)
' 100 POSITIO~ VECTORS
160
MAT U:ZER(P , 4)
' REDIY.EriSION UbV FILL WITH ZFROS
170
MAT V:ZER(P , 4)
180
FOR I= 1 TO P
' SET UP OOMOOENIDUS
190
LET U(I,l):X(I)
'POSITION VECTORS
200
LET U(l , 2):Y(l)
210
LET U(l , 3):Z(I)
220
LET U(l ,4)= 1
230
flEXT I
240
MAT T:ZER( 4, 4)
'REDIMENSION T FILL WIW ZEfiOS
250
LET T(1,1):0.925820
' SET UP TRA NSFOR~ATION ~~TRIX
260
LET T(1 ,2):0.133631
270
LET T(2 ,3): 0.353553
280
LET T(1,3):-0. 353553
290
LET T(2 ,2):0.935414
300
LET T(3,1):0. 37796Q
310
LET T() ,?):-0. 327327
320
LET T(3 , 3):0.866025
330
LET T(!l ,4):1
340
t'AT V:UT
' CALC. TRAfJSFORfiATlON
350
FOR 1:1 TOP
' CALC. PPYSlCAL ODOR.
360
LET X(I):V(l ,1 )
370
LET Y(I):V(l,2)
380
LET Z(I):V(I , 3)
390
NEXT I
400
CALL "PROJ": P,X() ,Y(),Z() ,3
'PROJECT ON TO Z=O PLA~f
410 SUEEIJD
It
C-14
c.q. (3-26)
wit.'"t e
=35.264
sd:program.
1CC SUE"lSOt'..ET":F,X(),Y(),Z()
' ~!C PPJJex:Timl
110
'P:t~EP OF X,Y,Z-!RIPL~
120
' X():APPAY COh'TAII~I.ll; X.COOPDll\A!ES
130
' 't():APPAY CC:;tAINn~ Y-cooPDINATES
11;0
' Z{) :t.PP.AY CONTAINL~ Z...COOPCI~iATES
150
160
170
160
190
200
210
220
230
zuo
f'I.AT V:ZEP(P,~)
f"'F I= 1 TO P
SET
U(I ,l ):X(l)
LET U(I ,2): Y(I)
LET U(I ,3): Z(I)
LET U(I ,~ } =1
LET
t,"EX7 I
~.AT T:ZEP(4 , U)
280
290
300
LET
310
320
330
340
350
360
370
380
LE7 !(2,3)=0.577345
LET T(1.,4):1
250
260
210
I"J.T V: U1 T
FOR I: 1 TO P
LET X(I):V(I ,1 )
LET Y(1):V(I ,2)
LET Z{I):V(I,3)
ZEPOS
HJKXjE!."EOUS
' POSITICN VECTOPS
(p)
NEXT I
'PRCJECT Q:rG Z: O PtA1:E
as a
~ITr
1(2 , 2):0.816~97
390
CALL "PPOJ":P,X() ,'t() ,Z () , 3
1100 SIPI....ND
C-15
Bl-SIC
will generate a
perspective
V1ewi
1s given
lan<Jua9e subpro<JX&.t.
b?lcy
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
260
290
300
310
320
330
340
350
360
370
380
390
'Y():ARRAY-CO~TAltcll\G
Y-COOfiDINATES
C-16
tive project.icns, say, tw:> fh:::>togxafi\5, \orilen the natrix transfOll'IVltion e.l.elrents
bela.~
It is based
(3-48) .
3DRECON1
100 SUB"3DRECON 1":T( , ) ,S( , ),X1 ,Y1,X2 ,Y2,X(, ) ' 3-D RECONSTRUCTION-I
110
' T(, ):4 1l TRANSFORMATION ~lATRIX FOR THE FIRST VIEW
120
' S( , ):tl1 4 TRANSFO~ATION mTRIX FOR THE SEX:OND VIEW
130
'X1 , Y1:000RD1NATES OF POINT IN FIRST VIEW
140
'X2,Y2=000RDINATES OF POINT IN SECOND VIEW
150
DIM A( 4, 3) ,B(4 ,t ) ,C( 3, 4) , D(3 , 3) , E(3,3) , Y(3 , 1)
160
~AT X=ZER( 3,1 )
' FILL X-MATRIX-WITH ZEROS
170
180
190
200
2 10
220
230
240
250
260
270
280
290
FOR J: 1 TO
FOR I: 1 TO tl
' FIND
POOJEX:'TIOt~
PLANE
' IN T-t".ATRlX
NEXT I
00 TO 250
NEXT J
PRINT "TRANS T IS rm A PROJECTION"
00 TO 660
ON J 00 TO 260 , 290 , 320
'ELIMl~ATE 0-COL~J
LET I 1=2
I FR(Xo1 EOOA
TIONS
LET 12=3
GO TO 340
LET 11:1
Q'l Elg.
300
310
320
330
3il0
350
360
370
380
390
400
1;10
420
430
IIIJO
450
IJ6C
470
460
490
500
I
510
520
530
540
550
560
570
580
590
600
610
LET I2=3
ac m
3110
LE1' 11:1
LET 12:2
FOR J=l TO 3
'F'IND PAOJE'CTION PLAr.E
FOR I: 1 TO ll
' IN s-f".ATRIX
IF S(I , J)<>O TPEN 390
NEXT I
GO TO 420
NEXT J
PR!tii "TFANS S IS NOT A PROJECTION"
ro ro 660
Oll J GO TO II 30, 460, 49C' ELit'IMTE D-COLl11 N
LET J1:2
' f'PO~l EctJATIONS
LET J2=3
GO TC 510
LET Jl: 1
l-...t'T J2::3
CO TO 510
LET J1:1
LET J2=2
FOR 1:1 TO 3
' SET UP A-fo'ATRlX
1
LET A(1,I):T(I,I1) - T(I,4) X1
LET A(2,I):T(I,I2)-T(I,4) 1 Y1
l-~ A(3,I)~S(I,Jl)-5(I,4) X2
I
l-~ E(1,1):T(IJ,4)'X1-T(4 , 11)
LET E(2,1):T(Il,li) 1 Y1-T(IJ , I2)
LET e(3,1):S(4 ,4 )1 X2-S(4,J1)
LET 8(11,1):S(4,1J) ' Y2-S(4 ,J2)
h"EXT
~AT C::TRN(A)
~:ATRIX D::C1 A
620
610
fJ.AT E:li\V(C)
640
fo'AT Y:C1 E
650
~:AT Y.=E'Y
660 SUEElJO
'TRANSPOSE' A
' fORM SC ('IATfllX FRO~ A & lT' S
' INVE~T SCOARE VATRIX
' FORM A TRANSPOSE E
'08TA IN SOLUT!Ot.
~ANSPCSE
3DFCON2
1C<> SlJ8"30REX:ON2" :X(,) , ll( , ) , TC , )
'3-D RECONSTRUCT!Oti- 2
110
'X( , ):61 3 fo'ATIHX COIITA~lt.G n!E LOCATIO.\S Of' nzE SIX POif.liS
120
'
lN PHYSICAL OOORDI~ATES I~ ORDER
130
' U( , ):6 2 ~ATRIX COUTAINING WE LCCATIOt,S Of' TilE SA:-'E SIX
140
'
POH:I'S IN 1liE PEPSPECTI\'E VIEW I~ nzE SAt--E OROEP
150
'T( , ) :TJJE ll 4 TPAt~F'OR."'.ATlON HATfllX
160
DDI. A( 12 , 12) , 8 ( 11 , 1l ) , C( 11 , 1) , D( 11, 1) , E( 11 , 11 )
170
MAT T::ZER(4 ,ll )
' FILL T&A ~ATRICES ~ ZEPOS
180
MAT A=ZER( 12,12)
190
FOR 1=1 TO 12 STEP 2
' SET UP A~.ATPIX
200
LET J=J+l
210
220
230
240
250
260
210
280
290
300
)10
320
330
340
350
360
370
h"EXT J
380
LET C(I , 1):A(l,12)
390
NEXT I
400
MAT E:lNV(8)
410
MAT D=E*C
420
LET T(1 , 1):D(1 , 1)
430
LET T(1 , 2):D(2 , 1)
440
LET T(1,4):D(3,1)
450
LET T(2, 1):0(4 , 1)
460
LET T(2 , 2): D(5 ,1 )
470
LET T(2, 4):D(6,1 )
480
LET T(3,1): 0(7 , 1)
490
LET T(3 , 2):D(8,1)
500
LET T(3 , 4):0(9,1 )
510
LET T(4 , 1) : D(10 , 1)
520
LET T(4 , 2):D(11,1 )
530
LET T(4 , 4):1
540 SUBEND
C-17 A STEREO
' fORM
C~ATRIX
'CALC. TRANS.
~~TRIX
~Illfl
to generate a stereo pair for an abject ....nich has been positiooed and rotated to fonn the desired view and perspective is given bel.c7.ol as
a 81\SIC language subprogram.
An algorithm
STEREO
120
130
140
150
160
170
180
190
200
210
220
230
214
~CAL
410
LET X3=X7=99999
420
FOR 1:1 TO P1
430
LET P(I,4):0(1 ,4 ): 1
' NORMALIZE RESULTS
440
LET P(I,l):R(I ,1 )/R(I ,4)
450
LfT P(I , 2):R(I , 2)/R(I ,4 )
46o
LET C(l , 1):L(I, 1)/L(I, 4)
470
Le-r 0(1 , 2):L(I , 2)/L(I , 4)
480
LET X1:P(I , 1)
' FIND X1 t-'AX/MIN FOR LIR EYES
490
LET X5=0(I ,1 )
500
IF X1>X3 THEN 520
510
LET X3:X1
520
IF X1<X2 T~F.N 540
530
LET X2: Xl
540
IF X5>X7 THEN 560
550
LET X7=X5
560
IF X5<X6 THEN 580
570
LET X6:X5
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
NEXT I
LET O:(X6+X7)/2- (X3+X2)/2
LET
t-'.AT
LET
LET
ti.AT
LET
' F~D
EYE SEPARATION
DISTA~CE
L:D+(E-D)/2
T: ZER(ll , 4)
'TRANSLATE PICHT- EYE VIEW
T(1 ,1 ):T(2 ,2):T(3 ,!)=T(4 , 4):1
T(4 ,1 )=L
R:P1 T
1(4 ,1 ):- L
'TRANSLATE LEFT-EYE VIEW
t-'.AT L=01 T
MAT A=ZF.R(P1,2)
MAT S:ZER(P1 , 2)
FOR 1: 1 TO P1
LET A(1 ,1 )=L(I ,1 )
LET A(I ,2): L(I , 2)
LET B( I, 1):R(I , 1)
LET E(l ,2):R(I , 2)
~EXT
~ATRIX
750 SUE!EtJD
C-18
~ Al.GOO lnt\
FOR
A CbwARN"ETRIC CIRCLE
4-5.
The Algorithm
1.n
t-.PCIRCU
100 SUB"hPCIRCLe" : H, K, R, t-. , X() , Y()
110
120
130
140
145
150
160
170
180
190
200
210
230
240
250
260
270
280
290
300
31o
320
330
340
350
360
37C
380
390
400
410
1120
430
440
450
460
ll70
480
490
500
510
520
530
5~0
550
560
570
560
590
600
6 10
'
'
'
'
'
'
'
HAT
u..,-
Y: ZER(~ 1+1 )
LiT X( l) : R
GO ro 340
lF Y(l )>O THEtl 440
GO TO 590
IF Y(l)<0. 0005 THEt~ 500
IF Y( 1)<0. 0005 11-lEN 430
1F Y(l )>: R/SCR(2) - 0.0005 Thlll 400
U.T X( I+l ): X(I) - 0
' CALC. PO~TS
LET Y(l+1):SQR(ABS(R R- X(I+1 ) 1 X(I+1 )))
au 'IV 640
LlT Y( l+1):Y(l) +D
' CALC. POit.TS
LET X( l+ 1):SCR(A6S(R*R- Y(l+1) Y( l +1)))
GO ro 640
IF Y( l )<:R!SCR(2)+0. 0005 Tr~ 470
Lli Y( l +1):Y(I)- D
CALC. POlt.TS
LlT X( l +1):-SOR(A&S(R*R-Y(l+1 ) 1 Y(l+1 )))
GV TO 640
LE.T X(l+1): X(I) - D
' CALC . PO:U.TS
LeT Y(l+1):SCR(AbS(R*R- X(I+1 )*X(l+1 )))
GO TV 640
IF X( l)>- 0.0005 THEN 580
IF -Y{l) >:R/SQR( 2) - 0. C005 THEN 550
LET X{ I +l) :X(l)+D
' CALC. POINTS
Le7 Y( l +l) : - SUR(AbS{n*R- X( l+l ) X(l+l )))
Gu TO 6UO
LET Y( l +l):Y( I)-0
' CALC. POINTS
LET X( l +1):-SCR(AfS(k*R- Y(l+l )Y(l+l )))
GC TO 640
l f - Y(l)<:R/SCR(2)+0. C005 THEf4 620
LeT Y{l +l):Y( l)+D
' CALC . POINTS
LET X(l+l ):SCR(ABS(R R-Y{1+1 ) 1 Y(I+1 )))
cv ro 640
Lei X( l +l) ;X(l)+O
' CALC . POINTS
0-~5
DEG.
45- 90 DEG.
90-135 DEC.
135- 180 Df..G .
18D-225 DEG .
225- 270 DEG .
270-315 DEG.
620
315-360 CEC.
630
llT Y( 1+ 1 ):- SQR(ASS( R*R- X( 1+ l) I X( 1+ 1)))
6fJO
NEXT I
650
FOh 1: 1 TO ~ 1+ 1
' T'RAHSLA'I ClRCl.E
660
LlT X{l):X(I)+H
670
llT Y(l):Y(l)+K
680
NEXT I
730 SllBENO
II
C-19 P At..GORITK'i
~A PAJWmtC
CIRCLE
CIRCU:.
100 SLb"ClitCLE":t1 , }, , P, /. , X() , Y()
' PAF-AI'iETFIC CIRCLE
110
'h:X- CUJ110I;,ATE. OF CE.hTE.h OF THE CIRCLE
120
~=Y-COORDihATE Of CENTEfi OF tr.E CIFClE
13C
' .h:F.ADIUS
1l40
' N:NUMbE.H Of POIM'S Ql', CIRCLE
150
' X() ARkAY COI~TAirJING THE X-COORDINATES Of FOWTS Of~ CinCLE
160
' Y() ARRAY CONTAlllUIG Tr.E Y-COOFDI!,ATES OF POINTS Qt. CIRCLE
170
LeT P:2*3.111156/(tl- 1)
' CALC . INCREMEliT Th THETA
180
LET C1:CUS( P)
' CALC. CuNSTANiS
190
LET Sl:SIN(P)
200
LE.T X(C):H+R
210
~T
Y(O):K
FOR H: 1 TO N
' IM~ER LOOP
LET X(M):H+(X(M-1) - H) 1 C1- (Y(K- 1) - K) ' S1
220
230
2110
250
.<\llf,ff.JO
C-20
ellipse.
E.LUl'SEl
lCO Sl.c"ELUPSC.l" :H,K ,A,B,I,ri, X(} , Y(}
110
' r:X-COOFDI~ATE Of CENTER Cf THE ELLIPSE
120
130
1~0
150
160
170
180
1<;0
2CO
210
220
230
21l0
250
20
270
280
29C
LET C1:CGS(I1)
LET S 1:SIM 11)
U.T C2:COS( P)
U.T S2:Sit.( P)
Ll1 C3:1
LET S3:0
FOR M: 1 TG t.
LET X1:A1 C3
LET Y1:61 S3
3CO
310
' CALC .
320
LET T1:C3'C2-S~' S2
LET S1: S31 C2+C31 S2
33~
3~0
350
360
LEi Cj:Tl
hEY.T M
SUbEtrD
~~~
X At.O Y
C-21
subprogram
PAf\A80L.A
LET Y(M):Bl+Y(I'.-1 )
NEYT M
250 SUBEND
c-22
~ ITWIS
Foo
PAIWETRIC
HvPEROOLAS
BASIC snbpxogcan.
sec.
4-10.
l1YPE.I1b 1
270
280
290
300
310
LCT Q9:b1 T2
~1 S9:b1 C2
LET X(l):A
'INITIALIZE
LET Y(1):0
FOF< H:2 TO N
'U,NER LCOP
LET X(M):(S X(H-1))/(S9-Y(N-l)S2)
LET
t\E.XT
320 SIJSEND
Sec. 4-10.
quadrant.
HYPERE.2
100 Sub"hYPERB2" :A , B,C,N,X(), Y()
110
'A::DISTMICE fRGI CE~'TER OF
120
130
140
150
160
170
180
190
200
210
220
230
PAJWIETI\IC HYPEf\BOLA
HYPERECLA TO VERTEX
&:DETtRHI~ES
SLOPE fO ASYM~ES=+-B/A
' C::LltUT OF X-COOi1D:U ATE
' lY::Ml-lEEk Of POlhTS CU HYFERBOLA
' X():ARRAY
CON1AINI~G
' lNITlALIZE
2110
FOn M=2 TO t.
' lJ:t,EJi LOOP
U.T X(M):Ci_>aX(M-1)+(A/E)*S2*Y(N- 1)
250
260
I(
It
li
If
II
270 SUBE!\L
C-23
~ Al.OORillfl ~
'!he alcprithm given below as a BASIC Stq>rogra.'ll detelll\i.nes the circular arc
passing through three points.
3PClhAkC
100 SUE"3PCIRARC" : X(),Y() , t- , H,K, R,S(),T() 'ARC ntRU THREE POINTS
110
I
X(). Y( ):COORDINATES Cf THfiEi POll\'TS
120
' N::NW.BER OF STRAlChT UNES TO REPRESENT ARC
130
I H' K::); . - COORDINATES Gf CEt'fTER ( RETURf,ED)
140
' fi:RADIUS (RETURNED)
150
' S():ARRAY CON1AIN1NC X-OOORDI1~ATES OF CIRCLE
1
160
T():ARRAY CONTAINING -COORDINATES OF CIRCLE
170
~~T A:ZER(3)
DIM & SET EQUAL TO ZERO
160
MAT B=ZER( 3)
190
FOR 1: 1 TO 3
' CGPY X() & Y() ~~~ h() & B()
200
LET A(l):X(I)
210
220
230
240
2SO
260
270
260
290
300
310
320
330
LET B(l):Y(I)
!~EXT
' CALC.
11:11*57 .2957795 1
LET T2=T21 57.29577951
LET
C~TER-COOJ\OINATES
~0
350
360
310
380
390
400
410
420
430
440
450
460
470
1180
490
500
5 10
520
530
540
550
560
570
sao
590
600
610
' CALC. CE~TE11
620
HAT F:E'D
630
LET H1:F(1 , 1)
' SET CEliTER ECUAL TO H1 , K1
640
LLT K1:F(2 , 1)
650 SUBEI\D
660 SUB" ATAt.'' :X , 'i , A
' TAl\ G- (YX)
670
I
'i:PROGftAH Flt.:DS TAf.GI:.liT Of ('i/)1)
680
' A:TAtiC~'T Of ( Y/X) It RADIAl-S ( RETURUE.C)
690
IF Y<O THEh 760
700
IF X:O THEI-l 740
710
IF X<O 'Ilil:.tw 760
72G
l.CT A:A1N{Y/X)
' Q-90 DE.C.
730
GO TO 850
71lO
LET A:1.570796327
' 90 DEG.
750
GO TO 850
760
LET A: 3 . 141592654 -AT~(ASS(Y/X)) ' 90- 180 D~G .
170
00 TO 850
780
IF X:O ThE~ 840
790
lF X<O THEN ~20
Boo
LE.1 A:6 .2o3 1&5308-ATil(AbS(Y/X)) ' 270- 360 CEG .
b 10
(j{j 111 850
b20
LET A: ATir(ABS(Y/X))+3 . 1111592654 '180-270 DEC.
b3o oo TL o5o
' 270 DEG.
SliO
LlT A:4 . 71236698 1
x.
85o st..w.o
900
9 10
920
930
guo
95C
960
970
U:."T Sl : Slr~(P)
l'1 X( 1):X+R1 COS(T3)
LeT Y(1):Y+h 1 Slh(T))
Fu4 1'.: 2 TO N
98C
99C
1COO
' CHA~E
OtCREES TO
RADIA~
1010
LET X(N):X+( X(l'l-1 ) - X)C 1-( Y(N-1 )- Y)*S 1
1020
LET Y(I'I):Y+(X(~l-1)-X) * S1+(Y(t-1-1}-Y}C1
1030
fJUT ~
1040 SUBErlu
C-24
~ Au:.ootnt1
Foo
CNERAT1NG
Cusrc SPurt:s
II
SPUhE
ll50
LET Z=Z+1
'ADD a\E TO 00. INTE!lMEDIATE POINTS
IF C1 >2 THEN 560
' GENERATE OiORD L.ENGn1S AND El.rnEt-.TS IN B-,u-, At..n 1"-t'ATRICES
' \t.'HIOI DEPEt.D l1POl\ Th"E SPa:IFIED El>L rotUHTIOt~S.
ll60
ll70
l!8o
ll90
500
510
520
530
co ro sao
51l0
550
560
570
580
590 SUBEND
600 SUB"Et.DPNT'' :S, N, P( I ) ~ ~<
6 10
620
630
~IATF!IY
U.
LET N(1,2):1
LET N( 1,3):0
61lO
FOR K:l TO S
LET B(K 1 1):U(K ,1 )
NEXT K
GO TO 700
650
660
670
680
t'-~ATRIX
LET M1 , 2) =1
'FIRST ROW Of t-1-MATRIX
LET tl( 11 3) : . 5
' FOR PELAXEC D;D CO"DITIOI~
FOR J:l TO N-1
lF C):3 THEt 760
' CALCULATE TliE 2- D SPAN CEORD l..EttcniS
690
700
710
720
730
71lO
750
760
770
8oo
8 10
NEXT K
fl20
IF C2: t
830
840
850
860
870
7&>
790
880
890
900
910
920
930
940
TH~ 890
FOR K:l TO S
LET S(K , t~):U(K , t-t)
' SET E(K,N):U(K , N) FOR CL.Afo'PED EJ.ID
NEXT K
GO TO 9ijO
LET N(N ,1):2
' LAST ROW OF 11-MATJU)(
LET N(N 1 2):1l
' FOR RELAXFD END CONDITION
FOR K:1 TO S
' SET B(K ,N) FOR RELAXED END
LET B(K , N):(6/l.(t\-1)) 1 (P(K , N)-P(K , N-1})
NEXT K
SUBEND
960
970
980
990
1000
1010
1020
1030
l OllO
FOR
J:2 TO N-1
LET N(J,l}:L(J)
' CREATE t.()t\ZERO VALUES FOR
L.ET N( J , 2):2i'( L(J)+L(J- l))
'ltiTERNAL RO\t.'S CF ~1-!'ATRIX
LET ti(J , 3):L(J- 1)
FOil K= 1 TO S
' CREATE flOWS 2 nillOUGH r.- 1 OF P41ATJHX
LET B(K , J)=3 (L(J-1)~2' (P(K,J+1) -P(K,J)) +L (J)-?'(P(K , J)-P(K , J- 1 )))
LET B(K ,J):B(K ,J)/(L(J)*L(J- 1))
~~T K
NFXT J
1050
1060
107C
FOR 1:2 TO ~
1o.80
FOR K: 1 TO 3
LET MI,I<):N(I , IO*C-N(l- 1,K+1)
1090
1100
1110
t~XT
1120
1130
1140
1180
1190
1200
1210
1220
1230
' RE'DUCE
LET C:N(l,2}
FOR K: 1 TO 3
LET
1150
1160
1170
' ll>PHALIZ'
~{I,K}:N(l , K}/C
' t.OR~1ALIZF
FOR J:O TO N- 1
LET
U(I< , ~-J):{B( K, t-
NEXT J
NEXT K
TA~ENT
VECTORS
1240 SUBEND
1250
1260
LET 1:1
1270
1280
1290
FOP J:1 TO N- 1
FOR K: 1 TO S
1300
LET F(2,K):U(K , J)
131 0
LET F(3 ,K): (3/L(J)A2) 1 (P(K , J+1)- P(K , J})- ( 1/L(J)} (U(K , J+ 1)+2*u(K , J))
LET F(4 , K}:( - 2/L(J}-3)*(P(K,J+1)-P(K 1 J))+( l/L(J)-2) *(G( K1 J+1) +U( K1 J))
1320
1330
1340
t.EXT K
FOR
1350
1360
1370
1380
1390
1400
1410
1420
1L30
1illl0
1450
1460
1470
LET C(2,l):P(2)
111~0
LET 1=1+1
1490
LET C(3,I):R(3)
h!XT T
1500
NEXT J
15 10 SUBEJ.'D
1520 SUB"!oC.ATitV":S , N,PC , >IN<,> ,o< I>,L( >,u( I> ,c1 , z
1530
Dltl. t{(70 ,70) ,C(70) , V(70 , 70) ,W(70 ) ' DIYENSION WTE11NAL JJ.ATRICFS
1540
1550
1560
1570
1560
1590
1600
1610
1620
1630
1640
' l1UTIALIZE
AND ~EDIHHiS!Otl
' EACH INTERNAL t'.ATRIY
J:l TO ~1
' CALC. SPAt; CHORD W~TPS
IF S=3 THE'N 1620
LEr L(J)=SCIR( ( -{ 1 ,J + 1) - P( 1 1 J}) -2+( P( 2 ,J 1)- P{2 , J )) - 2)
OG TO 1630
FOF
1650
1660
1670
1680
1690
1700
1710
1720
1730
1740
1750
1760
1770
1780
NeXT K
1790
1800
1610
FOR
J:2 TO N1
LET H(J ,J-1)=L(J)
LET M(J ,J ):2*(L( J )TL(J-l))
1820
1830
1840
1b50
FOR K: 1 TO S
LET
B(K,J)=31
1860
1870
1880
1890
t-EXT K
hEXT J
~~T V:INV(M)
FOR K:1 TO S
1900
FOR
19 10
1920
n- 1
LET C(J):B(K ,J)
J: l TO
NEXT J
1930
1940
1950
1960
1970
1980
1990
2000
MAT H:V 1 C
FOR J: 1 TO N- 1
2010
2020
NEXT K
2030
GO TO 2070
2040
FOR K: 1 TO S
2050
LET U(K , ti):- U(K , 1)
2060
NEXT K
2070 SUBEND
C-25
100 SUE"PAPlf<O" : R( , ) , f , C( , )
PARABOLIC BLEt.Olt!G
110
' R( , ):ARRAY CONTAitW~ nil:. OX>RDit.ATES Of FOUR POltiTS
120
130
' R( 1, ):X-COOnDlNATES
' R(2 , ):Y-OOORDINATES
140
150
160
170
180
190
' C( 1, ): X-CCORDINATFS
' C(2, ):Y-COORDINATES
' C(3, ):Z-ccORDINATES
200
21C
220
230
2110
250
260
270
280
290
300
310
320
330
3140
350
360
370
t.OTE :
c 1-1l.ST
S:ZfR(3, 3)
T:lER(3 , 3)
HAT F=ZEfl(3 ,N )
HAT C=ZER(3 , tl)
FOR J : 1 TO 3
FOR 1:1 TO 3
LT S(l ,J):R(I , J)
LET T(I,J):R(I,J+1)
NEXT I
' CALC . TO
NEXT J
CALL"GEtl" : S( , ) , 1, TO, N, P( , )
CALL"GEN" : T( , ) , 2 , TO , N,O(,)
K:O
FOR 1:0 TO
LET
1
LFT K=K1
38o
390
LIOO
STEP ( 1/(N-1 ))
FOR 1:1 TO 3
LET C(l,K):( t-T) 1 P{ l,K)+T*O(I , K)
t.'EXT I
1110
f;EXT T
420 SUEEtiD
430
1140
450
460
470
1180
490
500
510
520
530
5110
550
560
570
580
590
600
610
620
630
640
650
660
SUB"GEJ~":P(
, ) ,St , TO , N, X( , )
X( 3 ) =Z-COI'POf~fl;T
~~T T:ZER(3)
FOR I= 1 TO 3
LET T(I):P(I , 2)- P(l , 1)
LET S(I):P{I ,3)- P(l , 1)
LET I~( I):P(l,3)-P(I , 2)
J,f.XT I
NAT U:S*S
' SET UP
' P(SUBII)- P(SUB3)
' P(SUD5)- P(SUB3)
HAT V:T*S
LET D:SOR(U)
670
680
690
700
fiAT W:fi*S
LET T1 :\,/(T01 D)
710
0010 730
LET T1:V/(TO*D)
lf1' K:O
730
DII~EliSIO
HAT S:ZR(3)
liAT IJ:ZER( 3)
I..E'T X:V/U
LET A:1/(UX ( t-57X))
If 51:2 THE~ 720
720
'INITIALIZE &
ro.
'i-SQ)
740
750
760
110
780
' 'If.ST FCR FlPSl OR SECOND P ARAf~ A
790
800
810
LET X(J 1 K):P(J 1 1)+(RID} 1 S(J)+A1 P1 (D-R)I(T( J)-Y ' S(J ) )
820
NEXTJ
830
t;EXT T2
840 SUSf.tiD
c-26
A Bezi ER CtJM
Al.GOOITif'\
BEZIER
100 SUB"BEZIER": N1,,S,X(,),Y(, ) 1 Z(,) , P,R(,) ' EEZIER CURVE
11 0
' Ul:NlJI.BER OF VERTICES IN eEZIEJl POLYGON
120
' S:COtiTROL VARIABLE 2=PLAtiE CURVE , ) : SPACE CUPVE
130
' X( , !):ARRAY CONTAINit,G lliE X- CCfo!PQt,Et-,T <F POLY<n: VERTICES
1110
' Y( 1 ~ ~.:ARRAY COI~TAINl~'G ntE Y-CGt'POtiEtiT Of POLYGON VERTICES
150
' Z( I 1 ):ARRAY COtiTAINIMJ ~E Z-C<l'!PONE~'T CE POLYGON VERTICES
160
' P:t;UiffiER OF POIIJTS ALO~G EEZIER CURVE
170
'R( 1 ):ARRAY CONTAINING WE POlt"TS ALOMI WE BEZIE.R CURVF.
180
I R( 1 I
)::X-cOt'PONEtfT
1
190
R(2 1 )=Y-cOfJPONEln"
200
I R(3 , ):z-co~Por. Etrr
210
' INITIALIZE AND DINEt-.SlON AlL fJATRlCES
220
' ASSU1"ES A HAXIYtR-" Of 10 POLYGOt\ VERTICES
230
NAT J=ZER( 1 1 N1)
240
~~T C:ZER(1 1 1)
250
~tAT D=ZER( 1, 1)
260
MAT E=ZER(1 1 1)
270
lT N:tll-1
280
' DEFINE F1JNCTION TO EVALUATE BIN011IAL EXPANSION (Cf &'. 5-65)
290
DEF FNF(X)
300
IF X:O THEN 360
3 10
~T Y=1
320
LET Y:Y1 X
330
31:0
350
360
370
380
LET X=X-1
IF X:O THEt\ 380
roro
32o
LET fllf =1
0010 390
LET fliF: Y
390
Pt;a.o
400
LET K: 1
410
420
430
ll!IO
450
1160
ll70
ll80
LF.T h( l , K):C( 1, 1)
LFT R(?, K):0(1 ,1 )
lJ90
500
5 10
5?0
LEi
510
IIEXT T
R(3 , K):f(1 ,1 )
LET K=K+1
5ll0 SUBND
C-27
8-SPLINE ALGORITHM
Algorithms "'hlch will generate the required B-splinc basis knot vectors
bela.~
1lley are
'nlc 5\.bprog:ram a-spline uses the Cox and de Boor algorithm to generate
1<1\'01'.
PSPLINE
100 SUb "BSPLli~E" : A, C, V( , ) , S , P , R( , )
11 0
'A:Nl.I-'BER CF POLYGOt. VEfiTICES ~n:us at-E
120
110
140
150
160
170
180
190
700
210
220
230
? liO
250
260
270
280
' N( ,):Io.ElGHTlNG
300
320
LfT Ml , 1): 1
330
GO TO
290
~10
3~0
35C
3N'
370
3b0
390
liDO
4 10
420
430
440
IF X(l):X(l+l ) THEN
350
3~0
NEX1 I
F'CJR T:X(\.1) TO X(W+-1)-. 0S STEP . OS
LT L=L+ I
K:2 TO C
fOh 1:0 TO A
FOR
'INCFI&.ENT PARAtAfTER i
OF N(I , K) IN
450
460
LfT E=O
GO 10 480
LET f::((X(l+K)-T) 'tl(I+l , K-1) ) /(X{ +1!'}-Y(l+l)) ' SECGW JF~ ,
1 E(.l. ( 5-/r )
LET N(l ,K)=D+E
470
!lliO
490
510
520
530
540
550
LET G:O
SM
570
LET H:O
500
LET Z:O
500
t1EX1 K
590
600
610
660
670
680
690
100
710
720
730
LET G:O
LET H:O
LET Z=O
NEXT T
NEXT W
LET L=L+ 1
8 10
820
830
840
850
860
870
880
890
900
9 10
920
930
940
950
960
970
________________________________________.....
C-28 fw
BlUNEAf,
100 SUB"BIUNEAR":N , ~I , P( ,),0( , )
' BILINEAR SURFACF
110
' N:N~IBER (F IhCRFJIDiTS Of U
120
' t-::N\n'IBER Cf' ThCRf.MENTS (F W
'P(, )=CO~TAHIS THE COORDINATES OF n!E OORNER POitfTS
130
140
150
160
170
180
190
200
210
220
230
2110
250
260
270
280
' P HAS DIY.ENSIONS Of 11 1 3. FIRST COlJ.'N OOIITAINS X' COI~PONENTS , SECOND Y-<:Ot-'.PONENTS , THIRD Z-cQI-'.PONENTS
' OF THE CORNER POSITION VEX:TORS.
290
300
310
320
330
3q0
LET
LET
NEXT J
360
NEXT 1
370 SUBEND
350
~s
SmFACE
The algorithn
that the botndary curve c:-.an be described by equally spaced (in paranet:er
values) p:>ints on the OOundal:.y curves. '1he P(u,O) and P(u,l) curves are assured
to be describ>rl by the sarre Ill.l1ber of points as are the P{ O,w) and P(~w) curves.
a5Sl.l1'eS
COONSLIN
100 SUB"UfiEAR COONSLHI" : N, M,A( , ) , B(,) ,C(,) , D( , }, 0( , ) ' LINEAR COONS SURFACE
110
~=NUMBER OF POINTS Qt, THE P(U , O) AND P(U,l) POUNDARY CURVES
120
' M.:NUMBER a: POUlTS Qt, THE P(O ,~I) AND P(l ,~ ) EOUNDARY CURVES
130
' A( , ):ARRAY COiflAININC THE POINTS Of\ n!E P(U,O) CUflVE
1!10
' HAS DD'ENSIONS OF til 3
150
' B( ,):ARRAY <XlNTAitliNG n!E POINTS ON 'mE P(U ,1 ) CURVE
160
170
180
190
200
1 HAS
POl~TS
ON TPE
P(1,~)
CURVE
DUIENSIONS Of M' 3
210
220
230
2~ 0
250
260
270
280
290
300
310
320
330
340
350
NEXT L
360
370
NEXT J
NEXT K
380
390 SUEEND
C-30 PH
AL.Goolltt1
PATCH
that the boundary condition and the blending functioo rratrioes are known .
eiCUBI C
100
11 0
120
130
1~0
150
160
170
180
190
200
210
220
230
240
250
260
270
28o
290
300
310
320
330
SURFACE
' X( , ):~
3~0
350
360
370
~T
380
HAT t:ZEfl( 1, 1)
390
LfT U( 1, 1):2
L:."J li( 1, 2):N(2 ,3>=- 2
LET t1(2 , 1)=-3
LET N(2 , 2):3
~T
A:ZER(ij,l)
~AT E=ZER(~,l)
~00
1110
1120
1!30
LET
LET
~~
C:ZER(4 , I)
1170
LET K=Kl
480
FOR I=O TO U1
LET U2:l/U1
LET U(1 ,1): U2~3
LET U(1 , 2) =U2U2
LET U(1 , 3)=U2
510
520
530
5110
550
560
'SET UP U-NATfiiX
LT U(1 , 4):1
570
580
590
600
610
LET W(3,1):W2
LET W(4 , 1):1
11./iT A::JII U
NAT E=P*A
NAT C:JJ*B
620
63C
f'1AT D:U* C
LET C(L,K):D(l, 1)
liEXT J
6110
650
660
670
t;EXT I
IF K:2 THEN 720
IF K>2 WElJ 740
f.8o
690
700
710
,...AT P:Y
GO TO 1170
120
730
P:Z
ro 470
I'..~T
ro
740 SUSEtiD
C-31
IJ(2 , ~)=-1
500
t.~..ATRIX
~50
1160
490
' SET UP
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
ooro
GOTO 370
LET Ft:F=Y
FNEND
FOR C: l 70 3
LET \ 1:0
fi.A i B:X
' X- CCI1PONENT
HAT E=Y
'Y-W1 PO::ENT
GOTO 460
GOTO 460
tAT E.:Z
' 2-cot'POUEt.T
FOP U: 0 TO 1 STEP 1/( P- 1) ' FOR FIXED U CALC. VARIOUS \t' S
FOR H: 0 TO 1 STEP 11( P-1 )
LET Wl:\\1+ 1
f'OR 1:0 TO N
LET Jl:(FNF(N)/(FNF(I) *ftlF(N-1))) 1 0-I*( 1-U)-(tJ- I)
FOR J: 0 T0 M
LET K1: (FlJF(~1)/(PNF(J ) 1 FNF(V-J)) )w-J 1 ( 1- W) -(H-J)
LET S(C , \1 1 ):S(C ,W1)+B(l~l,J+1 ) * J 1* J\1
NEXT J
5 10
520
530
5~0
580
500
570
300
LET fliF: 1
ll90
560
GRID
LET X=X-1
IF X:O THEN 360
460
550
rEF~lNG
LET Y=Y*X
340
390
400
4 10
420
430
1140
ll50
460
470
LET Y:l
320
330
380
& 6-1 3
' S( 1, ):X~ENTS
' S(2 , )=Y-c:ot-'PONF~'TS
' S(3 , )=Z-00-\PONEM'S
' F'ORt-IAT IS niAT FOR A FIXED VALUE Cf' U TilE tJEX7
' fl El..El!E"TS 00t4TAIN 1liE \IALUES FOP TiiF CURVF C( U(SUP [), W)
' S HAS OlfiEt:SIO~S OF 3 X P-2
11AT B: ZER( N, H)
' REDIMOOIOf, & ZEPO INTERf'..AL Nf\TRIX
~F FNf( X)
' DEFINE f'UNCfiON TO CALC. FAC10HlAL Cf EC. ( 5- M)
IF X:O THEN 340
310
350
360
370
NEXT I
NEXT W
NEXT U
NEXT C
590 SUBEfiO
INDEX
A/0 ccnverter, 8
Axis:
APr, 1
Absolute coordinates, 4, 191
Active ax>rclinates, 4, 191
nde~:2'1c::e ,
93
Affine transfonnation, 59
Algorithms, 200
BASIC, 200
Alphan\ft!ric keytx>ard, 8
Be;un,
.AnalytiC ge<:llCtry 1 94
Begin frame 1 19 3
Angular perspective, 69
BEZIER, 225
~tions,
Bezier:
55
Area, 34
Array, 4
BICUBIC, 229
Associatl.ve, 198
INr.Ev. 233
Bl.cubic surface patch, 170, 173,
183, 229
Circular helix, US
c~
BIL.INEAR, 228
Clipping, 6
Closed curve, 93
nx3es, 188
COnnutative, 198
Bits, 4
CCIIpJter aided
catprt:er graphics, 1, 3
Concatenation, 6, 44
COnic:
1 71 , 174
Blending, parabolic, 133, 137, 223
lMI"IUfacturing1
parmretric, 103
174
OOOtrol
BSPLINE, 226
co::NSLIN, 228
B-spline, 226
djals,
8, 10
bilinear, 182
surface, 180
generalized, 181
ca 11 i graphic, 12
Coordinates:
absolute 1 4 1 191
display, 6
Cavalier projection, 65
relative, 4, 191
center of
transfonood, 25
user, 6
184
projection , 40 , 60 , 67
Otaracte.rs, 7
CIJCIE, 216
Circle, 95, 96
nonpararretric, 214
CRl' display, 73
CUbic, 92
234 INDEX
oottcns, 20
Direction oosine , 55
Directnx, 95
Discriminate, 96
Display buffer, 12
Display oontro11er, 12
<Xlntro1, 189
Display coordinates, 6
Display file, 5
CUrve:
Distortion, 32
Distributative, 198
bl~,
~t
134, 143
boundary, 176
cl osed, 93
l):)uble buffering, 13
9Merator, 3
DJ:un plotter t 13
mathematical, 89
raster scan, 13
0\mp blffer, 193
nonparamrt.ric, 90
pararretric, 92
I:XIal
Dyr-.amic notion ,
2 , 11, 13
plane, 89
second deqree, 91
space, 116
CUrved line Jrode t 190
CUrved surfaces, 164
Eccentricity, 95, 97
le!l'elts 1 196
EIL.IPSE1, 216
Ellipse, 95, 97
Enla.rgerrent 1 32 t 41
Derivatives, 162
Erase, 11
Determinant, 198
Euclidean gearetry, 59
Explicit representation, 90
Dials, control, B, 10
conditioos , 128
Digitizer, 20
DIMETRIC, 209
File, 4
Dllretnc, 60, 63
Fitting,
projcct.l.on , 209
cutVC,
91, 139
~I LHJOI
fl.&CktJ" , 7 , II , l l
Uflll itJ t
l'oc:u:. , 9'>
llfl'l i c 1t
p.:-r
1'-p.ll d a, 17C,
rn r t:'fr u
J'unctlm:
h tctr.:tll
pi
rl
:111 ~ , 117
~.,.....
, <1
nl:h 1 uuo:Jp , I 3
Tnriuiu
tlr.twmrl , Ulll , l 9 I
Ju f] IY'l:lflfl JI(HIII
f.J11ll r ,l)
lnitl,
11)
11:.-~ .
~],
l'IJ
1'""' ,
1 ~4
L'Wi.t..cJMs , 8, 10 , lJ
\1\_'Ct.o r
Vtlll~ ...) ,
Jlil
l nt~'lIC'I
H4
Tnl r fd , 1118
I :71Vl C.':r~u
t:Cn.ralizt'fl
rtJlOr ,
<'I 'Jl
Hurf.'l(Y , JRI
{unclior., 101
l>CJ J ,Jt
~ J rt.'\ll ll
'}!)
i iM ,J J
r.rc~flluc
t VI
HX~:I
J89
r.rph l o> :
10 1 4:.l
rioJa
110
1 :110
ISur tr ll
tk:vit"'' IRii
II\ II
J(,')
c;rrJhu: pnmll
I I uI
.rc, 1 11
inpul, laCJ
lll'J
1111 Vf' ,
hll l lol"'',
(,I) ,
prQ I' I
I t II ,
(,
2]()
llallroK1 i Vf, I, :l
llrx ~ , 190
[,IJrY, H, 10, lO
.Jt'fol
14, HJ
U lVI ,
1'"' 'f d
lJ :l .t
pr an ti r, Jl , 2]
. , 4,
4(, , 200
IM'I:JQH, ]17
IR1 4l ,
JUdi .
')}
1 ~. n, '10
r.lsll! pr:inttr , H,
L l~l t
IM1!1Ch..? , /Ill
llypt
111
11'1 ,
h 1etvl 1 Jr,C)
int trJ.n l. I u .. ,, lf,r.
t
r''"
J.illl .. :
I o nrut 1 .lfa'
, ,
IMI , 1/0
236 INtEX
parallel, 29
l>buSe, 8, 20
transfox:mation of, 27
t-11LTIOBJF.X:T, 180
~tiple
surface,
182
18~
Nc::llc:CrmUtati ve, 50
Longl.tude, 158
l'lachine tool, 1
NOnsi.ngular, 199
~~pping,
Noxrral., 160
~~them:ltical
curves, 89
NormllizaHm, 39 , 93
addition, 197
Nf'C!K!F. f 214
algebra, 196
iden~ty,
Cbl.ique perspective, 72
inversion, 122
Cblique projectim, 65
Order, 196
multiplier, 2
nontri.d.i.agc::l'la, 127
Oscil1osrope, ll
product, 177
OVerall scaling, 40
subtracticn, 197
tranSfonnation, 28, 47
PAAABOLA, 217
Parabola, 95
zero, 197
l1idpoi.nt transfoDM.tion , 28
arc, 108
Minicxxrputer, l
Parallel lines 1 29
f>bde:
Parallelograms, 30
erase, 190
graphics, 190
1ncrerrental, 13
standby, 190
Parmretric curve , 92
Im.EX 237
Parametri c ell i pse, 104, 216
Points, t.race, 73
Bt..~ier,
176
Polyncrnial, 91
Bel:nstllli'\, 140
spline, 147
Pen , 4
Potentiareters , 8
PROJ , 208
Project ion , 40
Perspective , 4 7
angular1 69
gearet.r:y , 59
cabinet, 65
oblique , 72
cava l ier, 65
projection, 60 , 66 , 67
two-point , 71 , 75
orthographic, 208
s ingle point, 69
three point, 72
Phospror, 12
Picture, 3, 4
st:.ereographic , 84
Rea)
Rec:::OI'lSt:ruction, 78 , 2ll
Plane curves , 89
laluc:tion , 41
refresh rate, 12
~fresh
Pl otting head , 4
lesol ution 1 23
Point at infinity, 68 , 77
t.iJre, 2
tube , 11 , 19 , 23
Point, inflection , 92
al::out
Point , vanishing, 68 , 73 , 76
about y , 204
about z , 205
Points, 41 24
Points a t infinity , 4l
x, 204
238 INDEX
Scale transfo:rnation, 48
Scaling, 26, 32, 34, 40, 47,
201, 203
Scan
conversion, 13
Scissoring, 6
curve, 91
degtee surfaces, ll7
Steroo viewer, 84
Stereographic projection, 84
Storage
27, 28 , 92
Secmd degree
Stretching I 26
Second
Surface:
analytical, 158
bicubic lofted, 182
bilinear, 165, 167
bilinear, Coons, 182
b-spline, 180
ccnst.r\rtive, 165
Shearing, 47, 49
Single point perspective , 69
Sketching, 136
Slcpe, 29, 163
analytic, US
curved, 164
explicit, ll7
pararretric, ll7
intc.qx>lated 1 166
Space, three-dirrensia'lAl, 37
no.tml.ls, 160
SPLINE, 220
Spline:
1oftsmans, ll9
polygmal, 177
mathsnatical., 119
po1ynanial , 147
Square matrix, 42 , US, 196
s~
sphe.rical 1 159
rrode, 190
STERI:X> I 213
nmr:< 239
Tangent, end, 159, 176
Tangent vector , 93, 120, 122,
159, 173
2DR:Jr, 203
2D6CALE, 201
Televisicn, 12
300fNJVl' 1 201
3DRBc:x:Nl, 211
!.hit square, 34
Unit surface normal, 161
3DREFLT, 206
L"nit vector, 62
JOOCALE, 203
3t:1l'RANS , 207
User coordinates, 6
User space, 194, 195
30>rn0l', 204
3DYrol', 205
JDZJOr, 205
Vanishing {X>int.s, 74
Vector, 24
JPCIRI\K: I 218
generator, 20
'lh\Eb wheels, 20
magnibxJe, 160
Trace, 196
Track ball, 8 , 20
Transfonnaticn:
affine, 59
bilinear , 47
linear, 5
unit, 159
lines , 27
rratrix, 28, 47
Viewport, 6
midp:>.int , 28
Visioo windc:M, 7
perspective 1 76 t 77 1 210
{X>ints, 25, 28
scale, 48
Wi.nd:lW, visicn, 7
Transformed cx:ordi.nates , 25
~li..rxbwing,
Wbrk length, 4
Trilretric, 60
zero
~ratrix,
197
I
I
0-07-053527-2