- import java.util.Collections;
- import java.util.Vector;
- public class K2 {
- public static void main(String[] args) {
- Vector<Double> vx = new Vector<Double>();
- Vector<Double> vy = new Vector<Double>();
- double t=10.0, samm=0.0125, x, y;
- while (t > -10.0)
- {
- x = 100.0 * Math.sin(t * Math.PI / 2.0) * Math.cos(t * Math.PI / 10.0);
- y = 100.0 * Math.sin(t * Math.PI / 2.0) * Math.sin(t * Math.PI / 10.0);
- t = t-samm;
- samm = samm * 1.01;
- vx.add(x);
- vy.add(y);
- }
- Collections.sort(vx);
- Collections.sort(vy);
- System.out.print("x: ");
- System.out.println(vx + " ");
- System.out.print("y: ");
- System.out.println(vy + " ");
- }
- }
Posted by magel on Wed 17th Jan 10:10
View followups from sander_l | download | new post
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.