本文介绍了二次贝塞尔曲线:计算切线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个二次贝塞尔曲线,我想计算给定点的切线斜率.例如,将其设为二次贝塞尔曲线的中点,因此t = 0.5(请参见下面的链接以获取有关此图片).我已经为二次贝塞尔曲线计算了公式的一阶导数;但是我得到的斜率值为400,尽管应该为0.也许我以错误的方式使用了一阶导数?我知道我也可以使用三角函数来计算切线;但是我想使用一阶导数来做,这不可行吗?谢谢您的提示!

I have a quadratic bezier curve and I want to calculate the slope of the tangent in a given point. For example, let it be the middlepoint of the quadratic bezier curve, therefore t=0.5 (please see the link below for a picture of this). I've calculated the first derivative of the formula for the quadratic bezier curve; however I get 400 as value for the slope, though it should be 0. Maybe I'm using the first derivative in a wrong way? I know I could also calculate the tangents using trigonometric functions; however I'd like to do it using the first derivative, shouldn't this be possible? Thanks for any hint!

为澄清起见,请注意:我对获取二次贝塞尔曲线上任意给定点的斜率的通用方法感兴趣,不仅是要获得起点和终点的切线.

For clarification / please note: I'm interested in a general way to get the slope in a arbitrary given point on a quadratic bezier curve, not only to get the tangent in the start- and end point.

我的问题的图片,包括上面的文字: http://cid-0432ee4cfe9c26a0. skydrive.live.com/self.aspx/%c3%96ffentlich/Quadratic%20Bezier%20Curve.pdf

A picture of my problem including the text above:http://cid-0432ee4cfe9c26a0.skydrive.live.com/self.aspx/%c3%96ffentlich/Quadratic%20Bezier%20Curve.pdf

非常感谢您提供任何提示!

Thank you very much for any hint!

推荐答案

使用B'(t)的公式,在t=1/2处求值,我们得到

Using your formula for B'(t), evaluated at t=1/2, we get

B'(1/2) = -P0 + P2

从图形的外观来看,P0 =(0,0)和P2 =(400,0).所以

From the look of your graph, P0 = (0,0) and P2 = (400,0). So

B'(1/2) = (400,0).

这是在t = 1/2处沿B(t)传播的点的速度".

This is the "velocity" of a point traveling along B(t) at t=1/2.

(400,0)是水平向量,大小为400.

(400,0) is a horizontal vector, with magnitude 400.

一切都应该如此.由于B'(t)是水平的,所以它的斜率"确实为0.

So all is as it should be. Since B'(t) is horizontal, it does have "slope" 0.

这篇关于二次贝塞尔曲线:计算切线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 21:57