在给定曲线的最大高度的情况下,获取二次曲线的 Y 值
get Y value of quadratic curve given the max height of the curve
当 Y 为 100 时,曲线的最大高度将为 (+/-) 60。当我有曲线的最大高度时,我需要一种方法来计算 Y。
法典:
点 1 和点 2 具有 x、y 和 z 坐标
this.drawLine = function(point1, point2) {
context = this.getContext();
context.beginPath();
context.moveTo(this.getX(point1), this.getY(point1));
point3 = {
x: ( point1.x + point2.x ) / 2,
y: ( point1.y + point2.y ) / 2,
z: ( point1.z + point2.z ) / 2
}
context.quadraticCurveTo( this.getX(point3), this.getY(point3) + point3.z * 0, this.getX(point2), this.getY(point2));
context.stroke();
}
我需要曲线的线命中 point3 的坐标,而不是它没有到达坐标。
仍然有许多可能的曲线具有相同的最大值。因此,不能隔离单个曲线来计算 Y 值。
我建议找到一种方法来获取有关曲线的更多信息,例如点,属性或关系。
查看以下链接:http://www.personal.kent.edu/~bosikiew/Algebra-handouts/quad-extval.pdfhttp://hotmath.com/hotmath_help/topics/graphing-quadratic-equations-using-transformations.html
找到我的答案:这里
this.drawLine = function(point1, point2, style) {
context = this.getContext();
context.beginPath();
context.moveTo(this.getX(point1), this.getY(point1));
point3 = {
x: ( point1.x + point2.x ) / 2,
y: ( point1.y + point2.y ) / 2,
z: ( point1.z + point2.z ) / 2
}
context.strokeStyle = style;
x = this.getX(point3) * 2 - ( this.getX(point1) + this.getX(point2) ) / 2;
y = this.getY(point3) * 2 - ( this.getY(point1) + this.getY(point2) ) / 2;
context.quadraticCurveTo( x, y, this.getX(point2), this.getY(point2));
context.stroke();
}
相关文章:
- 在给定曲线的最大高度的情况下,获取二次曲线的 Y 值
- 正确计算双三次曲线上的点;zier曲面
- 在HTML5画布上慢慢绘制二次曲线
- 二次曲线:替换鼠标单击的键盘笔划
- 如何在画布上绘制文本,该文本遵循使用二次曲线方法绘制的二次曲线
- 隐藏菜单上的内容链接二次点击
- 球面上两点之间的三次贝塞尔曲线
- 如何保存一个<模板>供二次使用
- 面料JS:我需要删除一个二次曲线的箭头工具后,一旦创建在画布上
- 添加三次贝塞尔曲线到小叶路径
- 二次曲线:我能确定顶点是什么吗?
- 二次曲线长度
- Js根据相同列的id按不同列进行二次排序
- 什么是错误的我的代码在JavaScript的二次公式
- 求出三次贝塞尔曲线上给定点的系数/函数
- 二次JavaScript错误
- 二次损坏:Express.js没有看到错误页面.主要损伤:?新人'Mongoose的错误
- 如何将 SVG'c' 曲线转换为三次贝塞尔曲线列表
- 如何用抛物线找到二次曲线的控制点
- 用二次贝塞尔曲线和三次贝塞尔曲线绘制椭圆