欢迎来到天天文库
浏览记录
ID:38119120
大小:230.49 KB
页数:5页
时间:2019-05-27
《ADAMS的CSG实体介绍》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、WhatisConstructiveSolidGeometry?Contents1.0Introduction:IntelligentGeometry2.0ConstructiveSolidGeometryDefined3.0ConstructiveSolidGeometryinAction3.1BasicCSGOperations3.2IntermediateCSGOperations3.3AdvancedCSGOperations4.0Conclusion1.0Introduction:IntelligentGeometryConstructivesolidgeomet
2、ry(CSG)isatypeofintelligentgeometrythatgivestheprogrammerextrainformation.CSGusessimpleobjectscalled“solids”,constructedaccordingtogeometricrules.ThespecialpropertiesofCSGsolidsallowmathematicaloperationsthatarenotpossiblewithanarbitrarypolygonmesh.It’snowonderthatgameslikeHalf-Life2,Doom3
3、,andUnrealTournament2004relyonCSGasthebasisoftheirworldgeometry.2.0ConstructiveSolidGeometryDefinedCSGsolidsaresimpleconvexobjects,madeoutofintersectingcoplanarfaces:Convexmeansthatallfacespointoutawayfromeachother:Coplanarmeansthatalltheverticesofafaceliealongthesameplane:Thetoprightverte
4、xhasbeenmovedinwardstomaketheselectedfacenon-coplanar.Concaveobjectscanbecreatedusingmultipleconvexsolids:ThisconcavesolidstillfollowstherulesofCSG;eachindividualsolidisconvex.3.0ConstructiveSolidGeometryInActionThespecialpropertiesofCSGsolidsallowmathematicaloperationsthatarenotpossiblewi
5、thanarbitrarypolygonmesh.CSGsolidsaremadeoutofintersectingcoplanarfaces.Eachfacehasanascertainableplaneequation,definedasa3Dvector,plusadistancefromtheorigin:Eachfacehasanormalindicatingthedirectionitpoints,andadistancefromtheorigin.Theintersectionoftheplanesdefinesthesolid.3.1BasicCSGOper
6、ationsTwoequationsformthebasisofmorecomplexoperations.EquationfordistancebetweenapointandaplaneThesignoftheresultindicateswhetherthepointisinfrontoforbehindtheplane.DistancebetweenpointAandplaneB=(Bd–Bnx*Ax–Bny*Ay–Bnz*Az)Equationforray-planeintersectionDeterminestheintersectionpointofaline
7、in3Dspacewithaplane.IntersectionofrayABwithplaneC:u=(-Cnx*Ax–Cny*Ay–Cnz*Az+d)/(-Cnx*(Ax–Bx)–Cny*(Ay–By)–Cnz*(Az–Bz))x=Ax+(Bx-Ax)*uy=Ay+(By-Ay)*uz=Az+(Bz-Az)*u3.2IntermediateCSGOperationsIntermediateoperationsbasedonbasicCSGoperationscanbeusefulduringruntime,an
此文档下载收益归作者所有