Tag Archives: radius

2D and 3D vector normalization and angle calculation in C++

Normalizing a vector can derive the direction of the vector in 2D or 3D space. A normalized vector is also known as a unit vector. We’re going to normalize and calculate the angles of a 2D vector at position (5,5) and a 3D vector at position (5,5,5). This can come in very handy when, for [...]

Posted in C++ | Also tagged , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Drawing circles with JavaScript and HTML5 Canvas

The HTML5 specification includes the canvas element for drawing graphics with JavaScript. This example demonstrates the use of the canvas element and JavaScript for drawing circles.

Posted in JavaScript | Also tagged , , , , , , , , , , , | 3 Comments