SlidePub
Home
Categories
Login
Register
Home
General
CAD_PPT_2-1.pdf mechanucal engineering c
CAD_PPT_2-1.pdf mechanucal engineering c
UMANGSINGHhbtu
7 views
31 slides
Jun 22, 2024
Slide
1
of 31
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
About This Presentation
CAD
Size:
3.76 MB
Language:
en
Added:
Jun 22, 2024
Slides:
31 pages
Slide Content
Slide 1
OUTPUT
PRIMITIVES
x
y
ImageRepresentationsinComputers
Incomputergraphics,theimagesarecreatedon thedisplaydevices.
Forbetterunderstandingofimagegeneration,itisnecessarytoknowmoreaboutthe
imagerepresentationmechanism.
Ithasbeenobservedthatanimageisfinallyrepresentedandstoredintheframe
bufferintheformofbinarydigits, i.e.bits.
Analysisof ImageTransferMechanisminComputerGraphics
1.ImageConversioninBinaryForm
Animageisvisualizedintheform ofcollectionofstraight-linesegments,curvesand
textmatter.Ifwegoinsight,theseentitiesare composed ofcollectionofdots.
Forexample,alinecanberepresentedbythecollectionofdots.Similarly,anarcis
representedbythe collectionofdotslyingonthe trajectoryofan arc.
Slide 2
IMAGEREPRESENTATIONSIN
COMPUTERS
42
x
y
1.ImageConversioninBinaryForm…
Theexactpositionsofthesedotsdependontheradius,initial/endangles,endpoints
coordinates,etc.
MostofthemodernCADsystemsuseonlyrasterdisplaysforthegenerationand
representationofgraphicsimages.
2.FrameBuffer
Incomputergraphics,thebinaryimageinformationisstoredinthememory,called as
frame buffer or refreshbuffer.
Thedisplaysurfaceforrasterdisplaysisdividedintogridsofhorizontalandvertical
lines.Eachlineconsists ofseriesofsmallpictureelements,i.e.pixels.
Apixelismadebrightordarkdependinguponthetwostatesofbinarydigits1or0,
respectively.
Slide 3
x IMAGEREPRESENTATIONSIN
COMPUTERS…
43
y
2.FrameBuffer…
Thisisachievedbyassigning1bitmemorycorrespondingtoeachpixelofthe
viewingscreen.
3.ScanConversion
Adrawingcanbedisplayedeitherwiththehelpofpixelarraysstoredintotheframe
buffer(graphicsmemory)orbythescanconversionofstructuralobjectsformingthe
pixelpatterns.
Duringscanconversion,itisrequiredtofindoutthosepixellocations,whichare
bright.
Formonochromedevice,theimageisdisplayedbyassigningthestateofbits
correspondingtothesepixelsequalto1(onposition).
Slide 4
x IMAGEREPRESENTATIONSIN
COMPUTERS…
44
y
3.ScanConversion…
Onceanimageisscanconverted,adisplaycontrollerscanstheframebufferand
makesthosepixelsbrightcorrespondingtothebitsvalue1intheframebuffer.
Forexample,foralinerepresentation,itisrequiredtodeterminethosepixels,which
arebright.Thisisachievedbyassigningthestateofbitscorrespondingtothose
pixelsinthebuffermemoryto1.
Thus,scanconversioninvestigatesthoselocationsofpixels,whicharemadebright
andthenassigningthevalueofcorrespondingbitsinthegraphicsmemoryto1.
Figureshowsthestepsofatypicalscanconversionprocessforgeneratingagraphics
imageonthedisplaysurface.
Thereisone-to-onecorrespondencebetweenthedisplaysurfaceandmemory
locationintheframebuffer,designatedbythecoordinatespair(x,y).
Slide 5
x
y
Displayprocessor
Scan conversion
ofgraphicsimage
Framebuffer
Image definition in
graphicsmemory
Displaycontroller
Imagegeneration
ondisplaydevice
Framebuffer
●●●
●
IMAGEREPRESENTATIONSIN
COMPUTERS…
45
●
●
●
●
●
●
●●●
●●●
●
●
●●
Displaysurface
0000000000
0000011110
0000100010
0000100010
0000100010
0000011110
0000001010
0000010010
0000100010
Scanconversionprocessforgeneratinggraphicsimage
Slide 6
x IMAGEREPRESENTATIONSIN
COMPUTERS…
46
y
3.ScanConversion…
Thecoordinates(x,y)refertothepixellocations;hence,theyareintegerswith
originatbottom-leftcornerofthedisplaydevices.
However,somegraphicssystemslocatetheoriginatthetop-leftcorner.The
applicationprogramordevicedrivershouldtakecareofsuchdifficulties.
Everypixelonthedisplaysurfacerequires1-bitmemory;thus,1024x1024pixels
require1,048,576bitsmemoryintheframebuffer,whichisequivalentto131
kilobytes(8bits=1byte).
Eachpixelcanbemade brightordarkbyassigningthebinaryvalue1or0,
respectively.
Morenumberofbitsisassociatedtoeachpixelifcoloredimages,withvarying
intensitylevels,arerequired.
Slide 7
x IMAGEREPRESENTATIONSIN
COMPUTERS…
47
3.ScanConversion…
Forhighlyspecializedgraphicsapplications,thepresent-daytechnologyoffers
graphicssystemwith4096x4096pixels,inwhicheachprimarycolor(Red,Blueor
Green)isassociatedwithagroupof8-bitplanes.
Personalcomputersofferdifferentgraphicsadapterswithvaryinggraphicsfacilities.
AtypicalEnhancedGraphicsAdapter(EGA)onpersonalcomputersgivesa
resolutionof640x350pixelswith16colors.
EGAadapterswithbettercapabilitiesarealsoavailablewhichgivesverygoodtonal
andspatialresolutionsinthegraphicsimage.
Slide 8
SCANCONVERSIONOF PRIMITIVE
OBJECTS
48
x
y
Theprimitiveobjectssuch aspoints,lines, circles, curves,surfaces,text,etc.,usedfor
thegenerationofcompleximageson the displays.
Eachoutputprimitiveisdefinedbytheinputcoordinatesandotherrelated
informationabout the objectthatistobedisplayed,referredtoasattributes.
Pointsandstraightlinesarethesimplest2Doutputprimitives.
Additionaloutputsprimitivesused forconstructingthecomplexgraphicsimageare:
Conicsections:Circle,ellipse,parabolaandhyperbola
Quadricsurfaces:sphere, ellipsoid,paraboloids,hyperboloid
Splinecurves: Hermitecurve,Beziercurve,-spline
Splinesurfaces:Beziersurface,-spline surface
Polygons:Areaswithlinearboundariesfilledwithcolors/patterns
Slide 9
SCAN CONVERSIONOF
POINTS
49
x
y
Thegraphicselementssuchaslines,circles,surfaces,polygons,etc.consistofpoints.
Theseelementsarelocusofpointsundercertainconstraints.
Apointhasnodimensionsratherrepresentedasadotonthepaperandphosphordot
ontheCRTdisplays.
Apointinadrawingmaybeobtainedasfollows:
1.Inmonochrome(black/white)rasterdisplays,apointplottedbysettingthebitvalue
equalto‘1’(onpositionofpixel)atthespecifiedlocationwithintheframebuffer.
Whenelectronbeamscansacrossahorizontalscanline,itenergizesthepixelatthe
locationwheneverabitvalueequalto‘1’isencounteredintheframebuffer.
2.Incoloreddisplay,differentRGBbitvaluesareloadedintheframebufferatthe
specifiedlocation.Duringsweep,electronbeamenergizestheRGBdots(eitheras
triadsorinline),emittingRGBcolorsofvaryingintensities,producesthecolordot.
Slide 10
SCAN CONVERSIONOF
LINES
50
Agoodline drawingalgorithmmustsatisfy thefollowingcharacteristics:
•Lineshouldappearstraightonthedisplaydevice
•Lineshouldterminateaccuratelyat theendpoints
•Lineshouldhaveconstantdensitythroughoutthelength
•Lineshouldbedrawnaccurately
Foranalogdevicesuchasrandomscandisplayorpenplotter,asmoothlinecanbe
drawnbetweentheendpoints.
Thisisachievedbyapplyinglinearlyvaryinghorizontalandverticaldeflectionvoltages
toelectronbeaminsuchawaythatappliedvoltagesareproportionaltotherequired
deflectionofelectronbeamalongthexandydirections.
Forrasterscandisplay,alinesegmentcanbedrawnbycalculatingthediscrete
coordinatepoints(fromequationofaline)andplotthembetweentheendpoints.
Slide 11
SCAN CONVERSIONOF
LINES…
51
Thevariationinintensityandcolorofthelinecanbevisualizedbyloadingthepixel
informationinto the framebufferandretrievingthesamebythevideo controller.
Inrasterdisplays,thescreenlocationsarealwaysreferredwithintegervalues;therefore,
coordinate(9.43,20.78)wouldbeconvertedintothe approximatevalue(9,21).
Thisroundingoffcoordinatevaluestointegercausesthestaircase(jaggies)appearance,
whichismorepronounced onalow-resolutionrasterdisplay devices
Lineinlow resolutiondevice Lineinhighresolutiondevice
Staircaseeffecton rasterdisplay
Slide 12
Thefollowingalgorithmsaccomplishlinedrawingincomputergraphics:
•DigitalDifferentialAnalyzer(DDA)algorithm
•Bresenham’slinedrawingalgorithm
Thebasicinputforalinegenerationistheendpoints.Thepixellocationsonthelinepath
arecalculatedusingthesealgorithms.Whenelectronbeamenergizesthesepixelsduring
therasterscan,linecanbevisualizedonthecomputerscreen.
DigitalDifferentialAnalyzer(DDA)Algorithm
DDAisascanconversionline-generatingalgorithm,basedonthecalculationofeither
yorxdifferencesalongthelinepath.
Alinecanbegeneratedbyincreasingunitintervalinonecoordinate(say,x)and
determinethecorrespondingintegervaluesofintervalinothercoordinate(say,y)
nearesttothelinepath.
DDAALGORITHMFORLINE
GENERATION
52
Slide 13
DDAALGORITHMFORLINE
GENERATION...
53
Slide 14
DDAALGORITHMFORLINE
GENERATION
54
Slide 15
DDAALGORITHMFORLINE
GENERATION
55
Slide 16
Limitations
AlthoughDDAalgorithmgeneratesastraightlineatafastspeed;however,itsuffersfrom
variousdisadvantages.
Thevaluesoflineslopemmaybearealnumber;therefore,thevaluesofnew
coordinate
(x
k+1
,y
k+1
)
onthelinepathmayalsobearealnumber.
Hence,everytimeduringthecalculations,itbecomesnecessarytoroundoffthereal
numbercoordinatevaluestosomeintegervaluesbecausethepixelsarearrangedinan
integerfashion.
Therealmathematicscalculationsfornewcoordinatevaluesandroundingoff
operationofrealnumbersmakeDDAalgorithmalittleslowerprocess.
Moreover,inlow-resolutiondisplays,staircaseeffectisquiteprominent;hence,DDA
algorithmisnotpreferredfortheCADapplications.
DDAALGORITHMFORLINE
GENERATION
56
Slide 17
DDAALGORITHMFORLINE
GENERATION
57
Slide 18
DDAALGORITHMFORLINE
GENERATION
58
Table Intermediatepixelcalculations
Integervaluesy
k+1
=y
k
+mRealvaluesy
k+1
=y
k
+mIntegervaluesx
k+1
=x
k
+1k
10-180
1110.54191
1111.08202
1211.62213
1212.16224
1312.70235
1313.24246
1413.78257
1414.32268
1514.86279
1515.402810
1615.942911
Slide 19
DDAALGORITHMFORLINE
GENERATION
59
26
24
22
20
18
16
14
12
10
A(18,10)
B(29,16)
Actualline
1820222426283032
PixelNo.
Pixel
No.
Tags
Categories
General
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
7
Slides
31
Age
528 days
Related Slideshows
22
Pray For The Peace Of Jerusalem and You Will Prosper
RodolfoMoralesMarcuc
30 views
26
Don_t_Waste_Your_Life_God.....powerpoint
chalobrido8
32 views
31
VILLASUR_FACTORS_TO_CONSIDER_IN_PLATING_SALAD_10-13.pdf
JaiJai148317
30 views
14
Fertility awareness methods for women in the society
Isaiah47
29 views
35
Chapter 5 Arithmetic Functions Computer Organisation and Architecture
RitikSharma297999
26 views
5
syakira bhasa inggris (1) (1).pptx.......
ourcommunity56
28 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-31)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better