Page 47 of 67 FirstFirst ... 3743444546474849505157 ... LastLast
Results 461 to 470 of 670

Thread: The LaserBoy Thread

  1. #461
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Well, I don't like having to reach over and grab the rodent just to have to find the pointer on the screen and drag it around to click on a menu item. So yes. I also think that key stroke menus are way faster.

    OK!

    Now we are getting to the meat and potatoes.

    A generator is what causes LB to create a new frame_set and populate it with whatever the generator function does. This makes a frame_set of real numbers (double floating point X Y Z) and loads the result into the (invisable) registers.

    The "math render" function is what causes LB to scale the real numbers of the last frame_set loaded into the registers to fit inside of short integer space and load the scaled copy into the LB viewing space so you can see it and save it as ilda, wave, etc....

    All parameters that are changed from their default values must be done before the generator is called.

    So, a simple circle of radius 1 sitting around the origin (the unit circle) looks like this

    Code:
    math  LBO1  phase    90.0
    
    #    x = LBO1(t)
    #    y = LBO2(t)
    math  lissajou
    
    math  render
    All of the other parameters are already set to the default values.

    The math lissajou generator uses

    Code:
    math  phase_cycle           360.0
    math  interval_cycle        1.0
    
    math  start                 0.0
    math  duration              1.0
    math  iterations            100.0
    
    math  LBO1  function        sin
    math  LBO1  amplitude       1.0
    math  LBO1  frequency       1.0
    math  LBO1  phase           0.0
    math  LBO1  duty_cycle      0.5
    math  LBO1  damping         0.0
    math  LBO1  offset          0.0
    math  LBO1  sin             1.0
    math  LBO1  triangle        0.0
    math  LBO1  ramp            0.0
    math  LBO1  square          0.0
    math  LBO1  pulse           0.0
    math  LBO1  trapeziod       0.0
    math  LBO1  circle          0.0
    
    math  LBO2  function        sin
    math  LBO2  amplitude       1.0
    math  LBO2  frequency       1.0
    math  LBO2  phase           0.0
    math  LBO2  duty_cycle      0.5
    math  LBO2  damping         0.0
    math  LBO2  offset          0.0
    math  LBO2  sin             1.0
    math  LBO2  triangle        0.0
    math  LBO2  ramp            0.0
    math  LBO2  square          0.0
    math  LBO2  pulse           0.0
    math  LBO2  trapeziod       0.0
    math  LBO2  circle          0.0
    Setting

    Code:
    math  LBO1  phase    90.0
    causes LBO1 to act like the cos function, because cos(t) == sin(t + 90.0).

    Phase is in degrees because

    Code:
    math  phase_cycle           360.0
    says that one cycle is 360.0.

    The interval from start to start + duration is noted as

    Code:
    math  interval_cycle        1.0
    
    math  start                 0.0
    math  duration              1.0
    A duration of 1.0 is based on the value of interval_cycle. In this case one whole trip around the unit circle (0.0 to two_pi). It's much easier to think in terms of whole periods of two_pi rather than having to use a calculator to figure out all the digits you'd have to type for multiples of two_pi.

    LaserBoy can only read tokens from the text. It cannot read expressions and evaluate them. So saying that duration is "100 * two_pi" won't work. With interval_cycle set to 1.0, it's just a duration 100.0 (multiples of two_pi).

    The value of "start" is also effected by interval_cycle in the same way. So you could start at some point on the real number line other than 0.0.

    The value of "iterations" is how many vertices are calculated over the interval to generate a frame of the generator function.

    There's no harm in reiterating default values so you could make a txt file like this:

    Code:
    math  phase_cycle           360.0
    math  interval_cycle        1.0
    
    math  start                 0.0
    math  duration              1.0
    math  iterations            100.0
    
    math  LBO1  function        sin
    math  LBO1  amplitude       1.0
    math  LBO1  frequency       1.0
    math  LBO1  phase           90.0
    math  LBO1  duty_cycle      0.5
    math  LBO1  damping         0.0
    math  LBO1  offset          0.0
    math  LBO1  sin             1.0
    math  LBO1  triangle        0.0
    math  LBO1  ramp            0.0
    math  LBO1  square          0.0
    math  LBO1  pulse           0.0
    math  LBO1  trapeziod       0.0
    math  LBO1  circle          0.0
    
    math  LBO2  function        sin
    math  LBO2  amplitude       1.0
    math  LBO2  frequency       1.0
    math  LBO2  phase           0.0
    math  LBO2  duty_cycle      0.5
    math  LBO2  damping         0.0
    math  LBO2  offset          0.0
    math  LBO2  sin             1.0
    math  LBO2  triangle        0.0
    math  LBO2  ramp            0.0
    math  LBO2  square          0.0
    math  LBO2  pulse           0.0
    math  LBO2  trapeziod       0.0
    math  LBO2  circle          0.0
    
    #    x = LBO1(t)
    #    y = LBO2(t)
    math  lissajou
    
    math  render
    and tweak away all day at the values to see what happens.

    Valid values for LBO function are:

    Code:
    math  LBO1  function       sin
    math  LBO1  function       triangle
    math  LBO1  function       ramp
    math  LBO1  function       square
    math  LBO1  function       pulse
    math  LBO1  function       trapeziod
    math  LBO1  function       circle
    Setting the value of function to one of these actually sets the function mixer of an LBO to be of only one of the "pure" periodic functions. The mixer is also available to set the relative levels of each function for a blend. So, after an LBO function is set, you can tweak the mixer to get other function shapes by changing the relative values of

    Code:
    math  LBO1  sin             1.0
    math  LBO1  triangle        0.0
    math  LBO1  ramp            0.0
    math  LBO1  square          0.0
    math  LBO1  pulse           0.0
    math  LBO1  trapeziod       0.0
    math  LBO1  circle          0.0
    As you can see the mixer is set to output sin (1.0) and all others are set to 0.0. Setting the value of "function" resets all of the mixer values. So if you want to mix functions you have to set these mixer values after setting the function.

    If you want to generate and render multiple math forms in the same file, you can easily get back to the default values of the LBOs by directly resetting each one like this:

    Code:
    math  LBO1  reset
    or all of them like this

    Code:
    math  LBO_reset_all


    I think I'm going to start a new ambient music group called Invisible Registers.
    Last edited by james; 04-20-2021 at 07:28.
    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.

  2. #462
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Now, if you want to see what LaserBoy Liquid Math was really designed to do you need to look at the animated version of lissajou.

    This form uses two sets of parameters (twice as many as the single frame form) plus a frames count.

    It looks like this:

    Code:
    math  start                 0.0
    math _start                 0.0
    
    math  duration              1.0
    math _duration              1.0
    
    math  iterations            100.0
    math _iterations            100.0
    
    math  frames                3
    
    math  LBO1  function        sin
    math  LBO1  amplitude       1.0
    math  LBO1  frequency       1.0
    math  LBO1  phase           0.0
    math  LBO1  duty_cycle      0.5
    math  LBO1  damping         0.0
    math  LBO1  offset          0.0
    math  LBO1  sin             1.0
    math  LBO1  triangle        0.0
    math  LBO1  ramp            0.0
    math  LBO1  square          0.0
    math  LBO1  pulse           0.0
    math  LBO1  trapeziod       0.0
    math  LBO1  circle          0.0
    
    math _LBO1  function        sin
    math _LBO1  amplitude       1.0
    math _LBO1  frequency       1.0
    math _LBO1  phase           0.0
    math _LBO1  duty_cycle      0.5
    math _LBO1  damping         0.0
    math _LBO1  offset          0.0
    math _LBO1  sin             1.0
    math _LBO1  triangle        0.0
    math _LBO1  ramp            0.0
    math _LBO1  square          0.0
    math _LBO1  pulse           0.0
    math _LBO1  trapeziod       0.0
    math _LBO1  circle          0.0
    
    math  LBO2  function        sin
    math  LBO2  amplitude       1.0
    math  LBO2  frequency       1.0
    math  LBO2  phase           0.0
    math  LBO2  duty_cycle      0.5
    math  LBO2  damping         0.0
    math  LBO2  offset          0.0
    math  LBO2  sin             1.0
    math  LBO2  triangle        0.0
    math  LBO2  ramp            0.0
    math  LBO2  square          0.0
    math  LBO2  pulse           0.0
    math  LBO2  trapeziod       0.0
    math  LBO2  circle          0.0
    
    math _LBO2  function        sin
    math _LBO2  amplitude       1.0
    math _LBO2  frequency       1.0
    math _LBO2  phase           0.0
    math _LBO2  duty_cycle      0.5
    math _LBO2  damping         0.0
    math _LBO2  offset          0.0
    math _LBO2  sin             1.0
    math _LBO2  triangle        0.0
    math _LBO2  ramp            0.0
    math _LBO2  square          0.0
    math _LBO2  pulse           0.0
    math _LBO2  trapeziod       0.0
    math _LBO2  circle          0.0
    
    #    x = LBO1(t)
    #    y = LBO2(t)
    math _lissajou
    
    math  render
    The parameters that begin with an underscore are the final frame parameters and the parameters that don't start with an underscore (the same as those used in the single frame forms) are the first frame parameters.

    The name of an animated generator also begins with an underscore indicating that it takes a set of initial parameters and a set of final parameters plus the number of frames you want to calculate in the animated frame_set.

    All of the values above are the default values. So this won't do anything but give you a diagonal line that doesn't move.

    But you can copy this and start tweaking to make the initial and the final values of any or all of these parameters different. LB will render a frame_set showing the linear progression from the initial frame parameters to the final frame parameters of "math frames {value}" number of frames.

    Now if you look at still_forms.txt, animated_forms.txt or any of the other example files, they should make more sense.
    .
    .
    .
    But Wait! There's More! Much More!
    Last edited by james; 04-20-2021 at 12:35.
    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.

  3. #463
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    I just updated the code and a bit of the documentation.

    https://laserboy.org/code/LB_04_20_2021.zip

    Now you can go into menu u and set option b to make the menus a solid color and go into the [Tab] menu, option 4, option 5 to set the rgb values of the monochrome menu color.
    Last edited by james; 04-20-2021 at 15:45.
    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.

  4. #464
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    I'm curious as to how many people on this forum read these posts and think "OMG MATH!!!" and run away because they are sure it's way beyond understanding.

    It's not.
    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.

  5. #465
    Join Date
    Mar 2010
    Posts
    581

    Default

    so If I go with:

    math LBO1 phase 90.0
    math LBO1 amplitude 0.2
    math LBO2 amplitude 0.1
    math lissajou
    math render
    Then am I correct that the "math render" function causes LB to scale the real numbers so the small oval still appears big? How do I get the small oval into the LB viewing space?

    Also, please illustrate the approach to generate and sum two or more circles.

  6. #466
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    It's all relative when "normalizing" real number frame_sets to LaserBoy_space based on "to_frame" of the whole cube of signed short integers. So, if you include the unit reference, the frame_set will be normalized with that in space too. So your lissagou frame will be relative in size to the unit reference. If your frame_set is bigger than unit reference then unit reference will be smaller.

    The default values:
    Code:
    math  normalize_frames_with_origin   no
    math  normalize_frames_individually  no
    math  include_unit_reference         no
    
    math  to_frame    0.90
    By default LB scales the frame_set to be rendered to be 90% of the size of the whole cube.

    I should probably change the parameter name "to_frame" to "to_space" for consistency.

    These must be set before calling render.
    Last edited by james; 04-20-2021 at 13:56.
    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.

  7. #467
    Join Date
    Jul 2008
    Posts
    768

    Default

    Quote Originally Posted by james View Post
    I just updated the code and a bit of the documentation.

    https://laserboy.org/code/LB_04_02_2021.zip

    Now you can go into menu u and set option b to make the menus a solid color and go into the [Tab] menu, option 4, option 5 to set the rgb values of the monochrome menu color.
    You might want to fix your link to the newest version...

  8. #468
    Join Date
    Sep 2014
    Location
    Colorado USA
    Posts
    793

    Default

    Quote Originally Posted by james View Post
    I'm curious as to how many people on this forum read these posts and think "OMG MATH!!!" and run away because they are sure it's way beyond understanding.

    It's not.
    Consider this: My first trigonometry teacher in college, absolutely new the subject matter it like the back of his hand but conveyed the subject matter in a very math elitist, abstract, hard to understand manner. My grade for the semester was F. My first Calculus I teacher was, unfortunately for me, much like this trig instructor. I did a bit better and made a D. Seven years passed, having dropped out of college after 5 semesters and entering the workforce, I decided to retake these two math courses along with subjects I had become very interested in, astronomy, archeology, anthropology, electronics at a different college. I first retook trig, the instructor had a gift for conveying math abstractions in very simple to understand way, same exact material. I made an A.

    It turned out he also taught the Calculus I & II courses. I made A's in both in semesters that followed.

    Some people grasp abstract ideas and concepts quite easily, from the beginning, others not so much, but do better when the subject matter is presented in easier to understand terms.

    It usually is not the subject matter, but rather how it is presented for intellectual consumption (not to mention retention).

    I learned a lot more, in a shorter amount of time from those Liquid Math examples and explanations of your last posts. Nice job!
    ________________________________
    Everything depends on everything else

  9. #469
    Join Date
    Sep 2014
    Location
    Colorado USA
    Posts
    793

    Default

    Quote Originally Posted by dchammonds View Post
    You might want to fix your link to the newest version...
    Good catch.

    It should be https://laserboy.org/code/LB_04_20_2021.zip
    ________________________________
    Everything depends on everything else

  10. #470
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Quote Originally Posted by dchammonds View Post
    You might want to fix your link to the newest version...
    It's the 4:20 version. What do you expect?
    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.

Posting Permissions

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