BezierMaker

通过de Casteljau算法绘制贝塞尔曲线,并计算它的切线,实现1-7阶贝塞尔曲线的形成动画。

  • 所有者: venshine/BezierMaker
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

BezierMaker

Android Arsenal API

通过de Casteljau算法绘制贝塞尔曲线,并计算它的切线,实现1-7阶贝塞尔曲线的形成动画。
德卡斯特里奥算法可以计算出Bezier曲线上的一个点,进而绘制出Bezier曲线。想深入了解德卡斯特里奥算法的同学可以参考我翻译的一篇文章《德卡斯特里奥算法——找到Bezier曲线上的一个点》

bezier.apk

Features

  • 支持增加和删除控制点
  • 支持1阶到7阶贝塞尔曲线,限于屏幕大小,理论上可以支持N阶贝塞尔曲线
  • 支持自由移动控制点
  • 支持显示贝塞尔曲线形成过程的切线
  • 支持循环显示贝塞尔曲线的形成动画
  • 支持贝塞尔曲线显示速率
  • 支持显示控制点坐标
  • 支持设置贝塞尔曲线阶数

ScreenShot






Demo

Java:
    public class MainActivity extends Activity {

        BezierView mBezierView

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main)

            mBezierView = (BezierView) findViewById(R.id.bezier);
        }

        public void start(View view) {
            mBezierView.start();
        }

        public void stop(View view) {
            mBezierView.stop();
        }

        public void add(View view) {
            mBezierView.addPoint();
        }

        public void del(View view) {
            mBezierView.delPoint();
        }

    }
Methods:, method 方法, description 描述, :---, :---, void start(), 开始贝塞尔曲线(required), void stop(), 停止贝塞尔曲线(optional), boolean addPoint(), 增加控制点(optional), boolean delPoint(), 删除控制点(optional), int getOrder(), 获取贝塞尔曲线阶数(optional), void setRate(int rate), 设置移动速率(optional), void setTangent(boolean tangent), 设置是否显示切线(optional), void setLoop(boolean loop), 设置是否循环(optional), void setOrder(int order), 设置贝塞尔曲线阶数(optional), About

--

License

Copyright (C) 2016 venshine.cn@gmail.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

主要指標

概覽
名稱與所有者venshine/BezierMaker
主編程語言Java
編程語言Java (語言數: 1)
平台
許可證Apache License 2.0
所有者活动
創建於2016-05-30 10:07:54
推送於2020-05-14 14:45:48
最后一次提交2020-05-14 22:45:20
發布數0
用户参与
星數1.4k
關注者數40
派生數249
提交數41
已啟用問題?
問題數3
打開的問題數0
拉請求數1
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?