User Tools

Site Tools


Sidebar

Home



Knowledge Base


Guides & Tutorials

Projects

Samples

  G-Code
   Square
   Arcs
   Mickey
   Arrow
   Bear
   Ball In Cage

  Dialogs
   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
   G06 H1
   arrchr

  Dynamic
   Clock
   DateTime

  Notepad++ Plugin
   Examples

  3D Models
   small_cnc.txt
   3dModel_TableA.txt


kb:samples:polygon

Polygon

%
G21 G90
 
#<r> = 30
#<n> = 5
 
G00 X0 Y#<r>
#<a> = 0
#<c> = 0
o<loop> while [#<c> LE #<n>]
  #<x> = [#<r> * SIN[#<a>]]
  #<y> = [#<r> * COS[#<a>]]
  G01 X#<x> Y#<y>
  #<a> = [#<a> + 360 / #<n>]
  #<c> = [#<c> + 1]
o<loop> endwhile
%
kb/samples/polygon.txt · Last modified: 2024/04/03 08:08 by 127.0.0.1

Page Tools