I have the correct code for the problem 7 in chapter 9 of "The art and science of java", which I found from a solutions manual online. Images of the page describing the problem are provided in attachment. however, I cannot tell how this programmer
found the correct values to pass to the GArc and GLine methods in order to draw the heart picture. I know it has something to do with trigonometry and fact that Math.sqrt(2) is the factor you multiply the side of a right triangle by to find the hypotenuse,
but I cannot see why the solution has those values for dx, height, and so forth. I realize this may be more of a math question than concerning
java, but any help would be useful.
Javadoc on the ACM libraries I used if you need it:
http://cs.stanford.edu/people/eroberts/jtf/javadoc/student/index.html.
http://cs.stanford.edu/people/eroberts/jtf/