瑜伽的健康和知识
Wolfram Knowledgebase 包含瑜伽姿势的封装数据的精选数据集. 因此对于瑜伽姿势、难易度、所用肌肉、持续时间以及其他众多特性之间的关系,可以用简单、有力、详细和完全程序化的方式进行学习和研究
从蝎子式(scorpion pose)开始,根据 "PreparatoryPoses" 关系构建并可视化瑜伽姿势的关系.
In[1]:=
poseGraph =
NestGraph[Cases[EntityValue[#, "PreparatoryPoses"], _Entity] &,
Entity["YogaPose", "ScorpionPose"], 4, VertexLabels -> "Name",
VertexLabelStyle -> LightGray]
Out[1]=
显示不同姿势的简易图像.
In[2]:=
With[{v = Take[VertexList[poseGraph], 5]},
schm = Rule @@@ Transpose[{v, EntityValue[v, "Schematic"]}]
] // Column
Out[2]=
对根据相互共享链接的“社区”分组的姿势进行绘图.
In[3]:=
CommunityGraphPlot[EdgeList[poseGraph] /. e_DirectedEdge :> Reverse@e,
VertexLabels -> Placed["Name", Tooltip]]
Out[3]=
计算在 Ashtanga 基本瑜伽系列中的系列动作中收缩的肌肉数并相对所用肌肉数绘图.
显示完整的 Wolfram 语言输入
Out[5]=
找出拜日式 A 中的系列姿势的肌肉收缩并可视化拉伸频率最高的肌肉.
In[6]:=
muscles = (SortBy[
Tally[DeleteMissing[
Flatten[EntityValue[
Cases[Entity["YogaSequence", "SunSalutationA"][
"PrimaryPoseSequence"], _Entity, Infinity],
"StretchedMuscles"]]]], Last] // Reverse) // Take[#, 20] &
Out[6]=
可视化拉伸频率最高的肌肉.
In[7]:=
EntityValue[muscles[[1, 1]], "RegionalLocationImage"]
Out[7]=
使用隐式定义的实体类找出并可视化初学者中等强度的瑜伽姿势,这些姿势可拉伸腿部并强化核心肌肉.
In[8]:=
EntityList[
Entity["YogaPose", {"ExperienceLevel" -> "Beginner",
"IntensityLevel" -> "Medium",
"SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"],
"SitesOfImprovedStrength" ->
Entity["AnatomicalStructure", "Abdomen"]}]]
Out[8]=
将这些姿势的简化图作为实体关联进行查看.
In[9]:=
EntityList[
Entity["YogaPose", {"ExperienceLevel" -> "Beginner",
"IntensityLevel" -> "Medium",
"SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"],
"SitesOfImprovedStrength" ->
Entity["AnatomicalStructure", "Abdomen"]}]];
EntityValue[Take[%, 5], "Schematic", "EntityAssociation"]
Out[9]=
显示拉伸髂腰肌和腿筋的高难度瑜伽姿势.
In[10]:=
EntityValue[
Entity["YogaPose", {"ExperienceLevel" -> "Advanced",
"PrimaryContractedMuscles" ->
Entity["AnatomicalStructure", "Iliopsoas"],
"StretchedMuscles" ->
Entity["AnatomicalStructure",
"SetOfHamstringMuscles"]}], "Schematic", "EntityAssociation"]
Out[10]=
找出长度在 30 到 60分钟间的瑜伽课程.
In[11]:=
EntityList@
Entity["YogaSequence", {"EstimatedDuration" ->
Quantity[ Interval[{30, 60}], "Minutes"]}]
Out[11]=