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.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
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:
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.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 spread_scale math color_span_hues math reverse_vectors math render ############################################### ###############################################
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
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
math add
# 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?
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.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
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.
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.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
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.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.
Last edited by james; 04-23-2021 at 18:39.
Creator of LaserBoy!
LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
Download LaserBoy!
YouTube Tutorials
Ask me about my LaserBoy Correction Amp Kit for sale!
All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.