版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Particle Systems1Angel: Interactive Computer Graphics 5E Addison-Wesley 2009原著Ed AngelProfessor of Computer Science, Electrical and Computer Engineering, and Media ArtsUniversity of New Mexico编辑 武汉大学计算机学院图形学课程组2Angel: Interactive Computer Graphics 5E Addison-Wesley 2009IntroductionMost important of
2、procedural methodsUsed to modelNatural phenomenaCloudsTerrainPlantsCrowd ScenesReal physical processes3Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Newtonian ParticleParticle system is a set of particlesEach particle is an ideal point massSix degrees of freedomPositionVelocityEach part
3、icle obeys Newtons law f = ma4Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Particle Equationspi = (xi, yi, zi)vi = dpi/dt = pi = (dxi/dt, dyi/dt, zi/dt)m vi = fiHard part is defining force vector5Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Force VectorIndependent Particl
4、es O(n)GravityWind forcesCoupled Particles O(n)MeshesSpring-Mass SystemsCoupled Particles O(n2)Attractive and repulsive forces6Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Solution of Particle Systemsfloat time, delta state6n, force3n;state = initial_state();for(time = t0; timefinal_ti
5、me, time+=delta) force = force_function(state, time);state = ode(force, state, time, delta);render(state, time)7Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Simple ForcesConsider force on particle i fi = fi(pi, vi)Gravity fi = g gi = (0, -g, 0)Wind forcesDragpi(t0), vi(t0)8Angel: Inter
6、active Computer Graphics 5E Addison-Wesley 2009MeshesConnect each particle to its closest neighborsO(n) force calculationUse spring-mass system9Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Spring ForcesAssume each particle has unit mass and is connected to its neighbor(s) by a springHo
7、okes law: force proportional to distance (d = |p q|) between the points10Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Hookes LawLet s be the distance when there is no force f = -ks(|d| - s) d/|d|ks is the spring constantd/|d| is a unit vector pointed from p to qEach interior point in m
8、esh has four forces applied to it11Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Spring DampingA pure spring-mass will oscillate foreverMust add a damping termf = -(ks(|d| - s) + kd dd/|d|)d/|d|Must project velocity12Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Attraction
9、and RepulsionInverse square law f = -krd/|d|3General case requires O(n2) calculationIn most problems, the drop off is such that not many particles contribute to the forces on any given particleSorting problem: is O(n log n)13Angel: Interactive Computer Graphics 5E Addison-Wesley 2009BoxesSpatial sub
10、division techniqueDivide space into boxesParticle can only interact with particles in its box or the neighboring boxesMust update which box a particle belongs to after each time step14Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Linked ListsEach particle maintains a linked list of its
11、neighborsUpdate data structure at each time stepMust amortize (分期偿还) cost of building the data structures initially15Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Particle Field CalculationsConsider simple gravityWe dont compute forces due to sun, moon, and other large bodiesRather we u
12、se the gravitational fieldUsually we can group particles into equivalent point masses16Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Solution of ODEsParticle system has 6n ordinary differential equationsWrite set as du/dt = g(u,t)Solve by approximations using Taylors Thm17Angel: Interac
13、tive Computer Graphics 5E Addison-Wesley 2009Eulers Methodu(t + h) u(t) + h du/dt = u(t) + hg(u, t)Per step error is O(h2)Require one force evaluation per time stepProblem is numerical instability depends on step size18Angel: Interactive Computer Graphics 5E Addison-Wesley 2009Improved Euleru(t + h)
14、 u(t) + h/2(g(u, t) + g(u, t+h) Per step error is O(h3)Also allows for larger step sizesBut requires two function evaluations per stepAlso known as Runge-Kutta method of order 219Angel: Interactive Computer Graphics 5E Addison-Wesley 2009ContraintsEasy in computer graphics to ignore physical realitySurfaces are virtualMust detect collisions separately if we want exact solutionCan approximate with repulsive forces20Angel: Interactive Computer Graphics 5E Addison-Wesley 20
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 浙江呼叫中心外包合同
- 室内消火栓系统专项施工方案
- 扣件式钢管脚手架防护栏杆使用安全技术交底
- 吉林整站优化外包合同
- 肺结核培训试题及答案
- 学校后勤劳务外包合同
- 培训机构影像外包合同
- 医疗卫生工程施工成品保护保证措施
- (完整版)绿地绿化工程施工方案
- 质量管理部检验员考试试题题库(含答案)
- 肝性脑病合并糖尿病护理
- 方太电烤箱KQD50F-C2说明书
- 纵隔肿瘤手术麻醉管理
- 工艺报警分级管理制度
- 腾讯音乐2025年音乐营销手册
- 北京课改版五年级下册小学英语全册单元知识点小结
- 金矿投资合作协议书
- 2021松江飞繁JB-9102BA JB-9108G JB-9108B JB-9108T火灾报警控制器
- 25春国家开放大学《管理英语3》形考任务(综合测试+写作+学习表现)参考答案
- 2024电力线路跨越电气化铁路施工防护技术规范
- 2024年江西省高考物理试卷真题(含答案解析)
评论
0/150
提交评论