App-GUI-Harmonograph
view release on metacpan or search on metacpan
lib/App/GUI/Harmonograph.pm view on Meta::CPAN
need to crank up the frequency up to 300.
The second row enables you to set values with three decimals. If you for
instance choose a base frequency of 5 and dial in 15 in the second row,
the actual frequency will be 5.015 times the natural constant. Behind the
slider are two checkboxes. One to additionally invert (1/x) the frequency
value and one to flip the pendulum direction (f = -f).
The third row lets you dial in a damping value which makes the pendulum
each round slower (bigger value -> more damping). Behind it is a selector.
If its on minus the damping will be same each round but set on "*" the
damping will be proportional to the frequency. Still behind it is a
checkbox. When selected the frequency is allowed to become negative by
damping.
The fourth row is about daming acceleration or with other words, how much
the damping changes from dot to dot. Beside the c value you have
this time four types of acceleration. Minus and times work as before
and plus and divided by are just their opposite.
The fifth row has a slider that sets the starting position of the
pendulum along its expected track. If the slider is on max you move
the pendulum a quater rotation ahead. To add another quarter check the
box left beside it. The last box adds another half rotation. This allows
you to flip or mirror the image in meaningful ways.
The sixth row mirrors the first but with 2 distinctions. Its not about
integer values but percentage values of the original pendulum length.
This length will be calculated by the program for opimal display.
Thi slider helps you only to change the proportions of the amplitude
towards the other pendula. Natural constants are also here available as
a factor and behind the on the most right is a button to reset the
radius to 100 percent.
The seventh row is the amplitude size, which simple allows to make the
picture larger or smaller depending if the pendulum left the frame or
doesn't move enough. As with reqency, also the amplitude can be damped
over time and this damping can accelerated.
Row eight and nine are exact copies of row three and four, they just
affect the radius / amplitude.
=head2 Functions
=for HTML <p>
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Harmonograph/main/examples/POD/Tab_Functions.png" alt="" width="85%" height="85%">
</p>
This tab lets you meddle with the equations that compute the mechanics
of a pendulum. Because all ten rows are built the same I will explain only
one. For instance the X pendulum has only influence on the x coordinate
of a dot, it is computed: C<x = radius * cos (time)>. The first selector
allows you to swap out the cosine function. Instead you could get sine,
tangent, cotangent, secant, cosekcant and the hyperbolic twin of the
already mentioned functions.
The second selector has five options: "= + - * /". If you choose the
first (equal sign) your time variable will be just swapped out with another
variable. The other four option describe the operation that will be applied
upon you time value. So e.g. if you select plus the resulting formula
will be C<x = radius * cos (time + (...))>. The dots allude to whatever
you will choose with the next three selectors.
Selector three and four are just factors. They contain natural numbers
and natural constants you can multiply the variable with. And last not
least selector five holds the variables time frequency and radus/amplitude
of each pendulum. This allows you for instance add the (always) current
pendulum frequency of pendulum W to the time value of Pendulum X resulting
in unpredictable shapes. There is lot to explore.
Pendulum W affects the x and y coordinate, hence it has two rows for each
case. Even more special is "Pendulum" R - the rotation movement of the paper.
This is computed by an ordinary 2 x 2 rotation matrix (we are in 2D).
Each cell of this matrix has here its own row. Its R_11, R_12, R_21, R_22.
But if you not sure just hover with the mouse and get the hints.
The very last row is different and contains only one switch that will
determine if W or R pendulum is applied first. Default and what is also
more comprehensible is that R is apllied first. But the arstist in you
might can choose here differently.
=head2 Visual Settings
=for HTML <p>
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Harmonograph/main/examples/POD/Tab_Visuals.png" alt="" width="85%" height="85%">
</p>
Due to the section headins, this tab is self explanatory. First choos if
you want to paint dots or connect them. Please not that pen thickness of
one is very thin and you might not see any dots in that setting. The pen
style is more of an gimmick. Most useful are solid and dotted lines.
The dot density allows you to juggle two extremes. Low density makes for
fast drawn lines and dots but also pointy curves. So you might want to
raise the value for smooth curves. The fine tuning of dot density makes
only sense if you draw dots, becasue even a slight change can produce
very different dot pattern. The line length is in seconds in minutes so
you can understand their proportion to the frequencies, which are in
Hertz (rotation / second).
The last section on this tab is about the color change or color flow.
You have 4 types and according to the current type only the widgets which
have an impact are enabled. When flow type I<"no"> in on, you paint only
with color number 1 and the progress bar in the left lower corner will
have one color. It allows you always to track which color rainbow you
actually chose. But its only visible if you make a full picture. So push
the Draw button. When color flow type I<"one_time"> is active, you have to
also select how many colors you like. And if you e.g. choose 3, your
rainbow will go from color 1 to color 2 to color 3. And it will be
spreat of the whole painting time, depending how much you selected.
The dynamic option tells something about how the change from one color
to the next will look like. Positive values bend the rainbow toward the
start of a gradient and negative toward the end. So with a dynamic of 5
the rainbow will linger on the starting color for a long time and will
then change faster and faster. The color flow type "alternate" moves from
color one to two, three and so forth and then backwards back to one and
then again forward as long as your chosen painting time permits.
Regulate the color change speed with the C<Speed> slider. For extra
slow color changes hit the C<Invert> checkbox. Than high speed values
will make it extra slow. The last color flow type is I<"circular">. Here
you go again from color one to the selected last color and from there
( run in 1.106 second using v1.01-cache-2.11-cpan-bbe5e583499 )