The general form of a line equation is given as . Given two points and , we can compute coefficients , , and as follows. First, compute the slope as rise over run . Second, plug this value and one of the points into the point-slope form, given by , and gather all terms on the lefthand side:
Category Archives: Math
OpenGL Cone Function
How do you manually draw a 3D cone in OpenGL immediate mode? The OpenGL utility library (GLU) provides a cone function, but there may be various reasons for preferring to not use it, including reduced dependencies and finer control over the cone.
This article explains one way to manually draw a cone. There are two sections, first a verbal and mathematical explication of the main function, and second a listing of relevant code snippets. Snippets are embedded Gists from Github, which means that you are welcome to make them more concise or pretty if you like. If you want to skip directly to the code, click here.
PCA With ALGLIB
PoseDesigner uses ALGLIB‘s principal component analysis routine to extract a basis matrix from Kinect skeletal data. The ALGLIB conventions can be a little confusing – the example below provides some clarification.