媒介変数表示とグラフ

アステロイド

\[ \begin{cases} x = \cos^3 t \\ y = \sin^3 t \end{cases} \]

TestMyParameter09.java

import java.awt.Graphics2D;

import myMath.MyCurve;
import myMath.Tpl20;

public class TestMyParameter09 extends Tpl20 {

	public void draw2(Graphics2D g2) {
		MyPara1 pf = new MyPara1();

		draw(pf, 0, 2 * Math.PI);
	}

	class MyPara1 extends MyCurve {
		public void p(double t) {
			x = Math.pow(Math.cos(t), 3);
			y = Math.pow(Math.sin(t), 3);
		}
	}
}

[前へ] [戻る]