Skip to main content

archamedeesSpiral java applet draw help

1 reply [Last post]
perplexingtrax
Offline
Joined: 2008-03-15

hi there, with this method, i'm wanting to be able to call it 3/4 times on the page of my applet. how do i go about finding the centre of this spiral, so i can add the x and y value when i call it in the applet, to plot it wherever on the page? ie 1 in the middle, 1 top left and 1 at a random x y coord etc

http://rafb.net/p/VN2mIo57.html

Message was edited by: perplexingtrax

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
perplexingtrax
Offline
Joined: 2008-03-15

its ok now, thanks anyway

this
x2 = (int)( radius*Math.cos(angle) );
2 = -(int)( radius*Math.sin(angle) );

to this
x2 = +x(int)( radius*Math.cos(angle) );
2 = -y(int)( radius*Math.sin(angle) );

easy as that!