Page 49 of 49 FirstFirst ... 394546474849
Results 481 to 483 of 483

Thread: The LaserBoy Thread

  1. #481
    Join Date
    Sep 2014
    Location
    Colorado USA
    Posts
    448

    Default

    Quote Originally Posted by james View Post
    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

  2. #482
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,600

    Default

    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 and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    Either do or do not do. There is no undo!

  3. #483
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,600

    Default

    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  spread_scale
    
    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.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    Either do or do not do. There is no undo!

Posting Permissions

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