用java绘制烟雾效果
有没有办法在java中绘制烟雾效果(通过使用Java2D API)。我想实现这一点:当用户提供烟雾的颜色时,程序会自动用该颜色绘制烟雾效果。我怎么能这样做呢?
Is there any way to draw a smoke effect in java (by using Java2D API). I want to achieve this: when a user provides the color for the smoke, the program automatically draws a smoke effect with that color. How could I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
计算机图形学中使用的术语是粒子系统,而不是烟雾效果。毕竟,您可以通过将烟雾视为多个粒子的集合来模拟烟雾。
有很多教程讨论用 Java 构建粒子系统。下面列出的两个链接都有源代码:
Stackoverflow上的相关问题:
The terminology used in computer graphics is particle systems, and not smoke effect. After all, you can model smoke by treating it as a collection of several particles.
There are quite a few tutorials that discuss building particle systems in Java. Both of the links listed below have source code:
Related question on Stackoverflow: