请问ANTV X6的贝塞尔曲线是通过什么公式计算出来的一条唯一曲线
问题描述
正常数学的贝塞尔曲线,会通过起始点、结束点、控制点以及t的变化确认一条唯一的贝塞尔曲线,但是我看ANTV X6中的贝塞尔曲线并没有控制点,只有曲线上的点,所以我想了解一下ANTV X6的贝塞尔曲线是通过什么公式计算出来的一条唯一曲线
重现链接
无
重现步骤
无
预期行为
我期望取到贝塞尔曲线的真实控制点坐标 但是现在只能取到曲线上节点的坐标
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox ...]
- X6 版本: [2.11.1 ...]
屏幕截图或视频(可选)
补充说明(可选)
No response
👋 @lijiapeng0302
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
你看的应该是edge的曲线点,这是简化版本,要想用真实三次贝塞尔线,用Path类中的 C 创建C类型的线段
贝塞尔曲线就是贝塞尔曲线,你想问的应该是 arc 或者 rounded 的计算公式吧,看下源码。
https://github.com/antvis/X6/blob/master/src/geometry/path/util.ts