DevLabs > DevLabs Forums > Small Basic > Drawings.DrawCurve() Extensions Question
Ask a questionAsk a question
 

QuestionDrawings.DrawCurve() Extensions Question

  • Friday, October 23, 2009 7:42 PMDannyBoy 28409 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Since I can't hide the Turtle, it seemed that I could move the Turtle as needed and record the x,y into an array and then draw it with DrawCurve.

    Just for testing:

    (place turtle)
    Turtle.Move(100)
    SX()

    For xyx = 1 to 36
      Turtle.Turn(10)
      Turtle.Move(5)
      SX()
    endfor

    TextWindow.WriteLine("TP:"+tp)
    TextWindow.Pause()

    Drawings.DrawCurve("path","Blue","3",tp)
    GraphicsWindow.DrawImage("path",100,100)
    Sub SX
     
      thisindex=thisindex+1
      tp[thisindex]=Turtle.X+","+Turtle.Y

    EndSub

    _________________________________________________________
    The array seems ok in the form of x,y

    When I run it though, SB crashes with no error message.

    Any assistance would be greatly appreciated!

    TIA

    Dan

All Replies

  • Thursday, October 29, 2009 9:38 PMRobert W Jones Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    first use the graphics window instead of the text window.  Secondly, Drawings doesn't exist, but using the turtle you can draw very detailed curves etc. the other way is to draw a series of short lines, with which you can draw a perfect circle.  Take advantage of what you have, and forget about what you don't have!
  • Monday, November 02, 2009 11:14 AMFremyCompanyAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Full code would be needed for more help. Use the built-in publish feature, and let us know.


    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension