Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Drawing arcs with Tk and labeling them, problems with the math?

by benn (Priest)
on Sep 10, 2003 at 19:13 UTC ( #290501=note: print w/ replies, xml ) Need Help??


in reply to Drawing arcs with Tk and labeling them, problems with the math?

$ystop = int($xstop + $tick_length*sin($drawn_angle*$deg2rad));
Ermm - shouldn't that be $ystart instead of $xstop?

As an aside, 3.1417 is not as near an approximation to PI (3.14159...) as 3.1416 is :)

Cheers, Ben.


Comment on Re: Drawing arcs with Tk and labeling them, problems with the math?
Download Code
Re: Re: Drawing arcs with Tk and labeling them, problems with the math?
by Anonymous Monk on Sep 10, 2003 at 22:10 UTC
    Ben, Thanks that worked great. Now I just have a problem with where the ticks come from. I need one tick per arc but I'm not getting that. I think it's a math problem. Any ideas? Thanks, Mark

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://290501]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-05 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls