Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hole in my drawing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
marcus




PostPosted: Mon May 28, 2012 8:24 am   Post subject: Hole in my drawing

Hi, I am attempting to draw Stan Marsh from South Park, and when i try to colour in his jack, there is a hole
after repeated attempts to colour in the jacket i have given up!!!!! Crying or Very sad anybody want to help me?
i have attached the program



Stan Marsh.t
 Description:

Download
 Filename:  Stan Marsh.t
 Filesize:  2.59 KB
 Downloaded:  78 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Aange10




PostPosted: Mon May 28, 2012 10:40 am   Post subject: RE:Hole in my drawing

I wont tell you the answer, but this code should help. Also, try to debug like this for yourself next time.

Turing:

setscreen ("graphics:500,500")

%--------------------Face------------------
%Circle for Face
drawoval (244, 324, 100, 100, black)
drawfill (218, 269, 91, black)
break

%Hat
Draw.Arc (243, 349, 96, 25, 360, 180, black)
Draw.Arc (243, 325, 100, 25, 360, 180, black)
Draw.Fill (230, 369, brightred, black)
Draw.Fill (225, 389, blue, black)
break

%EyeBrows
Draw.ThickLine (196, 354, 225, 366, 5, black)
Draw.ThickLine (292, 354, 261, 366, 5, black)
break

%Eyes
drawfilloval (214, 318, 20, 22, white)
drawfilloval (274, 318, 20, 22, white)
drawfilloval (221, 316, 5, 5, black)
drawfilloval (266, 316, 5, 5, black)
break

%Mouth
drawfillarc (240, 255, 16, 15, 360, 180, black)
drawfillarc (240, 255, 16, 10, 180, 360, black)
break

%Star on Head
Draw.FillStar (226, 412, 257, 440, brightred)
Draw.FillStar (226, 442, 257, 405, brightred)
break

%--------------------Lower Body------------------

% Legs and Feet
drawfillbox (162, 64, 320, 114, 125)
drawline (141, 65, 335, 65, black)
Draw.Arc (205, 49, 40, 25, 40, 148, 7)
Draw.Arc (270, 49, 40, 25, 40, 148, 7)
Draw.Fill (207, 68, black, black)
Draw.Fill (289, 66, black, black)


%Jacket
drawline (172, 204, 134, 107, black)
drawline (134, 107, 239, 88, black)
drawline (134, 107, 239, 88, black)
drawline (343, 108, 239, 88, black)
drawline (343, 108, 305, 204, black)
break
drawarc (240, 227, 59, 10, 180, 5, black)
drawarc (239, 220, 62, 15, 160, 5, black)
break
drawline (302, 219, 299, 228, black)
drawline (227, 226, 237, 205, black)
drawline (249, 224, 237, 205, black)
Draw.ThickLine (237, 204, 237, 88, 3, black)
break
drawfilloval (220, 183, 6, 6, black)
drawfilloval (220, 153, 6, 6, black)
drawfilloval (220, 123, 6, 6, black)
break
drawfill (206, 212, brightred, black)
break
drawfill (270, 212, brightred, black)
break
drawfill (174, 144, red, black)
break
drawfill (285, 160, red, black)
break

%Left Hand/ Arm
drawline (187, 243, 150, 219, black)
drawline (150, 219, 125, 159, black)
drawline (125, 159, 153, 153, black)
drawfilloval (138, 158, 15, 15, brightred)
drawoval (138, 158, 15, 15, black)
drawfilloval (151, 160, 10, 10, brightred)
drawoval (151, 160, 10, 10, black)
break


%Right Hand / Arm
drawline (299, 241, 334, 219, black)
drawline (334, 219, 354, 159, black)
drawline (354, 159, 324, 152, black)
drawfilloval (340, 160, 15, 15, brightred)
drawoval (340, 160, 15, 15, black)
drawfilloval (326, 160, 10, 10, brightred)
drawoval (326, 160, 10, 10, black)
break


var x, y, button : int
loop
    Mouse.Where (x, y, button)
    Text.Locate (1, 1)
    if button = 0 then
        put x : 4, "  ", y : 4, "  button up"
    else
        put x : 4, "  ", y : 4, "  button down"
    end if
end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: