User Tools

Site Tools


Sidebar

Home



Knowledge Base


Guides & Tutorials

Projects

Samples

  G-Code
   Square
   Arcs
   Mickey
   Arrow
   Bear
   Ball In Cage

  Dialogs
   Square
   Rounded Square
   Guess The Number

  O-Words
   Polygon

  Subprocedures
   Lissajous

   Lissajous (sub..endsub..call)
   Lissajous (call..sub..endsub)

   Lissajous (exec..O..M99)

   Lissajous (G65)
   Lissajous (G65 with GOTO)

   Palindrome
   PrimeFactors
   Fibonacci

  Splines
   Butterfly

  G06
   arrchr

  Dynamic
   Clock
   DateTime


kb:samples:lissajous_sub..endsub..call

Lissajous (sub..endsub..call)

%
O<lissajous> sub
  G00 X#1 Y[#2+#10] Z#3
  #<step> = 0
  O<loop> while [#<step> LE 360]
    #<x> = [#4 * sin[#6 * #<step> + #8]]
    #<y> = [#5 * cos[#7 * #<step> + #9]]
    G01 X[#1+[#10*#<x>]] Y[#2+[#10*#<y>]]
    #<step> = [#<step> + #11]
  O<loop> endwhile
O<lissajous> endsub
 
(#1=x #2=y #3=z #4=A #5=B #6=a #7=b #8=d #9=g #10=scale #11=res)
O<lissajous> call [0] [0] [0] [1] [1] [1] [3] [0] [0] [100] [5]
%
kb/samples/lissajous_sub..endsub..call.txt · Last modified: 2024/04/02 19:47 by 127.0.0.1

Page Tools