This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

AceticAcid
AceticAcid presents ...

2012/11/18

TrainingDrawLine

It is fun!

2449 views / 13 in the last 7 days

Tags: with-source

open in greenfoot
Your browser is ignoring the <APPLET> tag.
A new version of this scenario was uploaded on Sun Nov 18 00:07:51 UTC 2012
danpostdanpost

2012/11/18

In your Vector class, in the 'sin_theta2' and 'cos_theta2' methods, you are bringing in 'angle' as an 'int' parameter. They need cast to 'double' while converting to radians. [code]double a = (double) angle/180.0*PI;[/code]
SPowerSPower

2012/11/18

Or just use the Math class: [code]double radians = Math.toRadians(angle);[/code]
AceticAcidAceticAcid

2012/11/18

Thank you very much~ the problem is solved.
A new version of this scenario was uploaded on Sun Nov 18 11:54:33 UTC 2012
A new version of this scenario was uploaded on Sun Nov 18 11:54:50 UTC 2012 Thank you very much!
A new version of this scenario was uploaded on Sun Nov 18 11:57:37 UTC 2012 Thank you very much!
SPowerSPower

2012/11/18

Your circle 'filling' doesn't fill the entire cirlce (as you probably already have seen ;) ). To fix this you can: a) keep track of all the drawn points and draw a line towards that b) look at my fast graphics scenario and see how I did it there

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.