deltaX and deltaY parameters of VectorSeries.add()

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mushmach
Posts: 1
Joined: Fri May 22, 2015 8:08 pm
antibot: No, of course not.

deltaX and deltaY parameters of VectorSeries.add()

Post by mushmach » Fri May 22, 2015 8:28 pm

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

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: deltaX and deltaY parameters of VectorSeries.add()

Post by paradoxoff » Tue May 26, 2015 4:24 pm

mushmach wrote: say, I have a differential equation in x and y (y' = y^2 -x) , and a set of (x,y) coordinates.
Is the section in bold a typo? Shouldn´t it read

Code: Select all

y' = x^2-x
?

Locked