没有合适的资源?快使用搜索试试~ 我知道了~
SpinningCylinderView
共49个文件
xml:15个
png:11个
gif:6个
需积分: 9 0 下载量 180 浏览量
2021-02-13
18:21:02
上传
评论
收藏 1.68MB ZIP 举报
温馨提示
SpinningCylinderView 我遇到了戴夫·怀特(Dave Whyte)的一些艺术作品,尤其是这本,并受到启发编写一些代码! 在某个时候,我很想用代码来构建整个片段,但是我开始考虑在2D画布上渲染3D外观圆柱体的方法。 我想出的解决方案是根据sine和cosine函数随时间的周期性变化来操纵简单形状。 我使用Kotlin在Android中构建了此示例。 我创建了一个名为CylinderView的自定义视图,该视图将呈现一个旋转的圆柱体。 您可以将此视图的多个实例添加到布局中(如下图gif所示),甚至可以使用xml属性设置圆柱的颜色和旋转方向。 注意:目前,我已将其旋转,以便使沿“向上”方向旋转的圆柱将从PI / 2相位(四分之一圈)开始。 级数 在考虑如何绘制旋转的圆柱体时,我想到了两个沿相反方向上下摆动的圆。 我想到的第一件事就是利用余弦函数,因为它在1到-1之间振荡。
资源推荐
资源详情
资源评论
收起资源包目录
SpinningCylinderView-master.zip (49个子文件)
SpinningCylinderView-master
gradlew.bat 2KB
gradlew 5KB
docs
progression_1.gif 239KB
progression_3.gif 200KB
cylinder-spin.gif 521KB
progression_5.gif 174KB
sine-cosine-small.png 40KB
progression_4.gif 197KB
progression_2.gif 229KB
gradle.properties 1KB
app
proguard-rules.pro 751B
src
test
java
com
jeffcardillo
cylinderspin
ExampleUnitTest.kt 354B
androidTest
java
com
jeffcardillo
cylinderspin
ExampleInstrumentedTest.kt 686B
main
res
mipmap-xxxhdpi
ic_launcher.png 10KB
ic_launcher_round.png 16KB
drawable
ic_launcher_background.xml 5KB
mipmap-hdpi
ic_launcher.png 4KB
ic_launcher_round.png 5KB
drawable-v24
ic_launcher_foreground.xml 2KB
values
colors.xml 208B
strings.xml 75B
attrs.xml 289B
styles.xml 383B
mipmap-xxhdpi
ic_launcher.png 8KB
ic_launcher_round.png 12KB
mipmap-mdpi
ic_launcher.png 3KB
ic_launcher_round.png 3KB
mipmap-xhdpi
ic_launcher.png 5KB
ic_launcher_round.png 7KB
mipmap-anydpi-v26
ic_launcher_round.xml 272B
ic_launcher.xml 272B
layout
activity_main.xml 2KB
java
com
jeffcardillo
cylinderspin
MainActivity.kt 1KB
CylinderView.kt 4KB
AndroidManifest.xml 723B
.gitignore 7B
build.gradle 1KB
gradle
wrapper
gradle-wrapper.jar 53KB
gradle-wrapper.properties 232B
.idea
codeStyles
Project.xml 3KB
codeStyleConfig.xml 142B
runConfigurations.xml 564B
misc.xml 357B
jarRepositories.xml 1KB
.name 12B
.gitignore 1KB
README.md 3KB
settings.gradle 47B
build.gradle 662B
共 49 条
- 1
资源评论
越昆
- 粉丝: 21
- 资源: 4598
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功