programming 4 arcs problm with java

Put your programming skills to the test in these challenges.

programming 4 arcs problm with java

Post by iamjman on Wed Apr 01, 2009 9:51 pm
([msg=21025]see programming 4 arcs problm with java[/msg])

i did the xml and lines in a pretty short amount of time and now ive spent way to long trying to figure out these arcs. ok
can someone clarify that the arcStart and arcExtend correctly go with javas drawArc startangle and arcangle
also explain what exactly each does, i know if arcStart(startAngle) is 0 then it is 3 oclock or something dont quite get that ive looked all over google mayeb fresh start tomorrow will help idk
thanks

or if im heading in complete wrong direction like those dont mater need to edit x,y,width,height, maybe push in right direction
iamjman
New User
New User
 
Posts: 13
Joined: Tue Apr 22, 2008 7:19 pm
Blog: View Blog (0)


Re: programming 4 arcs problm with java

Post by BhaaL on Thu Apr 02, 2009 11:29 am
([msg=21055]see Re: programming 4 arcs problm with java[/msg])

Extend might be called "sweep" in some languages.

And for the rest, how about some trial/error? Try to paint them as you think its right, and see what happens.
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: programming 4 arcs problm with java

Post by eljonto on Sun Apr 05, 2009 8:03 pm
([msg=21244]see Re: programming 4 arcs problm with java[/msg])

i had the same problem, my post is here http://www.hackthissite.org/forums/viewtopic.php?f=19&t=2231 i found out how by looking at how java draws arcs and how the xml file draws them and editing the values as necessary
-Quis custodiet ipsos custodes?, Juvenal
_________________________________________________________________
User avatar
eljonto
Poster
Poster
 
Posts: 373
Joined: Thu Apr 17, 2008 1:16 am
Location: Australia
Blog: View Blog (0)


Re: programming 4 arcs problm with java

Post by edilVin on Sat May 16, 2009 1:27 am
([msg=23802]see Re: programming 4 arcs problm with java[/msg])

This challenge took me a few hours to figure out the problem with arcs. The post by eljonto is good but I solved it with a different method. I used :

g.translate(0, 600);
[Mod Edit: ELJONTO >>Code removed]-Just removed the vital scaling code to change coord system (I removed it from my post as well) and arc drawing code (Which again i removed from my post). Agree with Bhall, it could spoil the mission for java users.

however is not that simple, but the answer comes up very quick if you figure out how does java draw arcs and notice what changes must be done to variables.

Hope this not a spoiler. Nice challenge by the way


"Seamos realistas y hagamos lo imposible" Ernesto Che Gevara
User avatar
edilVin
New User
New User
 
Posts: 15
Joined: Thu Mar 05, 2009 10:57 pm
Blog: View Blog (0)


Re: programming 4 arcs problm with java

Post by BhaaL on Sat May 16, 2009 5:27 am
([msg=23808]see Re: programming 4 arcs problm with java[/msg])

It only reveals some specific lines of code that might be useful to Java users, but does not give away certain points unless someone is familiar with programming languages like that (or can read manuals/help files).
I'd suggest you remove that hint of yours anyways, as it still might spoil other java coders.
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: programming 4 arcs problm with java

Post by eljonto on Sat May 16, 2009 6:35 am
([msg=23810]see Re: programming 4 arcs problm with java[/msg])

Yes, i looked back over my old post and felt that it revealed too much. I edited out the spoiler-ish code from mine and his code and just explained possibilities of what should be done rather than explicitly telling people how to do it. My old post is still quite informative though, just had the spoilers removed.
-Quis custodiet ipsos custodes?, Juvenal
_________________________________________________________________
User avatar
eljonto
Poster
Poster
 
Posts: 373
Joined: Thu Apr 17, 2008 1:16 am
Location: Australia
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron