Drawing Parameters Explained - hanzhi713/Flowers-Curve GitHub Wiki
Initially I mistakenly coded the drawer in a way that the rotational directions of the inner circle and the dots are inconsistent. My original mistake made the "petals" pointing inward. I fixed this bug on Feb. 21st, but I keep an option that can replicate my previous mistake.
Normal direction | Reverse direction |
---|---|
![]() |
![]() |
Dot distance affects how broad the pattern is.
Short distance | Long distance |
---|---|
![]() |
![]() |
Dot rotation affects the angular distance between curves
Blue dot rotation: 150° Green dot rotation: 115° |
Blue dot rotation: 150° Green dot rotation: 150° |
---|---|
![]() |
![]() |
The size of the inner circle radius relative to the outer circle radius can significantly affect the pattern. Their greatest common divisor determines the density of the curves drawn. The following graphs were drawn using the same outer circle radius (the default value -- 300).
Radius: 120, gcd: 60 | Radius: 105, gcd: 15 | Radius: 110, gcd: 10 |
---|---|---|
![]() |
![]() |
![]() |
Mathematically, if ro is the outer circle radius, ri is the inner circle radius, and R is the radians which the inner circle must rotate through to complete the curve, then R can be found using the following formula
where gcd means the greatest common divisor.
This implies that the greater the greatest common factor between the outer and inner circle radius, the shorter the path which the inner circle will rotate through will be.
Besides, you can enter either a positive or a negative number for the inner circle radius parameter. If it's positive, then the final pattern produced will be a hypotrochoid, otherwise an epitrochoid will be drawn. The following graphs were drawn using 140 as the outer circle radius.
Inner circle radius: 60 Drawing direction: normal |
Inner circle radius: -60 Drawing direction: normal |
---|---|
![]() |
![]() |
Inner circle radius: 60 Drawing direction: reversed |
Inner circle radius: -60 Drawing direction: reversed |
---|---|
![]() |
![]() |
When the gcd between the outer and inner circle radius is small, the drawing may become complicated and less clear (the left figure). In such cases, you may consider to reduce the "completeness" parameter.
Completeness: 1 | Completeness: 0.114 |
---|---|
![]() |
![]() |
Drawing step affects the quality of the drawing. The smaller the step, the better the quality of the drawing will be, but the cost is the drawing time. Normally, the default drawing step (0.005) is sufficient. If you find that lines become dotted, then you should consider to reduce this parameter.
Try to reduce step | Good |
---|---|