机械CADChapter 5Basic Graphics ConceptsWord下载.docx
- 文档编号:22735981
- 上传时间:2023-02-05
- 格式:DOCX
- 页数:15
- 大小:104.33KB
机械CADChapter 5Basic Graphics ConceptsWord下载.docx
《机械CADChapter 5Basic Graphics ConceptsWord下载.docx》由会员分享,可在线阅读,更多相关《机械CADChapter 5Basic Graphics ConceptsWord下载.docx(15页珍藏版)》请在冰豆网上搜索。
5.2.1.2Scaling
Thepointcanbescaledbysxalongxaxis,sya1ongyaxisandszalongzaxis,whichmaybemathematicallyexpressedas
P*=[S]P(5.3)
where[S]isadiagonalmatrix,
(5.4)
Inscalarform,Eq.(5.3)maybewrittenas
(5.5)
5.2.1.3Reflection
Reflection(ormirror)operationsareoftenusedtogeneratesymmetricmodels.Reflectionoperationsrelativetothemodelcoordinatesystemcanbeexpressedas
P*=[M]P(5.6)
Where
(5.7)
wherem11,m22,m33=
1.
Forexample,thetransformationmatrixtoreflectPrelativetoxyplaneis
(5.8)
5.2.1.4Rotation
AtypicalrotationoperationisdemonstratedinFig.5.2,wherepointPisrotatedanangel
aboutzaxis,andthenewpositionisP*.
Fromthefigure,itcanbeobtainedthat
.Utilizingthetrigonometricfunctions,wegetthematrixformfortherotationaboutzaxis
P*=[R]P(5.9)
(5.10)
Therotationsaboutxandyaxiscanbederivedinthesimilarway.
5.2.2HomogenousRepresentation
Thetranslationtransformationinpreviouschapterisrepresentedbymatrixaddition,whilescalingandrotationbymatrixmultiplications.Itisconvenienttorepresentalloperationsbymatrixmultiplication,suchas
P*=[T]P(5.11)
where[T]isthetransformationmatrixwewanttodeduce,PandP*arethecoordinatesofpointsbeforeandafterthetransformations.Thiscanbedonewithhomogenouscoordinates,andthetransformationmatrix[T]becomesa4
4matrix.
Foranypoint(x,y,z)inCartesiancoordinates,wedefinethefollowingrepresentation:
①Fromthe3Dcoordinatetothehomogenouscoordinate:
(x,y,z)=>
(.x,y,z,1)
②Promthehomogenouscoordinatetothe3Dcoordinate:
(x,y,z,W)=>
(x/W,y/W,z/W)(W
).
③Hormogenizing:
(x,y,z,W))=>
(x/W,y/W,z/W,1).
Forexample,(4,0,0,2)and(2,0,0,1)representthesamecoordinates(2,0,0).
Wenowusethehomogenouscoordinatestorepresentthegeometrytransformationdiscussedinpreviouschapter.
GiveP=[xyz1]T,thefollowingoperationsmaybedefined.
(1)Translation
P*=T(dx,dy,dz)P(5.12)
Where
(5.13)
(2)Scaling
P*=S(sx,sy,sz)P(5.14)
(5.15)
(3)Rotaiton
(5.16)
Whereforrotationaboutxaxis
(5.17a)
forrotationaboutyaxis
(5.17b)
forrotationaboutzaxis
(5.17c)
(4)Compositetransformation
Inpractice,aseriesoftransformationsmaybeappliedtoageometrymodel,resultinginacompositetransformation.Compositetransformationmatrixisequaltotheproductofthesequenceofthegiventransformationmatrices.Theorderofmultiplicationofthematricesisimportantbecausematrixmultiplicationisnotcommutative.
Mostofthetransformationsthatwenormallydealwithcanbeobtainedasacompositetransformationofbasictransformations.Ingeneralwehave
(5.18)
where[Ti]aretransformationmatricesand[T]istheproductofthem.
5.3MappingofGeometryModels
Thegeometrytransformationsdiscussedsofarassumethatthecoordinatesystemstaysunchangedandtheobjectistransformedwithrespecttotheoriginofthecoordinatesystem.Analternativebutequivalentwayofthinkingistotakethegeometrytransformationasachangeofcoordinatesystem.Thegeometrytransformationscanberegardedasmappingsofthegeometrymodelbetweendifferentcoordinatesystems,andtherelatedmatricesarecalledmappingmatrices.
Thisviewisusefulduringthemodelgeneration,asitisoftenconvenienttobuildsomepartofthemodelinthelocal(working)coordinatesystems.Thesoftwaremapsthesecoordinatestoglobalcoordinates.
5.3.1Translation
Figure5.3showsthatpointPisdescribedintwocoordinatesystemsxyzandx*y*z*.ThemappingbetweenthesetwocoordinatesystemscanbewrittenasP*=[T]P,where[T]isthesameasT(dx,dy,dz)inEq.(5.13).
5.3.2Rotation
Figure5.4showstherotationalmappingbetweentwocoordinatesystems.Thesetwocoordinatesystemssharethesameoriginbuttheirorientationsaredifferent.Itisalsoassumedthatthexyandthex*y*planesarecoincident.
Theunitvectorsi*,j*,K*ofthecoordinatesystemx*y*z*canbeexpressedas
(5.19)
Inmatrixform,
(5.20)
5.3.3GeneralMapping
ForageneralmappingasshowninFig.5.5,wehaveP*=[T]P
(5.21)
Inwhich[R]istheorientationvectorsoftheorigintothexyzcoordinatesystem,whiledisthepositionvector,bothexpressedinx*y*z*system.
5.4ProjectionsofGeometryModels
Projectionisusedtoreducethedimensionofamodelfrom3Dto2D.Therearetwotypesofprojections:
parallelprojectionandperspectiveprojection.
5.4.1ParallelProjection
Parallelprojectioncanbedividedintoorthographicandobliqueprojections.Inorthographicprojection,directionofprojectionandprojectionplanenormalareparallel,whileinobliqueprojection,directionofprojectionandprojectionplanenormalarenotparallel.
Thematrixformoforthographicprojectionis:
Pv=[T]P(5.22)
(5.23)
Orthographicprojectionpreservesrelativeproportionsandiscommonlyusedindraftingtoproducedrawingof3Dobjects.
5.4.2PerspectiveProjection
Ifthedistancebetweentheprojectioncenterandtheprojectionplanisfinite,thentheprojectionisperspective.Perspectiveprojectionisrealisticbecauseitresembleshuman’sviewing,andtheobjectbecomessmallerasitismovedawayfromtheviewplane.
Figure5.9showsthatacubeviewedinperspective.Theprojectionplaneisparalleltothexyplaneandperpendiculartothezaxis.Linesthatareparalleltothexoryaxisremainparallel,andxandydistancesbecomeshorteraszbecomesmorenegative.
Toderivethetransformationmatrixinperspectiveprojection,weplacethecentreofprojectionintheoriginofthecoordinatesystemandtheprojectionplanisperpendiculartothezvaxis,seeFig.5.10.Assumethat(xv,yv,zv)and(xp,yp,zp)arecoordinatesbeforeandaftertheperspectiveprojection.Fromthefigure,wegetzp=d,yp=dyv/zv,Similarlyxp=dxv/zv.Thiscanbewritteninhomogenousform,
(5.24)
5.5HiddenSurfaceRemoval
Togivea3Dpictureofthemodel,hiddenlinesandsurfacesmustberemoved.Linesareassumedtobetheedgesofthesurfaceandwerefertothegeneralprocessofmovinghiddensurfacesashiddensurfaceremoval.
Therearevariousalgorithmsforhiddensurfaceremoval.Thesealgorithmscanbecharacterizedastwogroups:
objectprecisionandimageprecision.
Objectprecisionisbasedontheobjectgeometryanddecideswhichpartoftheobjectisvisibleandthendrawsthesesurfaces.Theprecisionisindependentoftheresolutiononscreen.
Imageprecisionisapixelbasedmethod.Thismethodgoesthrougheachpixelonthescreen,anddeterminestheobjectclosesttotheprojectorandthendrawsthepixel.Theresultsdependontheresolution.
5.5.1VisualTechniques
Theoperationsusedinthetypicalimage-precisionandobject-precisionalgorithmsareof-tencostly.Weneedtomaketheseoperationsaseffectivelyaspossible.Thefollowingtechniquesprovidesomegeneralwaystodothat.
5.5.1.1Coherence
①Objectcoherence:
Iftwoobjectsareentirelyseparated,weneedonlytocomparetwoobjects,notbetweencomponentfacesoredgesoftheobjects.
②Facecoherence:
Surfacecomputationcanbemodifiedincrementallytoapplytoadjacentparts.
③Edgecoherence:
Anedgecanchangeitsvisibilityonlywhenitcrossesbehindavisibleedge.
④Scan-linecoherence:
Onescan-lineofanimagetypicallydifferslittlefromthepreviousline.
⑤Areacoherence:
Agroupofadjacentpixelsisoftencoveredbythesamevisibleface.
⑥Depthcoherence:
Oncethedepthatonepointofthesurfaceiscalculated,thedepthofpointsontherestofthesurfacecanoftenbedeterminedbysimpledifferenceequation.
⑦Framecoherence:
Calculationsmadeforonepicturecanbeusedforthenextinsequence.
5.5.1.2PerspectiveTransformation
Theideawiththeperspectivetransformationistotransfertheperspectiveprojectionintotheparallelprojectionofthetransformedobjects,asshowninFig5.11.
ThepyramidinFig.5.11iscutbyafrontclippingplaneandabackclippingplane,bothplanesareperpendiculartothedirectionofprojection.Onlytheobjectsinsidethetruncatedpyramidaredisplayedandthistruncatedpyramidiscalledviewingfrustum.Theviewingfrustumbecomesaboxafterperspectivetransformation.
Theadvantagesofperspectivetransformationarethefollowing:
①Providingz-information,whichcanbeusedinz-bufferalgorithmandtexturemapping.
②Simplifyingclipping,asinthecaseofapyramidbecomingabox.
③Invertible
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 机械CADChapter Basic Graphics Concepts 机械 CADChapter