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

Username:   Password: 
 RegisterRegister   
 drawing thick arcs
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
uknowhoiam




PostPosted: Sat Feb 14, 2009 4:15 pm   Post subject: drawing thick arcs

Does anyone know how to make thick arcs, i tried Draw.ThickArc but its not a command

can someone help me
Sponsor
Sponsor
Sponsor
sponsor
copthesaint




PostPosted: Sat Feb 14, 2009 7:06 pm   Post subject: RE:drawing thick arcs

You can't just draw thick arcs. you need to use for statements.
andrew.




PostPosted: Sat Feb 14, 2009 8:14 pm   Post subject: RE:drawing thick arcs

Draw a few arcs with slightly different radius.

Here is an example. I took the F10 help and added a for statement.
Turing:
const midx := maxx div 2
const midy := maxy div 2
for i : 0 .. 5
    Draw.Arc (midx, midy, midx + i, midy + i, 0, 90, 1)
end for
Silinter




PostPosted: Fri Feb 12, 2010 1:59 am   Post subject: Re: drawing thick arcs

Excuse the bump, but if any1 else finds this on Google and doesn't care about efficiency, here is one.

Turing:
proc ThickArc (x, y : real, a, b, sa, ea, thickness : real4, c : int2) %x,y = position; a,b = x/y radius; sa,ea=start/end angle; c = color
    handler (e)
        for i : round (min (a, b)) .. round (max (a, b))
            drawarc (round (x), round (y), round (a) + i, round (b) + i, round (sa), round (ea), c)
        end for
    end handler
    if thickness > 1 then
        for i : round (min (sa, ea)) .. round (max (sa, ea))
            Draw.ThickLine (round (x + cosd (i) * a), round (y + sind (i) * b),
                round (x + cosd (i + 1) * a), round (y + sind (i + 1) * b), round (thickness), c)
        end for
    elsif thickness = 1 then
        drawarc (round (x), round (y), round (a), round (b), round (sa), round (ea), c)
    end if
end ThickArc
USEC_OFFICER




PostPosted: Fri Feb 12, 2010 4:23 pm   Post subject: RE:drawing thick arcs

What is it exactly that you want to do? Becuase think arcs aren't very exact, although Silinter's procedure looks like it.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: