#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    32
    Rep Power
    14
    Alright, I'm coding a pie chart, and what I essential do is generate get two angles (starting and ending angles, using the percentages). The coords of the line are generated using cos and sin multiplied by the radius, and starting from the center of the circle (already created with ImageArc).
    I then generate a point inside that arc by taking the average of the two angles and using the same process as before to generate the coords, except now I multiply by a scaler (.7) to get it inside the arc.
    Now, when I use ImageFillToBorder, it will sometimes work and sometimes not work. I believe this is because the lines are arc/circle don't always meet. I don't know if this is because PHP is rounding values when using sin/cos or what. I modified my code a bit, make the lines longer and the arcs shorter (using ceil and floor) but that helped only somewhat, and made the circle a bit off keel. Can anyone think of someway to fix this?
    I can post the code if you like, but because the code does work most of the time, I don't believe it's the code that's causing the trouble. Any help is greatly appreciated and I will answer any questions you have promptly.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<Can anyone think of someway to fix this?
    I can post the code if you like,
    >>

    pls post it!!

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited June 30, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    32
    Rep Power
    14
    Well, I actually fixed the bug (it was some weird problem) but if you wanted me to post the code because you want to use it, contact me...I can't tell whether you want me to post the code for debugging purposes (now useless) or because you want it. :-/
  6. #4
  7. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15


    <<
    but if you wanted me to post the code because you want to use it, contact me...
    I can't tell whether you want me to post the code for debugging purposes (now useless) or because you want it.
    >>


    No,
    You don't have to post the code now...






    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    If you have followed this forum at all you will understand that Shiju Rajan as always was trying to help - from reading his replies etc I do not think he needs to 'borrow' your or anybodys script.

    Stange way to thank someone for advice offered.

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  10. #6
  11. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Thank You Mr.Simon,

    i am shocked to read "gpolins" reply. He mistook me. But I am really happy the way come forward with your consolation message.


    You know,i am not a full time php programmer. Offen i get some work in php otherwise I engage myself in java ,asp ,or cgi programs.

    But I like the php scripting and participating in devshed discussions.
    You know I spend 1-2 hours daily here in devshed.bcoz just to be a part of this global IT fraternity.

    I have noticed your replies many occassions here in devshed.Your replies are perfect and accurate.I often tell my friends about star programmers in devshed,that include freesbd,rodk and you.I have learned a lot of things from your answers.

    Thanks again for your comment.

    Have a nice time!!!



    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."




    [This message has been edited by Shiju Rajan (edited July 01, 2000).]
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    32
    Rep Power
    14
    hey, sorry if either I mistook you or you mistook me...I'm not on this forum a whole lot and I couldn't tell...I mean usually someone will ask to explain the code more or ask me questions but not a "pls post it!!!"...And I didn't thank you for just trying to help because I just got the message that you responded to my question. So thanks a lot for wanting to help and it's great that you spend a lot of time answering questions, that's really a nice trait. Sorry if I sounded uptight or non-grateful or something along those lines, just wanted to let you know that I am grateful and I'm not a jerk.
  14. #8
  15. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    gpolins,
    No problems!!!!
    Thank You..




    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."
  16. #9
  17. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>I often tell my friends about star programmers
    >>in devshed,that include freesbd,rodk and you
    Including me? nah..
    Let me apologize for posting this off-topic message in advance. Honestly, Perl is all I know and I am still far away from being a Perl star. Shiju, if someone asks you to convert a PHP script to Perl, it would be a piece of cake for you since you are the bilingual (referring to Perl and PHP) man here in devshed.
    As for helping others, I'd do the same as you exactly like what firepages mentioned. In addition, not to call this selfish, by replying to others or reading the messages here, it encourages or forces myself to learn more and get something out of it, so there's really a one-way deal involved.
    Often, I like to ignore replying to messages that I know the answer of due to the fact that I am being selfish for not wanting to share my codes (I've spent much time written) with others. Well, they mostly are Perl scripts, which cover almost everything one can't ever imagine. That's why "Nothing impossible with Perl" is often seen here

    Enough said, I just wanna tell everyone here not to think that I am a star. I am still a newbie for programming.

IMN logo majestic logo threadwatch logo seochat tools logo