What is the difference between cubic bezier and quadratic bezier and their use cases?

As you’ve discovered, both Quadratic curves and Cubic Bezier curves just connect 2 points with a curve. Since the Cubic curve has more control points, it is more flexible in the path it takes between those 2 points. For example, let’s say you want to draw this letter “R”: Start drawing with the “non-curvey” parts … Read more

Extracting Yaw from a Quaternion

The quaternion representation of rotation is a variation on axis and angle. So if you rotate by r radians around axis x, y, z, then your quaternion q is: q[0] = cos(r/2); q[1] = sin(r/2)*x; q[2] = sin(r/2)*y; q[3] = sin(r/2)*z; If you want to create a quaternion that only rotates around the y axis, … Read more

Calculate angle between two Latitude/Longitude points

using this referance to calculate Angle: private double angleFromCoordinate(double lat1, double long1, double lat2, double long2) { double dLon = (long2 – long1); double y = Math.sin(dLon) * Math.cos(lat2); double x = Math.cos(lat1) * Math.sin(lat2) – Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLon); double brng = Math.atan2(y, x); brng = Math.toDegrees(brng); brng = (brng + 360) % … Read more