1. ##  Originally Posted by james In your example, 3 and 5 are the amplitude. 0 and 90 are phase.

It's worth noting that since this all gets scaled to fit inside of short integer space, the actual size of a figure is more or less irrelevant except when compared to other figures in the same space. Offset is also typically factored out unless you normalize with the origin. So there are literally an infinite number of ways to make the same final results.

Not to mention that frequency is directly related to time, so different combinations of frequency and duration can also yield the same results.

LBO(t) == amplitude * function(t * frequency + phase) * e ^ (-damping / t) + offset

duty_cycle is a parameter that has no representation in the above expression. It actually changes the character of function. The value of duty_cycle must be between 0.0 and 1.0. A value of 0.5 is 50%. The sin function has 50% above and 50% below its zero value.

In case you're wondering, Yes. I have had to scrape my brains off the ceiling several times while developing this code.

I love that! New discoveries are what really drive me to keep working on this. And working with other people is the biggest reward.
my bad, for being in a hurry. I meant
x=sin(3x) + sin(5x), y=cos(3x) + cos(5x)
for x = 0 to 360  Reply With Quote

2. ## Code:
```#math phase_cycle        360.0
#math interval_cycle     1.0

#math  start             0.0
#math  duration          1.0
math  iterations        1000

# x = sin(t * 3) + sin(t * 5)
# y = cos(t * 3) + cos(t * 5)
# for t = 0 to two_pi

math  LBO1 frequency    3.0

math  LBO2 frequency    5.0

math  LBO3 frequency    3.0
math  LBO3 phase        90.0

math  LBO4 frequency    5.0
math  LBO4 phase        90.0

# https://en.wikipedia.org/wiki/Harmonograph
#    x = LBO1(t) + LBO2(t)
#    y = LBO3(t) + LBO4(t)
math  harmonograph

math  render```
Last edited by james; 04-21-2021 at 07:49.  Reply With Quote

3. ## There are some other features in the new development version that are worth mentioning.

If you go into the u menu for user interface visual attributes, you can now turn vector rendering on or off. This is the line between two consecutive vertices. With it off all you see are the vertices themselves.

Also, in the [Tab] menu option 4 display settings, option 1 is rendered line width in pixels. So now you can make your vector lines as thick as you want.

Set it to something like 4 to 7 and then load this:

Code:
```#################################################
#
#   This file was written by James Lehman.
#   creator of LaserBoy,
#
#   the free, multiplatform laser display
#   application that reads this format.
#
#   <james@akrobiz.com>
#   Extra Stimulus Inc., Akron, Ohio USA
#   http://laserboy.org/
#
#   ASCII format version: LaserBoy-txt-04-21-2021
#
#################################################

#math phase_cycle        360.0
#math rotation_cycle     1.0
#math interval_cycle     1.0

math hues_span_factor   1.0
math hues_shift         3

math frames             1000

math  start             0.0
math _start             0.0

math  duration          100.0
math _duration          100.0

math  iterations        96
math _iterations        303

math  LBO1  phase       90.0
math _LBO1  phase       90.0

#----------------------------------------------
# https://en.wikipedia.org/wiki/Lissajous_curve
#    x = LBO1(t)
#    y = LBO2(t)
math _oscillator_xy

math  factor         0.0  0.0  0.0
math  factor_        1.0  1.0  1.0
math  scale_acceleration  0.0

math  color_span_hues
math  reverse_vectors
math  render

###############################################
###############################################```
After it's loaded, get back to the main menu and hit the ` key (just to the left of the digit 1 on the top row) to play the animation.  Reply With Quote

4. ##   Reply With Quote

5. Senior Member
Join Date
Mar 2010
Posts
242

## Using the following code to generate the shape shown:

math normalize_frames_with_origin no
math normalize_frames_individually no
math include_unit_reference no

math to_frame 0.50

# one oscillator
math LBO1 phase 90.0
math LBO1 amplitude 1.0
math LBO2 amplitude 1.0
math lissajou

# another oscillator
math LBO1 reset
math LBO2 reset

math LBO1 phase 90.0
math LBO1 amplitude 0.5
math LBO1 frequency -3.0

math LBO2 amplitude 0.5
math LBO2 frequency -3.0
math lissajou

# sum oscillators

# output
math render

Now, instead of adding the two frame sets, how do I multiply both axes of one frame set with say, 20 percent of one axis in the other frame set?  Reply With Quote

6. ## Well there is a multiply operator that works about the same way add works. I'm not sure what your question is. There is a scale operator that works on a single frame_set. You have to set factor before you can scale. The parameter factor takes 3 values for x y z. And every vertex in a frame_set gets multiplied x to x y to y z to z. In a situation like this you really need to think about the order of your operations so you always know what is in the two registers. Remember multiplication is commutative so A * B == B * A.

If you find that it's just not possible to keep the frame_sets of interest in the registers, you can store the last one added to the registers in a list and give it a name. Then later you can recall that name back into the registers.
Last edited by james; 04-23-2021 at 14:48.  Reply With Quote

7. Senior Member
Join Date
Mar 2010
Posts
242

## I'll provide an illustration of what I consider the basics of generating cycloids, by way of using cyc. Perhaps because I have developed tools that deal with similar math but using a different approach, I'm having more difficulty than necessary by trying to do the same thing using LiquidMath.

Error: the value in step 4 should be 80,000 not 8000.  Reply With Quote

8. ## See how that looks like a sin wave wrapped around the origin? There is a generator called polar that does that. It looks like your example has a frequency of 8 and an offset of 2.  Reply With Quote

9. ## It's probably best not to think of a LaserBoy_oscillator like a software version of an electronic oscillator. Think of it as a function that by default is the sin function. You define a portion of the real number line from start to start + duration, set your attributes of the LBOs you need and plot it in iteration steps over the interval by calling a generator. It's just like plotting on graph paper with a pencil and a calculator.
Last edited by james; 04-23-2021 at 18:00.  Reply With Quote

10. ## Code:
```math  to_frame          0.5

math  LBO1  frequency   8.0
math  LBO1  offset      2.0

#     x = LBO1(t) * cos(t)
#     y = LBO1(t) * sin(t)
math  polar

math  render``` Like I said in an email, this is one of those situations where it's so simple it's very complicated.
Last edited by james; 04-23-2021 at 18:39.  Reply With Quote #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•