{"id":13645619,"url":"https://github.com/zhangyuChen1991/MagicLine","last_synced_at":"2025-04-21T14:31:45.819Z","repository":{"id":122880825,"uuid":"75811374","full_name":"zhangyuChen1991/MagicLine","owner":"zhangyuChen1991","description":"简单的规律绘制直线构造神奇的视觉效果","archived":false,"fork":false,"pushed_at":"2017-01-16T12:37:38.000Z","size":97,"stargazers_count":113,"open_issues_count":0,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T18:43:14.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zhangyuChen1991.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-07T07:34:01.000Z","updated_at":"2024-04-30T02:19:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"87d26ebf-ccf0-4f98-962e-69b936949805","html_url":"https://github.com/zhangyuChen1991/MagicLine","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/zhangyuChen1991%2FMagicLine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyuChen1991%2FMagicLine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyuChen1991%2FMagicLine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyuChen1991%2FMagicLine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhangyuChen1991","download_url":"https://codeload.github.com/zhangyuChen1991/MagicLine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070176,"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:38.530Z","updated_at":"2025-04-21T14:31:45.562Z","avatar_url":"https://github.com/zhangyuChen1991.png","language":"Java","funding_links":[],"categories":["其他"],"sub_categories":[],"readme":"##MagicLine\n\u003e该项目受[此文](http://mp.weixin.qq.com/s/FieNhelCar1cZjhBS28ymQ)启发。\n通过两个点根据一定规律的运动绘制直线，从而画出神奇的视觉效果。\n\n**重要说明**\n\u003e最初是看[winjay](https://github.com/wingjay)同学的博客知道的这个创意，且他和[android-cjj](https://github.com/android-cjj)在\n[winjay的项目](https://github.com/wingjay/WJMagicCurveView)中已经各自实现了一套，原理都是一样的。这个项目是之前我练手实践时写的，由于\n觉得创意实在很棒,所以现在也把它放到我的github上，希望更多的童鞋能够知道。\n如果你要看wingjay和android-cjj的实现，请点击上面内容中的链接即可。\n\n**效果**\n\n动图示例(如加载慢请稍等)：\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/draw1-1.gif)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/draw5-1.gif)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/draw9_1.gif)\n\n更多绘制效果：\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml1.png)\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml2.png)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml3.png)\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml4.png)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml5.png)\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml6.png)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml7.png)\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml8.png)\n\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml9.png)\n![](https://github.com/zhangyuChen1991/some_sources/blob/master/magicline/ml10.png)\n\n是不是很神奇?\n(PS：大家可以自行添加色彩渲染组合出更绚丽的效果，自行发挥哦！)\n\n**关于原理**\n\u003e这是一个极其简洁却又极富创意的规则。图形是由两个做圆周运动的点相连而成的，区别仅仅是圆的半径大小以及运行速度。\n当我们改变这几个参数，就会发生各种有趣的变化。如果我们把这两个点分别命名为点A和点B\n那这几个参数分别是：\n\u003e* A的运动角速度\n\u003e* B的运动角速度\n\u003e* A的X轴运动半径\n\u003e* B的X轴运动半径\n\u003e* A的Y轴运动半径\n\u003e* B的Y轴运动半径\n\u003e\n\u003e我们把这几个参数设置不同的值，根据运动规律，它们便会画出不同的图案，效果你想都想不到哦！\n\n**关于实现**\n\u003e基础原理都在以上那篇文章里(忍不住再为作者极具创造性和启发性的想法点个赞)\n在Android上实现了一个自定义view：MagicLineView，大家有兴趣可以把项目下载看，代码量很少。\n\n最后感谢大家的光临，谢谢你的支持哦！","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FzhangyuChen1991%2FMagicLine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FzhangyuChen1991%2FMagicLine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FzhangyuChen1991%2FMagicLine/lists"}