Home > Community > Forums > PCB SKILL > A Small SKILL Routine to Draw Dynamic Graphic

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 A Small SKILL Routine to Draw Dynamic Graphic 

Last post Sun, May 20 2012 11:19 PM by leonlee. 3 replies.
Started by leonlee 17 May 2012 06:53 PM. Topic has 3 replies and 2594 views
Page 1 of 1 (4 items)
Sort Posts:
  • Thu, May 17 2012 6:53 PM

    • leonlee
    • Top 200 Contributor
    • Joined on Tue, Jul 22 2008
    • Shanghai, Shanghai
    • Posts 38
    • Points 580
    A Small SKILL Routine to Draw Dynamic Graphic Reply

     This a small skill routine just for entertainment.

    Source code:

    axlCmdRegister( "GraphicTest" `GraphicTest ?cmdType "interactive")
    defun(GraphicTest ()
    axlKillDesign()
    _layer = "board geometry/outline"
    declare( fibo[100])
    arrayp(fibo)
    for( i 0 2 fibo[i] = i)
    for( i 3 20 fibo[i] = fibo[i-1] + fibo[i-2])
    GraphyTimer()
     );defun 
     
     procedure( GraphyTimer()                 
                         Count = 0    Count2 = 1     M=20            
                         ID = axlUIWTimerAdd( nil M nil 'GraphyTimeCallback )                                            
                      );procedure
     
     procedure( GraphyTimeCallback( window ID elapsedTime )
                          Count++
                          Circle = caar(axlDBCreateCircle( list( list( fibo[Count2] 0) fibo[Count2]-fibo[Count2-1] ), 0, _layer) )
                          axlTransformObject(Circle, ?angle Count*360/M, ?origin 0:0)
                          axlWindowFit() 
                         when(Count > M   Count = 0    Count2++   M=1.5*M)
                          when( Count2 >7                     
                                    axlUIWTimerRemove( ID )
                                   Count = 0    Count2=0
                                   if( axlUIYesNo("How about the graphic?\nIs it beautiful?" "Just for entertainment.") then
                                       axlUIConfirm(" Ha Ha Ha~~~")
                                       else
                                       axlUIConfirm(" Wu wu wu~~~")
                                     );if
                                   );when
                       );procedure     

    • Post Points: 35
  • Fri, May 18 2012 3:30 AM

    • C Shiva
    • Top 50 Contributor
    • Joined on Tue, Jul 15 2008
    • Bangalore, Karnataka
    • Posts 165
    • Points 3,440
    Re: A Small SKILL Routine to Draw Dynamic Graphic Reply

     Nice skill code leonlee. But there is no option to stop it.

    • Post Points: 20
  • Fri, May 18 2012 3:55 AM

    • girish
    • Top 25 Contributor
    • Joined on Wed, Jul 16 2008
    • Bangalore, Karnataka
    • Posts 241
    • Points 4,920
    Re: A Small SKILL Routine to Draw Dynamic Graphic Reply

     I appreciate youridea !

    Making me more enthusiastic to learn skill coding  & to make different shapes ;-)

     

    Thanks

     Girish Kumar 

    • Post Points: 5
  • Sun, May 20 2012 11:19 PM

    • leonlee
    • Top 200 Contributor
    • Joined on Tue, Jul 22 2008
    • Shanghai, Shanghai
    • Posts 38
    • Points 580
    Re: A Small SKILL Routine to Draw Dynamic Graphic Reply

     To stop the routine,  the command is:

    axlUIWTimerRemove( ID )

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by leonlee at 17 May 2012 06:53 PM. Topic has 3 replies.