I am new to jfreechart. I am looking at VectorRendererDemo1.java to learn how to plot a vector field.
I do not understand how the deltaX and deltaY parameters of the add() method are being computed
in the following code snippet from VectorRendererDemo1.java.
==================== Begin : Example code =============================
private static VectorXYDataset createDataset() {
VectorSeries vectorseries = new VectorSeries("Series 1");
for (double d = 0.0D; d < 20D; d++) {
for (double d1 = 0.0D; d1 < 20D; d1++)
vectorseries.add(d + 10D, d1 + 10D, Math.sin(d / 5D) / 2D, Math.cos(d1 / 5D) / 2D);
}
..
..
}
==================== End : Example code =============================
My question :
say, I have a differential equation in x and y (y' = y^2 -x) , and a set of (x,y) coordinates. How do I compute
the deltaX and deltaY at each (x,y), for the population of the vector series ? I would imagine both of them
(deltaX and deltaY) are somehow related to y' at the given (x,y).
My apologies if I am missing something obvious. I googled all I can but found nothing other than the above that
explains it.
Thanks a lot in advance
deltaX and deltaY parameters of VectorSeries.add()
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: deltaX and deltaY parameters of VectorSeries.add()
Is the section in bold a typo? Shouldn´t it readmushmach wrote: say, I have a differential equation in x and y (y' = y^2 -x) , and a set of (x,y) coordinates.
Code: Select all
y' = x^2-x