版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年制造服务业项目投资计划书
- 2026年居家适老化与智能化改造项目投资计划书
- 2026年智能变色水下灯项目营销方案
- 2026年制造执行系统升级项目营销方案
- 2026福建宁德古田县安康医院招聘编外工作人员1人备考题库及答案详解(历年真题)
- 2026湖北武汉市黄陂区属国有企业招聘52人备考题库及参考答案详解
- 2026年养老服务 智慧健康监测项目可行性研究报告
- 2026年农机装备升级项目可行性研究报告
- 2026福建福州商贸职业中专学校招聘教师5人备考题库含答案详解(考试直接用)
- 2026年合成生物学制药项目可行性研究报告
- 2026年亳州职业技术学院单招职业适应性测试题库带答案解析
- 2026年广东省韶铸集团有限公司(韶关铸锻总厂)招聘备考题库有答案详解
- 儿科肺炎的常见并发症及护理措施
- 贵州省遵义市2023-2024学年七年级上学期期末英语试题(含答案)
- 河南省高速公路建设项目电力设施迁改工程费用标准2025
- 光伏支架维护施工方案
- 核电站蒸汽发生器检修方案
- 2025至2030全球及中国妊娠和生育测试行业调研及市场前景预测评估报告
- 妇科盆底功能障碍康复新进展
- 2026年湖南科技职业学院单招职业适应性测试题库含答案详解
- 护理细节血流动力学
评论
0/150
提交评论