如何创建烟花在Android颗粒图形效果 [英] How to create fireworks particle graphics effect on android

查看:191
本文介绍了如何创建烟花在Android颗粒图形效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人有任何想法如何在画布上绘制制作烟花的效果? 有一个在wireworks动态壁纸(免费的应用程序),一个很好的例子。

Anybody has any idea how to make a fireworks effect by drawing on canvas? There is one nice example in wireworks live wallpaper (free app).

在那里,多点移动,并留下足迹像爆炸的明星,并逐渐消失。我认为有某种运动​​模糊的每个点上移动,而我不知道如何创建。

There, many points move and leave trails in a star like explosion and gradually disappear. I think that there is some kind of motion blur on each point moving, which I am not sure how to create.

任何意见或链接到相关的例子是值得欢迎的。

Any ideas or links to relevant examples are welcome.

推荐答案

这是一个非常抽象的(和有趣的)问题,但过于复杂,详细回答。

That's a very abstract (and interesting) question but far too complex to answer in details.

你真正寻找的可能是一种改进的粒子系统。粒子系统基本上是一个引擎的粒子,其中包括物理引擎。

What you're really looking for is probably a sort of a modified particle system. A particle system is basically an engine for particles that includes a physics engine.

不过,你应该专注于有这些:

However, what you should focus on are these:

  • Memory Pool pattern - useful for fireworks since you don't want to allocate objects during runtime.
  • Particle system tutorial - great and the tutorial is specifically for Android.
  • Particle system - great, but for C++.

一旦你建立它(或者得到关于它的理解),你可以很容易地将其转换成画布系统,虽然的OpenGL 是preferable替代。

Once you built it (or gotten an understanding about it) you can easily convert it to the Canvas system, although OpenGL is the preferable alternative.

这篇关于如何创建烟花在Android颗粒图形效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆