opengl - 如何找到贝塞尔曲线上两点之间的角度?

标签 opengl bezier

在我当前的 OpenGL 项目中,我试图使链条的链接紧贴贝塞尔曲线的轮廓。如何找到曲线上两点之间的角度,以便我可以定位链条的链接,使它们遵循曲线。

Here是曲线和链条的图片,我需要某种方法来旋转链接,以便它们遵循曲线。

这里有人知道怎么做吗?

最佳答案

也许像 this就是您所需要的。

How to calculate the tangent to a Bezier curve

This is hard to find online. It must be a secret closely held by those who know. Oh you can find the math formulae, but have fun interpreting them if you are not a mathematician. So what is a poor developer to do? Go back to school.

I spent a couple days bashing my skull over this one. I googled my brains out (which was easier once my skull was sufficiently bashed). Then one bright beautiful Saturday, I was holed up in my developer's dungeon resting my weary bones. I had the TV on in front of me and Wikipedia to the right and there I was lazily switching between watching them both.

Continue Reading...

关于opengl - 如何找到贝塞尔曲线上两点之间的角度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1084641/

相关文章:

c++ - QGLWidget paintEvent : where to initialize openGL?

c++ - glPushMatrix() 和 glBegin() 之间有联系吗?

javascript - 如何计算贝塞尔曲线上的控制点?

opengl - 了解 OpenGL 中的转换矩阵

c++ - 在 OpenGL 中使用过剩的 vsync 问题

swift - 从贝塞尔路径计算点

javascript - 如何在html5 canvas中绘制动画贝塞尔曲线时保持流畅的线条

c# - 递归贝塞尔曲线算法在 C# 中不起作用

c++ - 预期 '(' 跟随 'WINGDIAPI'

swift - 根据百分比填充描边颜色,即 80%、70% 或任何其他百分比