View Single Post
Old Nov 13th, 2004, 12:51 PM   #5
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Looks good. The code achieves your 2000+1 lines of output.
Drunken coder has confirmed the value is correct... you can plug them into a
calculator to confirm further if needed.



public class Hindeline1
{
 public static void main (String [] args)
 {
   double x;
   double y;
   double t;

   for (t = -10; t <= 10; t += 0.01)
   {
    double sin=Math.sin(t);
    double cos=Math.cos(t);

    x = (40 * cos) + 60 * Math.cos((2/3)*t);
    y = (40 * sin) - 60 * Math.sin((2/3)*t);

    System.out.println(x + " | " + y);
   }
 }
}
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote