X = originX + radiusX * Cos(freqX * T)
Y = originY + radiusY * Sin(freqY * T)
The Sin() and Cos() functions can be easily manipulated to create a ellipse/circle of your choice. The formula for an ellipse is listed above. For now, we are only going to concern ourselves with the origin and radius. We will discuss the frequency later. For the ellipse in the picture, you can see the two radii (radiuses ha ha ha) as RX and RY in blue, and these define how the ellipse is shaped. If the two radii have the same value, then you have a circle. Also, in the picture are two distances DX and DY in red, which specify the coordinates of the center of the ellipse. Changing these will move the ellipse around. So, use the formula: X = DX + RX * Cos(T) ; Y = DY + RY * Sin(T) and you'll get some sort of circle.
A circle with a radius of 50 at 100,100.
X = 100 + 50 * Cos(T) 
Y = 100 + 50 * Sin(T)
Circle has both radii set to 50.
An ellipse where the radius is 200 in the X and 40 in the Y.  It will go around the point 450, 270.
X = 450 + 200 * Cos(T)
Y = 270 + 40 * Sin(T)
I want my shape to go from (100, 150) to (400, 380).
Find the middle point by averaging the two X points ((400 + 100)/2 = 250) and the two Y points ((380 + 150)/2 = 265).
The center is at 250, 265.
The radius in the X directions would be 400 - 250 = 150, while the radius in the Y directions would be 380 - 265 = 115.
(Just subtract the point location from the origin location to get the radius).
X = 250 + 150 * Cos(T)
Y = 265 + 115 * Sin(T)
Before we talk about frequency, note that our circle moves clockwise. If we give a negative value to one of the radii, for example: X = 100 - 50 * Cos(T) Y = 100 + 50 * Sin(T) or X = 100 + 50 * Cos(T) Y = 100 - 50 * Sin(T) Our circle will move counterclockwise. The first example will cause the circle to start on the left and begin to move down CCW (counterclockwise) around the circle, while the second example has the circle start on the right side, but go up. Since Cos(T) will start at 1, making the cosine term negative causes this term to be at the lowest value at the start of the circle, instead of at the highest value. Making Sin(T) causes this term to go to the lowest value instead of up to the highest value. You can also make the circle move counterclockwise by swapping the Cosine and the Sine. X = 100 + 50 * Sin(T) Y = 100 + 50 * Cos(T) Now the circle starts at the bottom and then goes to the right. Making one radii negative makes the circle move CW (clockwise), and making both negative causes the circle to go CCW. So, if X is Cos, Y would have to have the same sign as X for it to be CW, otherwise it will be CCW. If X is Sin, Y would have to have a different sign than X for it to be CW, but if they are the same, the circle is going CCW. Now, let's talk frequency. The Sin() and Cos() functions are usually in Radians, so remember that the period of the Sin() and Cos() functions in Radians is 2 * Pi. (In Degrees, it would be 360, but each Pi represents 180 degrees.) This means that for any value along the Sin(T) or Cos(T), the same value exists if you add 2 * Pi to T. Sin(T + 2 * Pi) = Sin(T) and Cos(T + 2 * Pi) = Cos(T) Cosine Wave and Sine Wave. The parts after 2 * Pi continue on forever. We can tamper with the period by multiplying T by a number. For instance: Cos(2 * T) will cause cosine to reach 2 * Pi in half the time. Cos(3 * T) will make cosine reach 2 * Pi in a third of the time. So, multiplying the T by a mystery number causes the period to be divided by this mystery number. Cos(2 * T) would now have a period of Pi. Cos(Pi * T) would have a period of 2. And, of course, Cos(2 * Pi * T) would have a period a 1. This multiplying number is what I call the angular frequency, and I usually just write Freq in programs. This is not the actual frequency of our function. The original frequency of Cos(T) is 1 / (2*Pi). The angular frequency is represented by multiplying the current frequency by the original period 2 * Pi (or multiplying the current period by the original frequency) But, in short, angular frequency is the number that multiplies by T (as I have just mentioned). In Cos(T), the angular frequency is 1, and in Cos(3T), the angular frequency is 3. Keeping the angular frequency at 1 might look simple, but if you put this into a program, the circle will skip too many points for someone to notice it. You'll need to decrease the angular frequency before the circle is traced decently. 0.1 is usually a good value for the circle to be noticed, but smaller values will trace the circle out with more care (and with more time). Private Sub Timer1_Timer() Dim X As Long, Y As Long X = 100 + 50 * Cos(0.1 * T) 'Calculate circle point coordinates. Y = 100 + 50 * Sin(0.1 * T) 'Set this pixel to white on my display. SetPixel Me.hdc, fX, fY, vbWhite T = T + 1 End Sub Now, if you happen to set the two angular frequencies to different values, you'll get an assortment of different curvy shapes. Doubling the X frequency: X = 100 + 50 * Cos(0.2 * T) Y = 100 + 50 * Sin(0.1 * T) will give you a catenary curve (a parabola that doesn't extend to infinity). Doubling the Y frequency: X = 100 + 50 * Cos(0.1 * T) Y = 100 + 50 * Sin(0.2 * T) will give you a figure-eight. Of course, changing the radii will cause the figure eight to take up a specific radius as well. Experiment with these frequencies to get some more interesting shapes. You may have to decrease the frequencies to see something clearer. X = 100 + 50 * Cos(0.2 * T) Y = 100 + 50 * Sin(0.15 * T)