47
edits
QianqianLI (talk | contribs) No edit summary |
QianqianLI (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
*Groups of persons mode: Measuring the pairwise distances between root nodes of three persons.<br> | *Groups of persons mode: Measuring the pairwise distances between root nodes of three persons.<br> | ||
== Process: == | == Process: == | ||
1. Collecting the correlative data for the speed: Through the connecting of OSC and Motion Tracking platform, the root position and the updated data of one person could be obtained. The shifting distance and the relevant time decides the speed of the root node. | '''1. Collecting the correlative data for the speed:''' Through the connecting of OSC and Motion Tracking platform, the root position and the updated data of one person could be obtained. The shifting distance and the relevant time decides the speed of the root node. | ||
<br> | <br> | ||
<source lang="java"> | <source lang="java"> | ||
Line 34: | Line 34: | ||
} | } | ||
</source> | </source> | ||
2. The shifting distance and the relevant time decides the speed of the root node. <br> | '''2. The shifting distance and the relevant time decides the speed of the root node.''' <br> | ||
<source lang="java"> | <source lang="java"> | ||
float speed (Sphere sphere1) | float speed (Sphere sphere1) | ||
Line 42: | Line 42: | ||
return vel2; | return vel2; | ||
} | } | ||
<source> | </source> | ||
3.Calculating the distance between two root points. | '''3.Calculating the distance between two root points.''' | ||
<source lang="java"> | <source lang="java"> | ||
float distance (Sphere sphere1,Sphere sphere2) | float distance (Sphere sphere1,Sphere sphere2) | ||
Line 54: | Line 54: | ||
return distance; | return distance; | ||
} | } | ||
<source> | </source> | ||
4.Calculating the area of the triangle make up by three root points. | '''4.Calculating the area of the triangle make up by three root points.''' | ||
<source lang="java"> | <source lang="java"> | ||
float triangleSize(Sphere sphere1,Sphere sphere2,Sphere sphere3) | float triangleSize(Sphere sphere1,Sphere sphere2,Sphere sphere3) | ||
Line 70: | Line 70: | ||
return triangleSize; | return triangleSize; | ||
} | } | ||
<source> | </source> | ||
Three root positions could form a triangle in the space. With the help of Heron’s formula, the area of the triangle could be calculated. | Three root positions could form a triangle in the space. With the help of Heron’s formula, the area of the triangle could be calculated. | ||
5.According to the speed, distance, area giving different background color. | '''5.According to the speed, distance, area giving different background color.''' | ||
<source lang="java"> | <source lang="java"> | ||
//the maximum area is 6*6/2=18m^2,mapping the value of the area to the color of the background | //the maximum area is 6*6/2=18m^2,mapping the value of the area to the color of the background | ||
Line 92: | Line 92: | ||
speed = ceil(speed); | speed = ceil(speed); | ||
background(speed); | background(speed); | ||
<source> | </source> | ||
== Enjoy and keep on == |
edits