Commit e1ae8104 authored by Andrew Maclean's avatar Andrew Maclean
Browse files

BUG: - fixed a problem in that not all the hills were plotted in the y-direction.

parent 6e870a91
......@@ -19,7 +19,7 @@
#include <time.h>
vtkCxxRevisionMacro(vtkParametricRandomHills, "1.3");
vtkCxxRevisionMacro(vtkParametricRandomHills, "1.4");
vtkStandardNewMacro(vtkParametricRandomHills);
vtkParametricRandomHills::vtkParametricRandomHills() :
......@@ -92,8 +92,8 @@ void vtkParametricRandomHills::Evaluate(double uvw[3], double Pt[3], double Duvw
for ( i = 0; i < NumberOfHills; ++i )
{
this->hillData->GetTuple(i,hillTuple);
const double x = (Pt[0] - hillTuple[0])/hillTuple[2];
const double y = (Pt[1] - hillTuple[1])/hillTuple[3];
double x = (u - hillTuple[0])/hillTuple[2];
double y = (v - hillTuple[1])/hillTuple[3];
Pt[2] += hillTuple[4] * exp( -(x*x+y*y) / 2.0 );
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment