|
PointsOnACircle
The purpose of this program (PointsOnACircle) is to find any Point on a Circle.   It can be used to position the Hours and/or Minutes on a Clock program or to make a Compass, or anything else that is round and needs Points at specific locations or angles.
The following formulas were used in PointsOnACircle:
Radians = Pi / 180
X = Radius * Sin(Angle * Radians)
Y = Radius * Cos(Angle * Radians)
All values on the Control Panel (shown on the right) are User changeable.
The default values of X and Y set the Circle in the center of the form.
The Angle is the number of degrees on the Circle between Dots.
Example: If you enter "90" in the Angle box, it would locate the Dots at the
"12 O'clock", "3 O'clock", "6 O'clock" and "9 O'clock" positions.
The Dot Size is the Diameter of the Dots and the thickness of the Star lines (in Pixels) and has a maximum of "10".
The Number of Points box determines how many Points or Slices will be drawn.
The default Radius is just under the maximum, rounded down to the nearest "10".
Speed only affects the Speed of drawing Stars.   It must be in the range of 0-999.
An example of the Draw Points routine is shown above.
Examples of the Draw Slices and Draw a Star routines are shown below.
All Points and Slices will be evenly spaced on the Circle.
Certain Number of Points (such as 6 and 10) will create 2 Stars rather than just one.
First Color will be the color of all single Stars and the first Star, when 2 Stars are drawn.
Second Color will be the color of the second Star, when 2 Stars are drawn.
If Random Colored is Checked, all Star colors will be randomly selected.
Draw a Series of Stars uses the following controls:
Points (Start) is the Number of Points in the first Star of a series.
Points (End) is the Number of Points in the last Star of a series.
Step/Incr is how many Points to add to the first Star before drawing the second Star.
Example 1: If Points (Start) = 5, Points (End) = 10, Step/Incr = 1,
it will draw 5, 6, 7, 8, 9 and 10 Pointed Stars.
Example 2: If Points (Start) = 3, Points (End) = 10, Step/Incr = 2,
it will draw 3, 5, 7 and 9 Pointed Stars.
Number of Stars will replace Points (End) and simply draw that many Stars.
In other words, it will calculate the Points (End) for you.
Note:   There is now a new option available.   If you have the Speed Max'd at "999", and press the Draw a Series of Stars Button, a MsgBox will popup and ask if you would like to draw only the Dual-Colored Stars.
|
Slices and
Stars  
Draw Slices, shown on the left, draws a Circle that is divided into equal sized PieSlices.   The number of PieSlices is determined by the Number of Points box in the Control Panel.
Draw a Star, shown on the right, can be drawn on either the Points or Slices displays.
 
DownLoad   your free copy of   PointsOnACircle.Exe
DownLoad   the PointsOnACircle Visual Basic source files.
 
|