GMU:Tutorials/Performance Platform/Measuring Motion with Processing: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
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">
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.


Line 92: Line 92:
     speed = ceil(speed);
     speed = ceil(speed);
     background(speed);  
     background(speed);  
<source>
</source>