CG 5
CG 5
CG 5
Fractals
introduction
Curves are one of the most essential objects to create
high-resolution graphics.
(Xo,Yo)
DDA Algorithm
Fig:-interpolation process
B- Spline
To produce a smooth curve through a designated set of
points a flexible strip called spline is used.
The cubic Bezier curve requires four control points and these points
completely specifies the curve.
The curve begins at the first control point and ends on the fourth.
If we want to connect two bezier curve we just make the first control
point of the second curve match the last control point of its first
curve
At the start of the curve ,it is tangent to the line
connecting the first and second control points, likewise
at he end of the curve ,it is tangent to line connecting
third and fourth control points
A cubic Bezier
spline
c cd d
bcd
bc abcd
abc
a
ab
b
Points along the curve are the pure color in the spectrum,
labeled according to the wavelength in nanometer from
red end to violet end.
Chromaticity Contd…
The chromaticity of a color was specified by the two
derived parameters x and y, two of the three
normalized values which are functions of all three
values X, Y, and Z.
• This model is called additive, and the gamut of this model are
red, green and blue.
Yellow (110)
White (111)
Black (000)
Magenta (101)
CMY COLOR MODEL
In this model Cyan , magenta and yellow colors
are used as (Gamut) primary color.
1) HUE:
• It has the same meaning as in the HSV model.It specifies
an angle about vertical axis that locates a chosen hue.
• In this model H= 00 corresponds to blue.The remaining
colors are specified around the perimeter of the cone.
• Magenta is at 600, Red is at 1200 , Cyan is at H=1800
HLS Contd…
2) Lightness:
• The vertical axis in this model is called the lightness L.
At L =0 we have Black and at L=1,it is white.
• Gray scale is along the L axis and the “Pure
hues” lies on L=0.5.
3) Saturation:
• Saturation parameter S again specifies relative
purity of the color .This parameter varies from 0-1, and
pure hues are those for which S= 1 and L=0.5.
• As S decreases the hue are said to be less pure.
• At S=0 we have Gray scale
HLS COLOR Model
YIQ Color Model
Y : Luminance (Brightness)
I : Inphase
Q: Qudrature.
If a color table has 256 color entries then the table can
show any of the 256 of 16,777,216 possible colors.
Color table
Each entry in the table is 24 bit specifying one color.The
colors specified in the color table are available for selection
color.
The colors in the color table are referred by the color index.
Color Mixing
Two or more color can be added together to produce a new color . There are two
types of color mixing
If a white light will pass through a yellow filter the yellow filter
absorb blue and transmit red & green , therefore yellow can be
considered as B Filter.