locked
mahreendrharoon layman small basic RRS feed

  • Question

  • i found a program on small basic fourm given by somebody- A heart made with 3 ellipses- liked it verymuch
     i have tried to Animate a face with 7 ellipses would like all small basic forum gurus if it is any worth 
    please answer and help with thanks please would anybody like to try and use their sleves and hands 

        by my twelve years grandson Aitchsonian

       The Code MHR111


             GraphicsWindow.Width = 400
    GraphicsWindow.Height = 300

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(100, 60, 200, 150)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(130, 80, 50, 50)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(220, 80, 50, 50)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(180, 110, 40, 60)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(60, 90, 40, 60)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(300, 90, 40, 60)

    GraphicsWindow.PenColor = "Red"
    GraphicsWindow.DrawEllipse(180, 180, 40, 20)
    Friday, October 2, 2015 6:55 AM

Answers

  • Hi mussamaina

    When drawing things of the same color you only need to set the PenColor once.

    To animate a drawing it's much easier to use Shapes. Shapes can be moved, zoomed and have their opacity set.

    Also when working with multiple shapes and drawings that work together it can be helpful to setup a data table.

    Data tables assign property values to each shape and drawing in an array that can be used throughout your program.

    So GraphicsWindow.DrawEllipse(100, 60, 200, 150) can be stored as

    draw[1] = "X=100;Y=60;W=200;H=150;color=red;tag=head"

    Then you can go nuts animating it: http://smallbasic.com/program/?KQL710

    \\//

    Friday, October 2, 2015 12:00 PM

All replies

  • Hi mussamaina

    When drawing things of the same color you only need to set the PenColor once.

    To animate a drawing it's much easier to use Shapes. Shapes can be moved, zoomed and have their opacity set.

    Also when working with multiple shapes and drawings that work together it can be helpful to setup a data table.

    Data tables assign property values to each shape and drawing in an array that can be used throughout your program.

    So GraphicsWindow.DrawEllipse(100, 60, 200, 150) can be stored as

    draw[1] = "X=100;Y=60;W=200;H=150;color=red;tag=head"

    Then you can go nuts animating it: http://smallbasic.com/program/?KQL710

    \\//

    Friday, October 2, 2015 12:00 PM
  •   mahreendrharooa

    thanks for the code KQL710 still cant get my own code MHR111 from the net would like some help with thanks i am dum at graphics am coding using maths would like to be in touch

                                         mussa-maina

    Tuesday, October 6, 2015 12:26 PM