gpt4 book ai didi

c# - 没有 OpenGL 和其他库的粒子系统

转载 作者:太空宇宙 更新时间:2023-11-03 11:21:51 24 4
gpt4 key购买 nike

我必须使用 C# 在粒子系统上创建一个程序,并且我使用的是 Visual Studio 2010。我不能使用任何库,例如 OpenGl,...我只能使用 C# 中的 Graphisc 库。我尝试阅读一些教程和讲座,但我仍然不知道如何实现。

任何人都可以帮助我理解我应该如何分解我的问题吗?或者指导我一些有用的教程?这对我来说是新的,我有点卡住了。

我的任务:

Program a simple generator luminous particles in the shape of a geyser from a point generator, view the particles as different colored dots moving across a single track on a black background in parallel projection.

最佳答案

查找 BackgroundWorkerRenderTargetBitmap 最好在 WPF 中执行此操作

伪代码

backgroundWorker()
{
while(isRunning)
{
update()
draw()
}
}

update()
{
for each all particles
{
update gravity and/or relativity to other particles
}
}

draw()
{
clear bitmap

for each all particles
{
draw your particle
}

set it to your container
}

这是基于一个游戏循环

关于c# - 没有 OpenGL 和其他库的粒子系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10688687/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com