Bear

Forum Replies Created

Viewing 30 posts - 1 through 30 (of 136 total)
  • Author
    Posts
  • in reply to: HW8的一些问题 #6276 Score: 0
    Bear
    Participant
    -11 pt

    – 图形学的模拟和物理仿真目标又不一样,公式无法反应真实世界很正常。Phong 那么假但现在不还用吗
    – 但这个系统已经诞生很久了,早年间的布料模拟一直用这个,至少说明能停下来
    – 至于现在算内力停不下来应该是有其它因素框架并没有考虑
    – 我的打法有没问题也没法验证,但按照公式应该是没错的。反正我的结果是变成了正常的钟摆摆来摆去,幅度较小

    in reply to: simulateVerlet实现问题 #6258 Score: 0
    Bear
    Participant
    -11 pt

    F=ma 算 a 的时候直接取 a=g 不要算 F

    in reply to: HW8的一些问题 #6257 Score: 0
    Bear
    Participant
    -11 pt

    辛苦了这么多字。。。

    – F = -kd*V 算阻力自然还是放在 Mass Loop 好
    – 我指得是 F = -kd * dot(difference(v2, v1), difference(pos2, pos1).unit()) 这个利用内力算阻力的放在 Spring Loop 里才能算,同时这种写法没起到停止的作用(助教发帖这个不用实现了,估计可能框架没支持这种方法算)
    – 显式欧拉我靠把每帧 step 加到 128000 才最终稳定停下来,你可以实验试试

    in reply to: HW8的一些问题 #6252 Score: 0
    Bear
    Participant
    -11 pt

    所以框架把TODO dumpling 放在最后面是迷惑行为?

    in reply to: HW8的一些问题 #6251 Score: 0
    Bear
    Participant
    -11 pt

    我在spring 里算是因为用考虑内力的方法

    如果在mass里没法算内力啊

    应该是重力加速度,因为是config定义的,我当成g也做完了

    in reply to: simulateVerlet实现问题 #6246 Score: 0
    Bear
    Participant
    -11 pt

    – 隐式最后应该停下来,显式增大到 100000 应该也能停下来才对
    – 所以你应该算完 x(t+1) 再更新啊

    in reply to: simulateVerlet实现问题 #6242 Score: 0
    Bear
    Participant
    -11 pt

    – 显式欧拉的带 damping 也没问题吗?每帧走多少步?我走100000才能稳下来显式真的不稳定。。。
    – 你对 static 理解不对,m有个变量就是 last_pos, 维护更新这个就好

    in reply to: HW8的一些问题 #6240 Score: 1
    Bear
    Participant
    -11 pt

    还是因为显式欧拉不稳定, 我把每帧步骤调到了 12800,终于显式欧拉也停下来了

    This post has received 1 vote up.
    in reply to: simulateVerlet实现问题 #6239 Score: 0
    Bear
    Participant
    -11 pt

    – 你这压根没用 last_pos 即 x(t-1) 啊?直接 pos – pos 了
    – 欧拉那边你做出来了吗?加了 dumping 的

    in reply to: HW8的一些问题 #6232 Score: 0
    Bear
    Participant
    -11 pt

    所以我已经怀疑人生了。。。

    看看后来人能不能躺平路吧,唉

    in reply to: simulateVerlet实现问题 #6230 Score: 0
    Bear
    Participant
    -11 pt

    不用加弹力了

    直接 a = g

    in reply to: HW8的一些问题 #6228 Score: 0
    Bear
    Participant
    -11 pt

    我设成0.1显式和隐式都停不下来 ╮(╯▽╰)╭
    直接就飞了。。。

    明明公式很简单我也没打错
    所以太难了。。。

    • This reply was modified 3 years, 11 months ago by Bear.
    in reply to: 作业8:关于欧拉法一些问题 #6227 Score: 0
    Bear
    Participant
    -11 pt

    你可以看看上面那个作业8的问题帖子

    in reply to: HW8的一些问题 #6221 Score: -1
    Bear
    Participant
    -11 pt

    有道理。。。我被TODO影响了

    不过在 Spring Loop 里算内力的那种也停不下来啊。。。

    This post has received 1 vote down.
    Attachments:
    You must be logged in to view attached files.
    in reply to: HW8的一些问题 #6215 Score: 0
    Bear
    Participant
    -11 pt

    请问我这些写的和你差别很大?
    我感觉我这里不应该有问题啊😂

    Attachments:
    You must be logged in to view attached files.
    in reply to: HW8的一些问题 #6214 Score: 0
    Bear
    Participant
    -11 pt

    欧拉法这里显式隐式用这个都能停?
    那可太神奇了。。。

    in reply to: HW8的一些问题 #6212 Score: 0
    Bear
    Participant
    -11 pt

    这不是一码事吗。。。

    框架最开始时Spring 长度没有发生变化,所以第一步时的 Spring 中实际上啥也没干

    in reply to: HW8的一些问题 #6209 Score: 0
    Bear
    Participant
    -11 pt

    内力和简单的那种我都有写发现没啥效果。。。
    我代码在上面你可以看看我是不是打错了

    in reply to: HW8的一些问题 #6207 Score: -1
    Bear
    Participant
    -11 pt

    。。。你还是再看看课吧,概念都没搞懂

    This post has received 1 vote down.
    in reply to: HW8的一些问题 #6204 Score: 0
    Bear
    Participant
    -11 pt

    反正在我这里是两种方法都停不下来;其中在 Spring 计算的方法是能变成正常幅度的钟摆然后停不下来;你可以看下我下面的代码有问题一起讨论讨论

    in reply to: HW8的一些问题 #6200 Score: 0
    Bear
    Participant
    -11 pt

    ???
    一个物体运动受到多个方向不同的力没问题啊,每次给的阻尼也都是反向的力会减少整体系统中的能量。

    我觉得你这个例子不对劲,而且如果单纯打对折有用完全正确的话显式欧拉的方法最终就不会飞了。。。

    in reply to: HW8的一些问题 #6197 Score: 0
    Bear
    Participant
    -11 pt

    – 阻尼有两种方法啊,一种在 Spring 一种在 Mass。我在下面都写了,不过这两种我发现都没用。。。
    – Vertel 的话你忘了固定的 mass 是不能动的?Spring 里要注意固定的不要动

    in reply to: HW8的一些问题 #6194 Score: 0
    Bear
    Participant
    -11 pt

    所以作业就很迷。。。两种做法都没用

    in reply to: HW8的一些问题 #6192 Score: 0
    Bear
    Participant
    -11 pt

    – 对就是这个代码最终 spring 也停不下来,变成了惯性的正常幅度运动。。。
    – 我也是这么想的,那直接不算内力算 damping 应该是

    
      m->forces += -0.00005 * m->velocity.unit();
    

    直接算速度的反方向加到力上,但实际上也没用我发现。。。

    in reply to: HW8的一些问题 #6189 Score: 0
    Bear
    Participant
    -11 pt

    我觉得我实现也没问题啊🤔

    Attachments:
    You must be logged in to view attached files.
    in reply to: HW8的一些问题 #6188 Score: 0
    Bear
    Participant
    -11 pt

    试了下初始 0 时的 t-1 不用写近似也行

    in reply to: HW8的一些问题 #6187 Score: 0
    Bear
    Participant
    -11 pt

    他直接改了速度了。。。公式不是应该算的是力?

    in reply to: HW8的一些问题 #6185 Score: 0
    Bear
    Participant
    -11 pt

    对。然后记得维护更新,

    初始 0 时的 t-1 可能要靠近似?

    in reply to: HW8的一些问题 #6184 Score: 0
    Bear
    Participant
    -11 pt

    – 全局阻尼那个,TODO 在 Mass 处而不是 Spring 处,所以可能是按最普通的来不计算内力。我是奇怪我用两端点算最后结果是根据惯性定律摆来摆去停不下来。。。
    m->forces += -0.00005 * m->velocity.unit(); 最普通的这样也不行
    – Vec 初值就是 0 啊,last_pos 初始值和 pos 一样
    – 加速度是因为有重力啊,我是看 Verlet 本身的力有说根据势能算,不过按 PDF 的说法应该就是按我上面说得在 Spring 强行移动恢复原长, Mass 再更新位置

    in reply to: HW8的一些问题 #6175 Score: 0
    Bear
    Participant
    -11 pt

    就是像我说的改位置,在 Mass 处再根据给的公式移动到下一个位置(大概)

Viewing 30 posts - 1 through 30 (of 136 total)