Node:Epicycloids, Previous:Roulettes and Involutes, Up:Roulettes and Involutes



Epicycloids

unsigned int epicycloid_pattern_1 (real diameter_inner, real diameter_outer_start, real diameter_outer_end, real step, int arc_divisions, unsigned int offsets, [vector colors = Colors::default_color_vector]) Function
Draws a pattern consisting of epicycloids. The outer circle rolls around the circumference of the inner circle and a Point on the outer circle traces an epicycloid.

If offsets is greater than 1, the outer circle is rotated offset times around the center of the inner circle by 360 / offsets (starting from the outer circle's original position). From each of these new positions, an epicycloid is drawn.

While diameter_outer_start is greater than or equal to diameter_outer_end, the diameter of the outer circle is reduced by step, and another set of epicycloids is traced, as described above. Each time the diameter of the outer circle is reduced, a new Color is taken from colors for the drawing commands. If there are more iterations than Colors, the last Color on colors is used for the remaining iterations.

The arguments:

real diameter_inner
The diameter of the inner circle.
real diameter_outer_start
The diameter of the outer circle for the first iteration. It must be greater than or equal to diameter_outer_end.
real diameter_outer_end
The diameter of the outer circle for the last iteration. It must be less than or equal to diameter_outer_start.
real step
The amount by which the diameter of the outer circle is reduced upon each iteration.
int arc_divisions
The number of divisions of the circle used for calculating Points on the epicycloid. For instance, if arc_divisions is 90, then the Path for each epicycloid will only have 4 Points, since 360 / 90 = 4.
unsigned int offsets
The number of epicycloids drawn upon each iteration. Each one is rotated by 360 / offsets around the center of the inner circle. offsets must be greater than or equal to 1.
vector<const Color*> colors
Default: Colors::default_color_vector. The Colors pointed to by the pointers on this vector are used for drawing the epicycloids. One Color is used for each iteration.

Example:

          epicycloid_pattern_1(5, 3, 3, 1, 72);
          current_picture.output(Projections::PARALLEL_X_Z);
          


[Figure 180. Not displayed.]

Fig. 180.

Example:

          default_focus.set(2, 5, -10, 2, 5, 10, 10);
          epicycloid_pattern_1(5, 3, 3, 1, 36);
          current_picture.output();
          


[Figure 181. Not displayed.]

Fig. 181.