{"id":13645541,"url":"https://github.com/wingjay/WJMagicCurveView","last_synced_at":"2025-04-21T14:31:26.877Z","repository":{"id":50369448,"uuid":"56826772","full_name":"wingjay/WJMagicCurveView","owner":"wingjay","description":"Fancy magic curve.","archived":false,"fork":false,"pushed_at":"2017-06-13T03:48:56.000Z","size":1150,"stargazers_count":323,"open_issues_count":1,"forks_count":62,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-10T01:09:18.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wingjay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-22T04:43:58.000Z","updated_at":"2024-05-20T15:00:22.000Z","dependencies_parsed_at":"2022-09-22T12:53:20.130Z","dependency_job_id":null,"html_url":"https://github.com/wingjay/WJMagicCurveView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingjay%2FWJMagicCurveView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingjay%2FWJMagicCurveView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingjay%2FWJMagicCurveView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingjay%2FWJMagicCurveView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingjay","download_url":"https://codeload.github.com/wingjay/WJMagicCurveView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070173,"owners_count":21369839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:02:36.880Z","updated_at":"2025-04-21T14:31:26.287Z","avatar_url":"https://github.com/wingjay.png","language":"Java","readme":"# WJMagicCurveView\nBy setting several parameters simply, You'll get a fancy Magic Curve immediately.\n\n[中文介绍，来自Android-CJJ同学](https://github.com/wingjay/WJMagicCurveView/blob/master/README_CN.md)\n\n# Let's see what it is\n\u003cimg src=\"https://wingjay.com/img/%E6%9C%89%E8%B6%A3%E7%9A%84%E6%9B%B2%E7%BA%BF%E5%9C%A8Android%E4%B8%8A%E7%9A%84%E5%AE%9E%E7%8E%B0/ring.gif\" width=\"300\"\u003e\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eOrder\u003c/th\u003e\n      \u003cth\u003eDemo\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://camo.githubusercontent.com/f66e0343a7adc7309b86ed3ccfd5e2c72f144fa7/687474703a2f2f7777312e73696e61696d672e636e2f6d773639302f3765663031666361677731663335686c323230777967323061743061356835652e676966\" width=\"300\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://camo.githubusercontent.com/d9eae67c303601789f8ce14e694047618d0ab9e7/687474703a2f2f7777312e73696e61696d672e636e2f6d773639302f3765663031666361677731663335686c333065763067323061743061356e39362e676966\" width=\"300\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://camo.githubusercontent.com/8029c08f06a2402d78862c9d1d3245ed478a2df5/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f3765663031666361677731663335686c336f6c383367323061743061353131312e676966\" width=\"300\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e4\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://camo.githubusercontent.com/46338cd26305a61f13aa7ddd1f55d3f51705abb0/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f3765663031666361677731663335686c356f36686667323061743061356168622e676966\" width=\"300\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e5\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://camo.githubusercontent.com/80b98f800388ded00106762b3d58390087765f87/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f3765663031666361677731663335686b706c69346b6732306174306135716b632e676966\" width=\"300\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n# How it works\nBy setting `eight parameters` (Of course you don't have to set every because they all have default value), `WJMagicCurveView` will draw a beautiful curve based on a math function.\n\nFirst, we'll create two points and make them `rotate` in specified `speed` and specified `radius` revolving a same center;\nSecond, whenever they reach a point during rotating, we'll draw a `line connecting these two points`;\nThirds, continue rotate and draw lines, Bingo! You're creating a new beautiful curve!\n\n# How to create your own curve\nWe provide eight base parameters for normal users and more for developers from code level. Here are explaintion for these parameters:\n\n1. `radiusAX`、`radiusAY`:  A point is the outer rotating point, these two are the radius of A;\n2. `radiusBX`、`radiusBY`:  B point is the inner rotating point;\n3. `speedOuterPoint`、`speedInnerPoint`: the rotating speed for A \u0026 B;\n4. `loopTotalCount`: the loop count for these two rotating points;\n5. `durationSeconds`: the durationg speed for rotating.\n\n# Playable apk\n[Download it from here](https://github.com/wingjay/WJMagicCurveView/raw/master/demo.apk) and make a try!\n\n# How to use it\n```java\nWJMagicCurveView wjMagicCurveView = (WJMagicCurveView) findViewById(R.id.wj_magic_curve_view);\n// set parameters. of course it's not necessary to set all these parameters because they all have default value\nwjMagicCurveView.setRadius(radiusAX, radiusAY, radiusBX, radiusBY)\n                .setDurationSec(durationSeconds)\n                .setLoopTotalCount(loopTotalCount)\n                .setSpeed(speedOuterPoint, speedInnerPoint)\n                .startDraw();\n```\n```java\n// stop Draw\nwjMagicCurveView.stopDraw();\n```\n```java\n// destory and recycle bitmap\nwjMagicCurveView.destory();\n```\n```java\n// Customize your own curve here\nI create a enum called WJMagicCurveViewParameters, \nYou can create your own WJMagicCurveViewParameters with eight parameters,\nfor empty fields, use -1 as default value.\n```\n\n# Related resource\n[有趣的曲线在Android上的实现](http://wingjay.com/2016/01/25/%E6%9C%89%E8%B6%A3%E7%9A%84%E6%9B%B2%E7%BA%BF%E5%9C%A8Android%E4%B8%8A%E7%9A%84%E5%AE%9E%E7%8E%B0/)\n\n[Processing: 简单法则的魅力](http://mp.weixin.qq.com/s?__biz=MzA4NTc5MDU5OQ==\u0026mid=411441608\u0026idx=1\u0026sn=5e846a882f58a7ba1b5312bdbeaafccf\u0026scene=23\u0026srcid=0120GiYhMXjmNDoN9MFQj7f5#rd)\n\n###Reach me - wingjay\n![](http://tp3.sinaimg.cn/1625892654/180/5739331233/1)\n\nYou can get information about me and reach me in my github page: https://github.com/wingjay\n\nBlog: http://wingjay.com\n\nWeibo: http://weibo.com/u/1625892654\n\nFeel free to give me advices by \u003cmailto:yinjiesh@126.com\u003e\n\nThanks!\n","funding_links":[],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingjay%2FWJMagicCurveView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingjay%2FWJMagicCurveView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingjay%2FWJMagicCurveView/lists"}