当前位置:网站首页>Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
2022-07-03 01:16:00 【Knowledge fatness】
Use of this month SceneKit structure 3D It is very meaningful to do the same for pie charts . besides , This is also a careful study SceneKit A good opportunity for other aspects of the framework .
code
I started like this … Of course , Search for a good SCNShape Implementation example . The first goal is to build slices using the basic code described here .
Please note that , Even though Apple Call this a Bessel path —— It seems to be just a path .
let coreNode = SCNNode()
coreNode.simdPosition = SIMD3(x:0,y:0,z:0)
scene?.rootNode.addChildNode(coreNode)
coreNode.simdPivot.columns.3.z = 1
bezierPath3.move(to: CGPoint(x: 0, y: 0))
let radians = Double(startAngle) * Double.pi / 180.0
let x = Double(center.x) + Double(radius.width) * Double(cos(radians))
let y = Double(center.y) + Double(radius.height) * sin(radians)
bezierPath3.addLine(to: CGPoint(x: x, y: y))
let radians3 = Double(endAngle/2) * Double.pi / 180.0
let x3 = Double(center.x) + Double(radius.width) * Double(cos(radians3))
let y3 = Double(center.y) + Double(radius.height)
边栏推荐
- Matlab finds the position of a row or column in the matrix
- Now that the teenager has returned, the world's fireworks are the most soothing and ordinary people return to work~
- R language uses coin package to apply permutation tests to independence problems (permutation tests, whether response variables are independent of groups, are two numerical variables independent, and
- ROS2之ESP32简单速度消息测试(极限频率)
- 数学建模之线性规划(含MATLAB代码)
- excel表格计算时间日期的差值,并转化为分钟数
- 1038 Recover the Smallest Number
- JDBC courses
- 1696C. Fishingprince plays with array [thinking questions + intermediate state + optimized storage]
- excel去除小数点后面的数据,将数字取整
猜你喜欢
Matlab saves the digital matrix as geospatial data, and the display subscript index must be of positive integer type or logical type. Solve the problem
MySQL
【无标题】
Daily topic: movement of haystack
12_微信小程序之微信视频号滚动自动播放视频效果实现
12_ Implementation of rolling automatic video playback effect of wechat video number of wechat applet
First hand evaluation of Reza electronics rz/g2l development board
Strongly connected components of digraph
【FH-GFSK】FH-GFSK信号分析与盲解调研究
Telephone network problems
随机推荐
Kivy教程大全之如何在 Kivy 中创建下拉列表
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
R language ggplot2 visual faceting, visual facet_wrap bar plot, using strip Text function customize the size of the strip of each facet title in the facet graph (cutimi
Database SQL language 01 where condition
Merge K sorted linked lists
按键精灵打怪学习-多线程后台坐标识别
matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
How to convert Quanzhi a40i/t3 to can through SPI
What is needed to develop a domestic arm intelligent edge computing gateway
FPGA - 7系列 FPGA内部结构之Clocking -04- 多区域时钟
excel去除小数点后面的数据,将数字取整
详解RDD基本概念、RDD五大属性
[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)
有向图的强连通分量
MongoDB系列之MongoDB常用命令
Rk3568 development board evaluation (II): development environment construction
数据分析思维分析犯法和业务知识——分析方法(一)
Niu Ke swipes questions and clocks in
1696C. Fishingprince plays with array [thinking questions + intermediate state + optimized storage]
Basis of information entropy